From 27d85fc692d551dec1f5078afcd99b2953369e18 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Tue, 11 Jan 2011 19:04:42 +0000 Subject: [PATCH] Restore gramplet buttons for grid layout svn: r16365 --- src/gui/bottombar.py | 2 ++ src/gui/widgets/grampletpane.py | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gui/bottombar.py b/src/gui/bottombar.py index f0fe17e13..19f366bec 100644 --- a/src/gui/bottombar.py +++ b/src/gui/bottombar.py @@ -114,6 +114,7 @@ class Bottombar(object): for (name, opts) in config_settings[1]: all_opts = get_gramplet_opts(name, opts) + all_opts["layout"] = "tabs" gramplet = make_requested_gramplet(self, name, all_opts, self.dbstate, self.uistate) self.gramplet_map[all_opts["title"]] = gramplet @@ -299,6 +300,7 @@ class Bottombar(object): return all_opts = get_gramplet_options_by_tname(tname) + all_opts["layout"] = "tabs" gramplet = make_requested_gramplet(self, all_opts["name"], all_opts, self.dbstate, self.uistate) if not gramplet: diff --git a/src/gui/widgets/grampletpane.py b/src/gui/widgets/grampletpane.py index 6b9f77657..ccffb8397 100644 --- a/src/gui/widgets/grampletpane.py +++ b/src/gui/widgets/grampletpane.py @@ -361,16 +361,12 @@ class GuiGramplet(object): self.titlelabel.get_children()[0].set_use_markup(True) self.titlelabel.connect("clicked", self.edit_title) self.titlelabel_entry = None - self.titlelabel.hide() self.gvclose = self.xml.get_object('gvclose') self.gvclose.connect('clicked', self.close) - self.gvclose.hide() self.gvstate = self.xml.get_object('gvstate') self.gvstate.connect('clicked', self.change_state) - self.gvstate.hide() self.gvproperties = self.xml.get_object('gvproperties') self.gvproperties.connect('clicked', self.set_properties) - self.gvproperties.hide() self.xml.get_object('gvcloseimage').set_from_stock(gtk.STOCK_CLOSE, gtk.ICON_SIZE_MENU) self.xml.get_object('gvstateimage').set_from_stock(gtk.STOCK_REMOVE, @@ -384,6 +380,12 @@ class GuiGramplet(object): [GuiGramplet.LOCAL_DRAG_TARGET], 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): self.buffer.undo() self.text_length = self.len_text(self.get_text())