Restore gramplet buttons for grid layout

svn: r16365
This commit is contained in:
Nick Hall 2011-01-11 19:04:42 +00:00
parent e80a51469a
commit 27d85fc692
2 changed files with 8 additions and 4 deletions

View File

@ -114,6 +114,7 @@ class Bottombar(object):
for (name, opts) in config_settings[1]: for (name, opts) in config_settings[1]:
all_opts = get_gramplet_opts(name, opts) all_opts = get_gramplet_opts(name, opts)
all_opts["layout"] = "tabs"
gramplet = make_requested_gramplet(self, name, all_opts, gramplet = make_requested_gramplet(self, name, all_opts,
self.dbstate, self.uistate) self.dbstate, self.uistate)
self.gramplet_map[all_opts["title"]] = gramplet self.gramplet_map[all_opts["title"]] = gramplet
@ -299,6 +300,7 @@ class Bottombar(object):
return return
all_opts = get_gramplet_options_by_tname(tname) all_opts = get_gramplet_options_by_tname(tname)
all_opts["layout"] = "tabs"
gramplet = make_requested_gramplet(self, all_opts["name"], all_opts, gramplet = make_requested_gramplet(self, all_opts["name"], all_opts,
self.dbstate, self.uistate) self.dbstate, self.uistate)
if not gramplet: if not gramplet:

View File

@ -361,16 +361,12 @@ class GuiGramplet(object):
self.titlelabel.get_children()[0].set_use_markup(True) self.titlelabel.get_children()[0].set_use_markup(True)
self.titlelabel.connect("clicked", self.edit_title) self.titlelabel.connect("clicked", self.edit_title)
self.titlelabel_entry = None self.titlelabel_entry = None
self.titlelabel.hide()
self.gvclose = self.xml.get_object('gvclose') self.gvclose = self.xml.get_object('gvclose')
self.gvclose.connect('clicked', self.close) self.gvclose.connect('clicked', self.close)
self.gvclose.hide()
self.gvstate = self.xml.get_object('gvstate') self.gvstate = self.xml.get_object('gvstate')
self.gvstate.connect('clicked', self.change_state) self.gvstate.connect('clicked', self.change_state)
self.gvstate.hide()
self.gvproperties = self.xml.get_object('gvproperties') self.gvproperties = self.xml.get_object('gvproperties')
self.gvproperties.connect('clicked', self.set_properties) self.gvproperties.connect('clicked', self.set_properties)
self.gvproperties.hide()
self.xml.get_object('gvcloseimage').set_from_stock(gtk.STOCK_CLOSE, self.xml.get_object('gvcloseimage').set_from_stock(gtk.STOCK_CLOSE,
gtk.ICON_SIZE_MENU) gtk.ICON_SIZE_MENU)
self.xml.get_object('gvstateimage').set_from_stock(gtk.STOCK_REMOVE, self.xml.get_object('gvstateimage').set_from_stock(gtk.STOCK_REMOVE,
@ -384,6 +380,12 @@ class GuiGramplet(object):
[GuiGramplet.LOCAL_DRAG_TARGET], [GuiGramplet.LOCAL_DRAG_TARGET],
gtk.gdk.ACTION_COPY) gtk.gdk.ACTION_COPY)
if kwargs.get("layout", "grid") == "tabs":
self.titlelabel.hide()
self.gvclose.hide()
self.gvstate.hide()
self.gvproperties.hide()
def undo(self): def undo(self):
self.buffer.undo() self.buffer.undo()
self.text_length = self.len_text(self.get_text()) self.text_length = self.len_text(self.get_text())