Same problem here. Did a whole bunch of debugging this morning.
Apparently, gtk hates your signals because they're not specific enough. I changed the __gsignals__ dict in widgets/launcherview.py's LauncherView to this:
That got things working a little better, but another error occured where the object emitted from the "selection-changed" signal is None. This problem stems from the "add_row" function in LauncherView where "new_iter = self.listmodel.append(row_data)" ever successfully executes because of a problem similar to the one above: the type of DesktopParser is wrong (not inherited from a GObject).
So, I created a very simple wrapper in core/desktop.py:
@@@
class DesktopParserWrapper(gobject.GObject):
def __init__(self, parser): self._parser = parser gobject.GObject.__init__(self)
@@@
Problem almost solved. The only thing left is to change the LauncherView's listmodel to
@@@ self.listmodel = gtk.ListStore(Pixbuf, gobject.TYPE_STRING, gobject.TYPE_OBJECT, gobject.TYPE_STRING, gobject.TYPE_STRING )
@@@
and to change every call to "add_row" to use a DesktopParserWrapper instead of a DesktopParser. This last change is why I'm not just submitting a patch. There's simply too many of these and I don't know how the entirety of the program will react when I change them all.
In general, I have no idea why all of this change is required. Did GTK get a whole bunch more specific recently? gtk.ListStore seems to act... however it wants. I would guess that a gobject.TYPE_PYOBJECT would be fine for passing a DesktopParser, but, apparently it's not.
Some or all of this work may be unnecessary. This is just the result of my endless struggle with unity's launcher.
Same problem here. Did a whole bunch of debugging this morning.
Apparently, gtk hates your signals because they're not specific enough. I changed the __gsignals__ dict in widgets/ launcherview. py's LauncherView to this:
@@@
" selection- changed" : (gobject. SIGNAL_ RUN_LAST,
gobject. TYPE_NONE,
(gtk.ListStore ,
gtk.TreeIter,
gobject. TYPE_OBJECT) ,),
__gsignals__ = {
@@@
That got things working a little better, but another error occured where the object emitted from the "selection-changed" signal is None. This problem stems from the "add_row" function in LauncherView where "new_iter = self.listmodel. append( row_data) " ever successfully executes because of a problem similar to the one above: the type of DesktopParser is wrong (not inherited from a GObject).
So, I created a very simple wrapper in core/desktop.py: apper(gobject. GObject) :
self._ parser = parser
gobject. GObject. __init_ _(self)
@@@
class DesktopParserWr
def __init__(self, parser):
@@@
Problem almost solved. The only thing left is to change the LauncherView's listmodel to
self.listmodel = gtk.ListStore( Pixbuf,
gobject. TYPE_STRING,
gobject. TYPE_OBJECT,
gobject. TYPE_STRING,
gobject. TYPE_STRING
)
@@@
@@@
and to change every call to "add_row" to use a DesktopParserWr apper instead of a DesktopParser. This last change is why I'm not just submitting a patch. There's simply too many of these and I don't know how the entirety of the program will react when I change them all.
In general, I have no idea why all of this change is required. Did GTK get a whole bunch more specific recently? gtk.ListStore seems to act... however it wants. I would guess that a gobject. TYPE_PYOBJECT would be fine for passing a DesktopParser, but, apparently it's not.
Some or all of this work may be unnecessary. This is just the result of my endless struggle with unity's launcher.