dockbar experimental shows nothing when launchers.list is deleted

Bug #374850 reported by Eemil Lagerspetz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DockbarX
Fix Released
Undecided
Matias Särs

Bug Description

I deleted launchers.list in order to remedy that my user-installed eclipse, installed under my home directory, did not show in the dockbarx. When I removed dockbarx and added it to the panel again, it now shows nothing except the grip. I see no icons for any application, no minimized, unminimized, or any other applications, and no launchers either. This is with version 0.21.8.

To reproduce:
delete or move away .dockbar/launchers.list in your home directory.
Remove dockbarx from the panel.
Add dockbarx to the panel.

What happens:
No icons are visible in the dockbarx.

What should happen:
Open applications, minimized and otherwise, should show in the dockbarx.

Revision history for this message
Eemil Lagerspetz (eemil-lagerspetz) wrote :

Probably related: When I rundockbarx.py run-in-window, I get:

$ dockbarx.py run-in-window
dockbar init
Traceback (most recent call last):
  File "/usr/bin/dockbarx.py", line 2837, in <module>
    dockbarwin = DockBarWindow()
  File "/usr/bin/dockbarx.py", line 2808, in __init__
    self.dockbar = DockBar(None)
  File "/usr/bin/dockbarx.py", line 2544, in __init__
    self.window_opened(self.screen, window)
  File "/usr/bin/dockbarx.py", line 2776, in window_opened
    self.groups.add_group(class_group_name, GroupButton(self,class_group))
  File "/usr/bin/dockbarx.py", line 1271, in __init__
    self.button.drag_source_set_icon_pixbuf(self.icon_factory.find_icon_pixbuf(32))
  File "/usr/bin/dockbarx.py", line 266, in find_icon_pixbuf
    if self.icon_theme.has_icon(icon_name):
UnboundLocalError: local variable 'icon_name' referenced before assignment

Revision history for this message
Eemil Lagerspetz (eemil-lagerspetz) wrote :

Issue was fixed by adding icon_name = name on line 259, like so:

...
252 elif name+".desktop" in self.apps_by_id:
253 icon = self.apps_by_id[name+".desktop"].get_icon()
254 if icon.__class__ == gio.FileIcon:
255 if icon.get_file().query_exists(None):
256 pixbuf = self.icon_from_file_name(icon.get_file().get_path(), size)
257 if pixbuf != None:
258 return pixbuf
259+ icon_name = name
260 elif icon.__class__ == gio.ThemedIcon:
...

All icons, including my Eclipse, are now visible.

Matias Särs (msevens)
Changed in dockbar:
assignee: nobody → Matias Särs (msevens)
status: New → Fix Committed
Matias Särs (msevens)
Changed in dockbar:
status: Fix Committed → Fix Released
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.