From 7c9c51f4f51b7ccd0f60f8c4fa72fb89d938943f Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Thu, 19 Jun 2008 22:09:44 +0800 Subject: [PATCH] Set icon search path. --- panel/languagebar.py | 2 -- panel/panel.py | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) 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)) -- 2.7.4