[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.
Signed-off-by: Ajay Garg a...@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 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [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.
On Mon, Feb 25, 2013 at 5:56 AM, Ajay Garg a...@activitycentral.com wrote: Signed-off-by: Ajay Garg a...@activitycentral.com --- button.py | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) Thanks for the patch. It would be nice to have a commit message describing the bug and the fix, without having to go and load the ticket. After reading the ticket I can't immediately see how/why this patch solves the issue. What does the expose event have to do with receiving the data from the remote end? This should be explained in the commit message. Thanks Daniel ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [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.
Sent the update patch at http://lists.sugarlabs.org/archive/sugar-devel/2013-February/041882.html Thanks !! On Mon, Feb 25, 2013 at 8:49 PM, Daniel Drake d...@laptop.org wrote: On Mon, Feb 25, 2013 at 5:56 AM, Ajay Garg a...@activitycentral.com wrote: Signed-off-by: Ajay Garg a...@activitycentral.com --- button.py | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) Thanks for the patch. It would be nice to have a commit message describing the bug and the fix, without having to go and load the ticket. After reading the ticket I can't immediately see how/why this patch solves the issue. What does the expose event have to do with receiving the data from the remote end? This should be explained in the commit message. Thanks Daniel -- Regards, Ajay Garg Dextrose Developer Activity Central: http://activitycentral.com ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel