From 62659e280638e8b4a7509dbb1a6c6cd8c601bd7f Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 19 Oct 2006 15:44:00 +0200 Subject: [PATCH] Show the share button only when the activity is not shared --- shell/view/frame/ZoomBox.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shell/view/frame/ZoomBox.py b/shell/view/frame/ZoomBox.py index 3c21f20d..45c76cda 100644 --- a/shell/view/frame/ZoomBox.py +++ b/shell/view/frame/ZoomBox.py @@ -29,9 +29,16 @@ class ActivityMenu(Menu): def __init__(self, activity_host): Menu.__init__(self, activity_host.get_title()) + if not activity_host.get_shared(): + self._add_mesh_action() + + self._add_close_action() + + def _add_mesh_action(self): icon = CanvasIcon(icon_name='stock-share-mesh') self.add_action(icon, ActivityMenu.ACTION_SHARE) + def _add_close_action(self): icon = CanvasIcon(icon_name='stock-close') self.add_action(icon, ActivityMenu.ACTION_CLOSE)