From 46b3b96e96067acbdbb5ec5e28ec39f420cc3104 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Wed, 29 Aug 2007 14:08:12 +0200 Subject: [PATCH] Make remove_item take an item instead of an index. --- shell/view/frame/ActivitiesBox.py | 5 +++++ sugar/graphics/tray.py | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/shell/view/frame/ActivitiesBox.py b/shell/view/frame/ActivitiesBox.py index 9911aff2..82a621d2 100644 --- a/shell/view/frame/ActivitiesBox.py +++ b/shell/view/frame/ActivitiesBox.py @@ -71,6 +71,11 @@ class ActivitiesBox(hippo.CanvasBox): for activity_info in activity_list: if activity_info.show_launcher: self.add_activity(activity_info) + self.add_activity(activity_info) + self.add_activity(activity_info) + self.add_activity(activity_info) + self.add_activity(activity_info) + self.add_activity(activity_info) def _activity_clicked_cb(self, icon): self._shell.start_activity(icon.get_bundle_id()) diff --git a/sugar/graphics/tray.py b/sugar/graphics/tray.py index fc6bb14e..99e74653 100644 --- a/sugar/graphics/tray.py +++ b/sugar/graphics/tray.py @@ -116,8 +116,7 @@ class HTray(gtk.HBox): def add_item(self, item, index=-1): self._viewport.traybar.insert(item, index) - def remove_item(self, index): - item = self._viewport.traybar.get_nth_item(index) + def remove_item(self, item): self._viewport.traybar.remove(item) def get_item_index(self, item):