From d18279cec039b7d1c6fcbe381fda5f7093169d11 Mon Sep 17 00:00:00 2001 From: C. Scott Ananian Date: Fri, 28 Dec 2007 05:18:54 +0000 Subject: Really hide keep/share buttons in generated activities. The Widget.show_all() method will re-show buttons we've hidden, unless we hide *after* the show_all() (we could also use Widget.show() instead of Widget.show_all()). --- (limited to 'activity.py') diff --git a/activity.py b/activity.py index fca1a90..5c57842 100644 --- a/activity.py +++ b/activity.py @@ -53,10 +53,7 @@ class VteActivity(ViewSourceActivity): from gettext import gettext as _ super(VteActivity, self).__init__(handle) toolbox = activity.ActivityToolbox(self) - # we don't support share/keep (yet?) toolbar = toolbox.get_activity_toolbar() - toolbar.share.hide() # this should share bundle. - toolbar.keep.hide() self.set_toolbox(toolbox) toolbox.show() @@ -94,6 +91,8 @@ class VteActivity(ViewSourceActivity): self.set_canvas(vtebox) self.show_all() # hide the buttons we don't use. + toolbar.share.hide() # this should share bundle. + toolbar.keep.hide() edittoolbar.undo.hide() edittoolbar.redo.hide() edittoolbar.separator.hide() @@ -143,10 +142,7 @@ class PyGameActivity(ViewSourceActivity): super(PyGameActivity, self).__init__(handle) import gobject, gtk, os toolbox = activity.ActivityToolbox(self) - # we don't support share/keep (yet?) toolbar = toolbox.get_activity_toolbar() - toolbar.share.hide() # this should share bundle. - toolbar.keep.hide() self.set_toolbox(toolbox) toolbox.show() socket = gtk.Socket() @@ -157,3 +153,6 @@ class PyGameActivity(ViewSourceActivity): self.show_all() socket.grab_focus() gobject.child_watch_add(self.child_pid, lambda pid, cond: self.close()) + # hide the buttons we don't use. + toolbar.share.hide() # this should share bundle. + toolbar.keep.hide() -- cgit v0.9.1