[Sugar-devel] [record PATCH] sl#4442: Now, Copy-to-Clipboard works fine, after the recipient clicks on the thumbnail, and the complete-data is fetched.
Ajay Garg
ajay at activitycentral.com
Mon Feb 25 06:56:55 EST 2013
Signed-off-by: Ajay Garg <ajay at activitycentral.com>
---
button.py | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/button.py b/button.py
index 66cf80b..be32b60 100644
--- a/button.py
+++ b/button.py
@@ -28,7 +28,13 @@ class RecdButton(TrayButton):
palette.menu.append(self._rem_menu_item)
self._rem_menu_item.show()
- self._add_copy_menu_item()
+ self._copy_menu_item_added = False
+
+ def do_expose_event(self, event):
+ if not self._copy_menu_item_added:
+ self._add_copy_menu_item()
+
+ TrayButton.do_expose_event(self, event)
def _add_copy_menu_item( self ):
if self._recd.buddy and not self._recd.downloadedFromBuddy:
@@ -38,7 +44,9 @@ class RecdButton(TrayButton):
self._copy_menu_item_handler = self._copy_menu_item.connect('activate', self._copy_clipboard_clicked)
self.get_palette().menu.append(self._copy_menu_item)
self._copy_menu_item.show()
-
+
+ self._copy_menu_item_added = True
+
def get_recd(self):
return self._recd
--
1.7.11.7
More information about the Sugar-devel
mailing list