Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/utils.py b/utils.py
index 5fa965e..0eb2b95 100644
--- a/utils.py
+++ b/utils.py
@@ -26,7 +26,9 @@ from theme import *
class ComboBox(_ComboBox):
+
def __init__(self):
+
_ComboBox.__init__(self)
self.set_name('we-really-need-it-to-use-custom-combobox-colors')
@@ -48,8 +50,9 @@ class ComboBox(_ComboBox):
self.add_attribute(self._icon_renderer, 'pixbuf', 2)
if not self._text_renderer and text:
+
self._text_renderer = Gtk.CellRendererText()
- # FIXME: Re escribir
+ # FIXME: Re write
#self._text_renderer.props.ellipsize = Pango.ELLIPSIZE_END
self.pack_end(self._text_renderer, True)
self.add_attribute(self._text_renderer, 'text', 1)
@@ -59,14 +62,17 @@ class ComboBox(_ComboBox):
if not size:
size = Gtk.IconSize.LARGE_TOOLBAR
width, height = Gtk.icon_size_lookup(size)
+
else:
width, height = size
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(icon_name,
width, height)
+
else:
pixbuf = None
if position:
self._model.insert(position, [action_id, text, pixbuf, False])
+
else:
self._model.append([action_id, text, pixbuf, False])