Use label.text instead of lable to fix problem.
authorPeng Huang <phuang@phuang.nay.redhat.com>
Thu, 12 Feb 2009 03:26:04 +0000 (11:26 +0800)
committerPeng Huang <phuang@phuang.nay.redhat.com>
Thu, 12 Feb 2009 03:26:04 +0000 (11:26 +0800)
ui/gtk/menu.py
ui/gtk/panel.py
ui/gtk/toolitem.py

index 9a3b30a..6f6c7d1 100644 (file)
@@ -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)
index e7850e6..d3cd249 100644 (file)
@@ -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",
index 0e4e4ad..09ad686 100644 (file)
@@ -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: