diff options
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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]) |