From: Huang Peng Date: Thu, 19 Jun 2008 14:09:44 +0000 (+0800) Subject: Set icon search path. X-Git-Tag: 0.1.0.20080810~339 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c9c51f4f51b7ccd0f60f8c4fa72fb89d938943f;p=platform%2Fupstream%2Fibus.git Set icon search path. --- diff --git a/panel/languagebar.py b/panel/languagebar.py index 527c505..6919421 100644 --- a/panel/languagebar.py +++ b/panel/languagebar.py @@ -43,8 +43,6 @@ class LanguageBar (gtk.Toolbar): def __init__ (self): gtk.Toolbar.__init__ (self) self.set_property ("icon-size", ICON_SIZE) - icon_theme = gtk.icon_theme_get_default () - icon_theme.prepend_search_path ("/home/phuang/sources/ibus/icons") self._create_ui () self._properties = {} diff --git a/panel/panel.py b/panel/panel.py index 9882394..2c74bd0 100644 --- a/panel/panel.py +++ b/panel/panel.py @@ -23,6 +23,7 @@ import gtk import gtk.gdk as gdk import gobject import ibus +from os import path from lang import LANGUAGES from ibus import interface from languagebar import LanguageBar @@ -33,6 +34,13 @@ class Panel (ibus.Object): gobject.GObject.__init__ (self) self._proxy = proxy self._ibus = _ibus + + # 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) + self._language_bar = LanguageBar () self._language_bar.connect ("property-activate", lambda widget, prop_name: self._proxy.PropertyActivate (prop_name))