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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
From 8589f886f92bba68e0b6333bc6873d5680e326ab Mon Sep 17 00:00:00 2001
From: Aleksey Lim <alsroot@member.fsf.org>
Date: Mon, 18 Jul 2011 20:39:06 +0200
Subject: [PATCH sugar 44/74] MAY CONTAIN TYPO: Flickering and unknown icons
in the window bar #870
---
src/jarabe/journal/misc.py | 3 ++-
src/jarabe/view/launcher.py | 9 ++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/jarabe/journal/misc.py b/src/jarabe/journal/misc.py
index fac56ad..2c5d39a 100644
--- a/src/jarabe/journal/misc.py
+++ b/src/jarabe/journal/misc.py
@@ -263,7 +263,8 @@ def launch(bundle, activity_id=None, object_id=None, uri=None, color=None,
client = gconf.client_get_default()
color = XoColor(client.get_string('/desktop/sugar/user/color'))
- launcher.add_launcher(activity_id, bundle.get_icon(), color)
+ launcher.add_launcher(activity_id, bundle.get_bundle_id(),
+ bundle.get_icon(), color)
activity_handle = ActivityHandle(activity_id=activity_id,
object_id=object_id, uri=uri, invited=invited)
activityfactory.create(bundle, activity_handle)
diff --git a/src/jarabe/view/launcher.py b/src/jarabe/view/launcher.py
index 5c645c4..44f49bb 100644
--- a/src/jarabe/view/launcher.py
+++ b/src/jarabe/view/launcher.py
@@ -29,7 +29,7 @@
class LaunchWindow(gtk.Window):
- def __init__(self, activity_id, icon_path, icon_color):
+ def __init__(self, activity_id, bundle_id, icon_path, icon_color):
gobject.GObject.__init__(self)
self.props.type_hint = gtk.gdk.WINDOW_TYPE_HINT_NORMAL
@@ -48,6 +48,7 @@ def __init__(self, activity_id, icon_path, icon_color):
canvas.pack_start(header, expand=False)
self._activity_id = activity_id
+ self._bundle_id = bundle_id
self._activity_icon = PulsingIcon(file=icon_path,
pixel_size=style.XLARGE_ICON_SIZE)
@@ -93,6 +94,7 @@ def _update_size(self):
self.resize(gtk.gdk.screen_width(), gtk.gdk.screen_height())
def __realize_cb(self, widget):
+ wm.set_bundle_id(widget.window, str(self._bundle_id))
wm.set_activity_id(widget.window, str(self._activity_id))
widget.window.property_change('_SUGAR_WINDOW_TYPE', 'STRING', 8,
gtk.gdk.PROP_MODE_REPLACE, 'launcher')
@@ -118,13 +120,13 @@ def setup():
model.connect('launch-completed', __launch_completed_cb)
-def add_launcher(activity_id, icon_path, icon_color):
+def add_launcher(activity_id, bundle_id, icon_path, icon_color):
model = shell.get_model()
if model.get_launcher(activity_id) is not None:
return
- launch_window = LaunchWindow(activity_id, icon_path, icon_color)
+ launch_window = LaunchWindow(activity_id, bundle_id, icon_path, icon_color)
launch_window.show()
model.register_launcher(activity_id, launch_window)
@@ -132,6 +134,7 @@ def add_launcher(activity_id, icon_path, icon_color):
def __launch_started_cb(home_model, home_activity):
add_launcher(home_activity.get_activity_id(),
+ home_activity.get_bundle_id(),
home_activity.get_icon_path(), home_activity.get_icon_color())
--
1.7.6
|