Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util
diff options
context:
space:
mode:
authorNat <natcl@hotmail.com>2007-08-02 17:33:46 (GMT)
committer Nat <natcl@hotmail.com>2007-08-02 17:33:46 (GMT)
commitd9e9737ad9d305ff47d463793d7efd58e1262892 (patch)
tree3bfdce66eea51979d02a96b14b5c21592d9ec43c /Util
parentfd4ab49ff2995f8db6dbde4506f87753753e6ac1 (diff)
Test
Diffstat (limited to 'Util')
-rw-r--r--Util/ThemeWidgets.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Util/ThemeWidgets.py b/Util/ThemeWidgets.py
index f1b0105..1771edc 100644
--- a/Util/ThemeWidgets.py
+++ b/Util/ThemeWidgets.py
@@ -1126,7 +1126,7 @@ class BigComboBox(ComboBox):
def __init__(self):
ComboBox.__init__(self)
- def append_item(self, action_id, text, icon_name=None):
+ def append_item(self, action_id, text, icon_name=None, size = None):
if not self._icon_renderer and icon_name:
self._icon_renderer = gtk.CellRendererPixbuf()
@@ -1143,9 +1143,11 @@ class BigComboBox(ComboBox):
self.add_attribute(self._text_renderer, 'text', 1)
if icon_name:
- size = gtk.ICON_SIZE_LARGE_TOOLBAR
-
- width, height = gtk.icon_size_lookup(size)
+ if not size:
+ size = gtk.ICON_SIZE_LARGE_TOOLBAR
+ width, height = gtk.icon_size_lookup(size)
+ else:
+ width, height = size
if icon_name[0:6] == "theme:":
icon_name = self._get_real_name_from_theme(icon_name[6:], size)
pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(icon_name, width, height)