From dcd4ceb33c2865ef3636565c68d97ee05ea6b1e3 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Thu, 12 Feb 2009 11:26:04 +0800 Subject: [PATCH] Use label.text instead of lable to fix problem. --- ui/gtk/menu.py | 4 ++-- ui/gtk/panel.py | 4 +--- ui/gtk/toolitem.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ui/gtk/menu.py b/ui/gtk/menu.py index 9a3b30a..6f6c7d1 100644 --- a/ui/gtk/menu.py +++ b/ui/gtk/menu.py @@ -92,7 +92,7 @@ class ImageMenuItem (gtk.ImageMenuItem, PropItem): } def __init__ (self, prop): - gtk.ImageMenuItem.__init__ (self, label = prop.label) + gtk.ImageMenuItem.__init__ (self, label = prop.label.text) PropItem.__init__ (self, prop) if self._prop.icon: @@ -128,7 +128,7 @@ class CheckMenuItem (gtk.CheckMenuItem, PropItem): } def __init__ (self, prop): - gtk.CheckMenuItem.__init__ (self, label = prop.label) + gtk.CheckMenuItem.__init__ (self, label = prop.label.text) PropItem.__init__ (self, prop) self.set_active (self._prop._state == ibus.PROP_STATE_CHECKED) diff --git a/ui/gtk/panel.py b/ui/gtk/panel.py index e7850e6..d3cd249 100644 --- a/ui/gtk/panel.py +++ b/ui/gtk/panel.py @@ -74,9 +74,7 @@ class Panel(ibus.PanelBase): # add icon search path icon_theme = gtk.icon_theme_get_default() - dir = path.dirname(__file__) - icondir = path.join(dir, "..", "icons") - icon_theme.prepend_search_path(icondir) + icon_theme.prepend_search_path(self.__icons_dir) self.__language_bar = LanguageBar() self.__language_bar.connect("property-activate", diff --git a/ui/gtk/toolitem.py b/ui/gtk/toolitem.py index 0e4e4ad..09ad686 100644 --- a/ui/gtk/toolitem.py +++ b/ui/gtk/toolitem.py @@ -46,7 +46,7 @@ class ToolButton(gtk.ToolButton, PropItem): widget = icon.IconWidget(icon_name, 18) gtk.ToolButton.set_icon_widget(self, widget) self.set_is_important(False) - elif self._prop.label: + elif self._prop.label.text: gtk.ToolButton.set_icon_widget(self, None) self.set_is_important(True) else: -- 2.7.4