launcher editor not working for me with 11.10

Bug #877044 reported by Hunter VanHorn
66
This bug affects 14 people
Affects Status Importance Assigned to Milestone
unity-launcher-editor
Confirmed
Undecided
Unassigned

Bug Description

When pressing the add quicklist group button, the dialog comes up, but when the OK button is clicked, the new entry is not shown on the table, and logging out and back in does not show the new entry. The edit launcher button doesn't do anything at all.

Revision history for this message
Anders Martinsson (jandersmartinsson) wrote :

Same problem with 11.10
Messages:
~/unity-launcher-editor$ ./ule
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject

(ule:4605): Gtk-WARNING **: Kan inte hitta temamotorn i "module_path": "pixmap",

(ule:4605): Gtk-WARNING **: Kan inte hitta temamotorn i "module_path": "pixmap",

(ule:4605): Gtk-WARNING **: Kan inte hitta temamotorn i "module_path": "pixmap",

(ule:4605): Gtk-WARNING **: Kan inte hitta temamotorn i "module_path": "pixmap",
2011-10-25 16:42:48,987::INFO::unitylaunchereditor.dialogs.app -> Application started.
2011-10-25 16:42:49,004::INFO::unitylaunchereditor.dialogs.app -> <GLib.Variant(['nautilus.desktop', 'firefox.desktop', 'libreoffice-writer.desktop', 'libreoffice-calc.desktop', 'libreoffice-impress.desktop', 'ubuntu-software-center.desktop', 'gwibber.desktop', 'gnome-terminal.desktop', '/home/anders/.local/share/applications/wine/Program/FirstClass/FirstClass.desktop'])>
Traceback (most recent call last):
  File "/home/anders/unity-launcher-editor/unitylaunchereditor/widgets/launcherview.py", line 134, in _on_row_change
    self.emit("selection-changed", model, row_iter, objDesktop)
TypeError: could not convert type gtk.ListStore to PyObject required for parameter 0
Traceback (most recent call last):
  File "/home/anders/unity-launcher-editor/unitylaunchereditor/widgets/launcherview.py", line 134, in _on_row_change
    self.emit("selection-changed", model, row_iter, objDesktop)
TypeError: could not convert type gtk.ListStore to PyObject required for parameter 0
Traceback (most recent call last):
  File "/home/anders/unity-launcher-editor/unitylaunchereditor/widgets/launcherview.py", line 134, in _on_row_change
    self.emit("selection-changed", model, row_iter, objDesktop)
TypeError: could not convert type gtk.ListStore to PyObject required for parameter 0

Revision history for this message
Hunter VanHorn (guitarhunter92) wrote :

Didn't realize how useless my report was until Anders posted his console output. Fixing that now, with comments on what buttons I was pressing when.

Revision history for this message
Laudeci Oliveira (laudeci) wrote : Re: [Bug 877044] Re: launcher editor not working for me with 11.10

It looks like we are having a python version problem.
I will try to fix this soon.

Revision history for this message
secretrobotron (secretrobotron) wrote :

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:

@@@
    __gsignals__ = {
                    "selection-changed" : (gobject.SIGNAL_RUN_LAST,
                                           gobject.TYPE_NONE,
                                           (gtk.ListStore,
                                            gtk.TreeIter,
                                            gobject.TYPE_OBJECT),),
@@@

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.

Revision history for this message
Alan Hoyle (alanh) wrote :

I am trying to add a script to the launcher under 11.10 and also running into errors. Steps to reproduce:

get unity-launcher-editor
cd ~/unity-launcher-editor
./ule
Click the "document plus" icon in the upper left.
click "Custom" tab
enter launcher name, command, comment, choose icon
click add.

nothing happens in the launcher, and I get a a couple of errors on the command line. See below:

alanh@ubuntu:~/unity-launcher-editor$ ./ule
/usr/lib/python2.7/dist-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed
  import gobject._gobject
2011-12-02 17:10:40,875::INFO::unitylaunchereditor.dialogs.app -> Application started.
2011-12-02 17:10:40,890::INFO::unitylaunchereditor.dialogs.app -> <GLib.Variant(['nautilus-home.desktop', 'chromium-browser.desktop', 'ubuntu-software-center.desktop', 'gnome-terminal.desktop', 'synaptic.desktop'])>
Traceback (most recent call last):
  File "/home/alanh/unity-launcher-editor/unitylaunchereditor/widgets/launcherview.py", line 134, in _on_row_change
    self.emit("selection-changed", model, row_iter, objDesktop)
TypeError: could not convert type gtk.ListStore to PyObject required for parameter 0
system_tab
custom_tab
Traceback (most recent call last):
  File "/home/alanh/unity-launcher-editor/unitylaunchereditor/addassistant.py", line 51, in __on_add_clicked
    self.emit('add-clicked', obj)
TypeError: could not convert type dict to PyObject required for parameter 0
Traceback (most recent call last):
  File "/home/alanh/unity-launcher-editor/unitylaunchereditor/addassistant.py", line 51, in __on_add_clicked
    self.emit('add-clicked', obj)
TypeError: could not convert type dict to PyObject required for parameter 0

Changed in unity-launcher-editor:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.