From b8e96d08aeee519dd08eed36c54a86c7da8f71b1 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 1 May 2007 01:03:16 +0200 Subject: [PATCH] Adjust named icons terminology a bit --- sugar/graphics/icon.py | 6 +++--- sugar/graphics/toggletoolbutton.py | 4 ++-- sugar/graphics/toolbutton.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sugar/graphics/icon.py b/sugar/graphics/icon.py index 84200e62..f5cc25d1 100644 --- a/sugar/graphics/icon.py +++ b/sugar/graphics/icon.py @@ -18,19 +18,19 @@ import gtk class Icon(gtk.Image): - def __init__(self, icon_resource, size=gtk.ICON_SIZE_LARGE_TOOLBAR): + def __init__(self, name, size=gtk.ICON_SIZE_LARGE_TOOLBAR): gtk.Image.__init__(self) icon_theme = gtk.icon_theme_get_for_screen(self.get_screen()) icon_set = gtk.IconSet() - normal_name = icon_resource + normal_name = name if icon_theme.has_icon(normal_name): source = gtk.IconSource() source.set_icon_name(normal_name) icon_set.add_source(source) - inactive_name = icon_resource + '-inactive' + inactive_name = name + '-inactive' if icon_theme.has_icon(inactive_name): source = gtk.IconSource() source.set_icon_name(inactive_name) diff --git a/sugar/graphics/toggletoolbutton.py b/sugar/graphics/toggletoolbutton.py index 09ec0efb..f420a6ea 100644 --- a/sugar/graphics/toggletoolbutton.py +++ b/sugar/graphics/toggletoolbutton.py @@ -20,9 +20,9 @@ import gtk from sugar.graphics.icon import Icon class ToggleToolButton(gtk.ToggleToolButton): - def __init__(self, icon_resource=None): + def __init__(self, named_icon=None): gtk.ToggleToolButton.__init__(self) - icon = Icon(icon_resource) + icon = Icon(named_icon) self.set_icon_widget(icon) icon.show() diff --git a/sugar/graphics/toolbutton.py b/sugar/graphics/toolbutton.py index 541f6c93..bf196f91 100644 --- a/sugar/graphics/toolbutton.py +++ b/sugar/graphics/toolbutton.py @@ -20,9 +20,9 @@ import gtk from sugar.graphics.icon import Icon class ToolButton(gtk.ToolButton): - def __init__(self, icon_resource=None): + def __init__(self, named_icon=None): gtk.ToolButton.__init__(self) - icon = Icon(icon_resource) + icon = Icon(named_icon) self.set_icon_widget(icon) icon.show()