[Sugar-devel] [PATCH sugar] Reveal the file transfer palette immediatly on left click #10796

Simon Schampijer simon at schampijer.de
Thu Mar 31 13:01:23 EDT 2011


As there are no other options to left click the palette should
be popped up immediately. See 4c2d26ccaeb502037484ced70b5944e3e20aa3f6
for a similar case.

Signed-off-by: Simon Schampijer <simon at laptop.org>
---
 src/jarabe/frame/activitiestray.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/jarabe/frame/activitiestray.py b/src/jarabe/frame/activitiestray.py
index 906ec77..3426b73 100644
--- a/src/jarabe/frame/activitiestray.py
+++ b/src/jarabe/frame/activitiestray.py
@@ -331,12 +331,17 @@ class BaseTransferButton(ToolButton):
         self.notif_icon.connect('button-release-event',
                                  self.__button_release_event_cb)
 
+        self.connect('clicked', self.__button_clicked_cb)
+
     def __button_release_event_cb(self, icon, event):
         if self.notif_icon is not None:
             frame = jarabe.frame.get_view()
             frame.remove_notification(self.notif_icon)
             self.notif_icon = None
 
+    def __button_clicked_cb(self, button):
+        self.palette.popup(immediate=True, state=1)
+
     def remove(self):
         frame = jarabe.frame.get_view()
         frame.remove_notification(self.notif_icon)
-- 
1.7.4



More information about the Sugar-devel mailing list