Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/patches/0001-sdxo-3034-Now-Copy-to-Clipboard-works-fine-after-the.patch
blob: 943b0b80040f85de32510ad597adb8572a4e9a18 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
From c51b97435a9535c85fd22bcebdc8846e3e457fa1 Mon Sep 17 00:00:00 2001
From: Ajay Garg <ajay@activitycentral.com>
Date: Sat, 23 Feb 2013 16:48:14 +0530
Subject: [PATCH] sdxo#3034: Now, Copy-to-Clipboard works fine, after the
 recipient clicks on the thumbnail, and the complete-data is
 fetched.
Organization: Sugar Labs Foundation


Signed-off-by: Ajay Garg <ajay@activitycentral.com>
---
 activity/activity.info |  2 +-
 button.py              | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/activity/activity.info b/activity/activity.info
index be9c97e..ab70a60 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -3,7 +3,7 @@ name = Record
 bundle_id = org.laptop.RecordActivity
 exec = sugar-activity record.Record
 icon = activity-record
-activity_version = 97
+activity_version = 97.1
 show_launcher = yes
 license = MIT
 summary = Unleash the visual artist inside you! Take pictures, make movies and use them to recreate your world. The only limit is your imagination.
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