From 3200bad39dc666804c5ea3d47e7f1639d970463a Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 23 Oct 2007 17:39:31 +0200 Subject: [PATCH 1/3] Free some icon_info instances. --- lib/sugar/graphics/icon.py | 2 ++ lib/sugar/graphics/iconentry.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/sugar/graphics/icon.py b/lib/sugar/graphics/icon.py index cbff3f91..f2150814 100644 --- a/lib/sugar/graphics/icon.py +++ b/lib/sugar/graphics/icon.py @@ -130,6 +130,8 @@ class _IconBuffer(object): icon_info.file_name = info.get_filename() icon_info.attach_x = attach_x icon_info.attach_y = attach_y + + del info else: logging.warning('No icon with the name %s ' 'was found in the theme.' % self.icon_name) diff --git a/lib/sugar/graphics/iconentry.py b/lib/sugar/graphics/iconentry.py index 83bc864a..5bd87140 100644 --- a/lib/sugar/graphics/iconentry.py +++ b/lib/sugar/graphics/iconentry.py @@ -28,8 +28,8 @@ class IconEntry(_sugarext.IconEntry): icon_info = icon_theme.lookup_icon(name, gtk.ICON_SIZE_SMALL_TOOLBAR, 0) - pixbuf = gtk.gdk.pixbuf_new_from_file(icon_info.get_filename()) + del icon_info image = gtk.Image() image.set_from_pixbuf(pixbuf) From f54decf07c8ac909d59a0aa76c00c9f818a21a57 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 23 Oct 2007 17:40:40 +0200 Subject: [PATCH 2/3] Add getter for the current toolbar in Toolbox. --- lib/sugar/graphics/toolbox.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/sugar/graphics/toolbox.py b/lib/sugar/graphics/toolbox.py index e4e831a0..4171d003 100644 --- a/lib/sugar/graphics/toolbox.py +++ b/lib/sugar/graphics/toolbox.py @@ -89,3 +89,9 @@ class Toolbox(gtk.VBox): def set_current_toolbar(self, index): self._notebook.set_current_page(index) + + def get_current_toolbar(self): + return self._notebook.get_current_page() + + current_toolbar = property(get_current_toolbar, set_current_toolbar) + From 4e8e2ea4268a3b723afeb59ad377e275f190559c Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 23 Oct 2007 17:44:23 +0200 Subject: [PATCH 3/3] Set up the logger for the shell service. --- services/shell/sugar-shell-service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/shell/sugar-shell-service b/services/shell/sugar-shell-service index 558e1beb..e5c6a7d0 100755 --- a/services/shell/sugar-shell-service +++ b/services/shell/sugar-shell-service @@ -25,6 +25,7 @@ import logging import gobject import dbus.glib +from sugar import logger from sugar import env sys.path.append(env.get_service_path('shell')) @@ -32,6 +33,7 @@ sys.path.append(env.get_service_path('shell')) import clipboardservice import activityregistryservice +logger.start('shellservice') logging.info('Starting shell service.') gobject.threads_init()