Volume Control won't honor inheritance setting in icon theme

Bug #398226 reported by Arnold
88
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Awn Extras
Fix Released
Medium
onox

Bug Description

I installed gnome-colors icon set and configured it as the default theme in my system. When I set it as the display theme for volume control applet and set the volume to muted, the applet reported the following error:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/awn/extras/awnlib.py", line 1580, in
init_start
    applet_class(applet)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py",
line 71, in __init__
    self.setup_context_menu()
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py",
line 158, in setup_context_menu
    self.load_channel_pref(prefs)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py",
line 213, in load_channel_pref
    self.backend.set_channel(channel)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py",
line 313, in set_channel
    self.set_volume(self.get_volume())
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py",
line 355, in set_volume
    self.parent.refresh_icon(True)
  File "/usr/share/avant-window-navigator/applets/volume-control/volume-control.py",
line 264, in refresh_icon
    self.applet.icon.file(icon, size=height)
  File "/usr/lib64/python2.6/site-packages/awn/extras/awnlib.py", line 491, in file
    icon = gtk.gdk.pixbuf_new_from_file_at_size(file, size, size)
GError: Failed to open file
'/usr/share/icons/gnome-brave/scalable/status/audio-volume-muted.svg': No such file
or directory
It is true that "/usr/share/icons/gnome-brave/scalable/status/audio-volume-muted.svg" doesn't exist. However, take a look of the theme setting,
[awang@mars gnome-brave]$ more /usr/share/icons/gnome-brave/index.theme
[Icon Theme]
Name=GNOME-Brave
Comment=Colorized Gnome Icons
Inherits=gnome-colors-common
....
[awang@mars gnome-brave]$ more /usr/share/icons/gnome-colors-common/index.theme
[Icon Theme]
Name=GNOME-Colors Common
Hidden=true
Comment=Colorized Gnome Icons
Inherits=gnome
....
In other other word, audio-volume-muted.svg should be inherited from gnome icon set which provides the necessary icon.
[awang@mars gnome-brave]$ ls -l /usr/share/icons/gnome/scalable/status/audio-volume-muted.svg
-rw-r--r--. 1 root root 34707 2009-03-17 19:43 /usr/share/icons/gnome/scalable/status/audio-volume-muted.svg

Revision history for this message
Arnold (arnold-wang) wrote :

Sorry, I forgot to mention that I'm running awn 0.3.2 comes with Fedora 11.

Revision history for this message
Mark Lee (malept) wrote :

FYI, awnlib is part of Awn Extras, not Awn.

Moving to the Awn Extras project and assigning to the awnlib maintainer.

affects: awn → awn-extras
Changed in awn-extras:
assignee: nobody → onox (onox)
importance: Undecided → Medium
tags: added: awnlib traceback
Revision history for this message
onox (onox) wrote :

This has nothing to do with awnlib. It's just Volume Control that wants to set an svg icon that doesn't exist. However, volume-control in the rewrite branch (which will be merged with trunk -- meaning that testing PPA's will appear then) uses themed icons. This means that the code will display an appropriate icon or a "missing icon" icon, but it shouldn't crash then. So just wait for PPA's (of Awn Extras 0.4) to appear.

tags: added: volume-control
removed: awnlib
summary: - awnlib won't honor inheritance setting in icon theme
+ Volume Control won't honor inheritance setting in icon theme
Changed in awn-extras:
status: New → Fix Committed
Revision history for this message
Arnold (arnold-wang) wrote :

This has everything to do with awnlib. The icon is NOT missing because it should be inherited from gnome icon set. Take a look of gnome icon theme specification, http://library.gnome.org/devel/icon-theme-spec/, regarding "Inherits" setting.
 "The name of the theme that this theme inherits from. If an icon name is not found in the current theme, it is searched for in the inherited theme (and recursively in all the inherited themes).

If no theme is specified implementations are required to add the "hicolor" theme to the inheritance tree. An implementation may optionally add other default themes in between the last specified theme and the hicolor theme."
In other words, the "missing" icon is NOT missing. It is just located in a different directory awnlib wrongly assumed. Please let me know your take on this.
Thanks.

Revision history for this message
onox (onox) wrote :

You should better read my previous post. It has nothing to do with awnlib. awnlib just contains a nice method with a short name that just calls gtk.gdk.pixbuf_new_from_file_at_size(). It's not up to awnlib to decide what icons to set, it's volume-control.

"It is true that "/usr/share/icons/gnome-brave/scalable/status/audio-volume-muted.svg" doesn't exist. However, take a look of the theme setting,"

You see ^, the svg file does not exist. The old volume-control does not use themes, it mimicks themes by just computing a list of themes that have audio-volume-high.svg. For those themes, it assumes it can find all the other files in the directory /usr/icons/<theme name>/scalable/status/. It knows _nothing_ about index.theme files and the whole icon theme specification. I know this is dumb and stupid, and therefore, moonbeam coded in Awn 0.4 some API that does know about the icon theme specification. The new volume-control (in extras 0.4) will use this API and therefore benefit from it. So, like I said before, you just have to wait until you can install this new code (0.4 branch will be merged with trunk this month if I'm not mistaken, and then you can download PPAs.

Btw, with the "missing icon" icon, I meant a black box with white border that basically says: "My name is Gtk+ and I couldn't find the icon you were looking for".

Revision history for this message
Arnold (arnold-wang) wrote :

Thanks for taking the time to explain this to me, I didn't find the link/reference to your previous post.
I will wait for the 0.4 release.

Mark Lee (malept)
Changed in awn-extras:
milestone: none → 0.4.0
Mark Lee (malept)
Changed in awn-extras:
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.