diff options
author | Simon Schampijer <simon@laptop.org> | 2012-09-12 09:02:54 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@laptop.org> | 2012-09-12 13:37:34 (GMT) |
commit | 135dd2cce4f796f55b4c81aa3778ea8cffc927eb (patch) | |
tree | 32cfc3a27e41fbf57b05235a93d917812c4afd98 /src | |
parent | 06d3ff07c9f69e131d783f6145d3e744fd1af2b3 (diff) |
ActivityListPalette: fix displaying of Palette
- uncommented some code that was commented by mistake
- listen to the destroy signal of the menu for doing the
cleanup: the structure of Palettes has changed. The
Palette is either a Gtk.Menu or a Gtk.Window which is
encapsulated in the Palette class, in this case the
Palette contains a Gtk.Menu and we can listen on it
for the destroy signal.
To display the Palette this patch depends on the CellrendererInvoker
fixup patch for the toolkit.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/jarabe/desktop/activitieslist.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py index 8958d60..ab62b58 100644 --- a/src/jarabe/desktop/activitieslist.py +++ b/src/jarabe/desktop/activitieslist.py @@ -283,8 +283,6 @@ class CellRendererActivityIcon(CellRendererIcon): self._tree_view = tree_view def create_palette(self): - pass - ''' model = self._tree_view.get_model() row = model[self.props.palette_invoker.path] bundle_id = row[ListModel.COLUMN_BUNDLE_ID] @@ -293,7 +291,7 @@ class CellRendererActivityIcon(CellRendererIcon): palette = ActivityListPalette(registry.get_bundle(bundle_id)) palette.connect('erase-activated', self.__erase_activated_cb) return palette - ''' + def __erase_activated_cb(self, palette, bundle_id): self.emit('erase-activated', bundle_id) @@ -417,7 +415,7 @@ class ActivityListPalette(ActivityPalette): self.__activity_changed_cb) self._update_favorite_item() - #self.connect('destroy', self.__destroy_cb) + self.menu.connect('destroy', self.__destroy_cb) def _add_erase_option(self, registry, activity_info): menu_item = MenuItem(_('Erase'), 'list-remove') |