Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2011-07-18 18:39:06 (GMT)
committer Anish Mangal <anish@activitycentral.com>2012-02-01 12:33:30 (GMT)
commit97e738ad0090fd68981faf34ffba485157d8d54c (patch)
treee228ca758ed055e7227aff011a4ea72969094af1
parent86d07326ddc58256aade532b40836972b4dd3c3b (diff)
MAY CONTAIN TYPO: Flickering and unknown icons in the window bar #870
-rw-r--r--src/jarabe/journal/misc.py3
-rw-r--r--src/jarabe/view/launcher.py9
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 @@ from jarabe.view.pulsingicon import PulsingIcon
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 @@ class LaunchWindow(gtk.Window):
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 @@ class LaunchWindow(gtk.Window):
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())