GNOME Bugzilla – Bug 104935
Mixer applet icon is broken
Last modified: 2004-12-22 21:47:04 UTC
The default icon for the mixer applet shows up as a broken image. If it worked correctly, it would show a speaker with "sound waves" indicating the volume level. The icon seems to magically work if the current theme is changed via Applications->Desktop Preferences->Themes, but none of these themes are particularly pretty (perhaps I'll have to submit another bug report about this :) Anyway, I found the problem, it turns out that the mixer applet is looking for it's images in GNOME_ICONDIR, which is defined as "NONE/share/pixmaps", a directory, which everyone knows doesn't exist. A simple workaround is to give configure the --prefix option, then NONE is correctly replaced with the prefix and everyone is happy. The reason that GNOME_ICONDIR isn't set to the correct default value of "/usr/local/share/pixmaps" is because GNOME_ICONDIR is defined in config.h before $prefix (which has a default value of NONE) has been changed to $ac_default_prefix in configure. The correct way to fix this problem is to change configure.in and rerun autoconf. The following patch rearranges the order of configure.in so that $prefix is properly defined before it is refereced. (Note: I origionally made this patch for version 2.1.3, but it applies cleanly to 2.2.0) --- gnome-applets-2.1.3/configure.in.orig Mon Dec 16 14:14:55 2002 +++ gnome-applets-2.1.3/configure.in Wed Jan 22 21:28:31 2003 @@ -250,15 +250,6 @@ # Honor aclocal flags ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" - -AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${prefix}/share/pixmaps") - -#defined the below to enable help to work for applets - -AC_DEFINE_UNQUOTED(DATADIR, "${prefix}/share") -AC_DEFINE_UNQUOTED(SYSCONFDIR, "${prefix}/etc") -AC_DEFINE_UNQUOTED(LIBDIR, "${prefix}/lib") -AC_DEFINE_UNQUOTED(PREFIX, "$prefix") AC_OUTPUT([ gnome-applets.spec Makefile @@ -313,3 +304,12 @@ wireless/Makefile omf-install/Makefile ]) + +AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${prefix}/share/pixmaps") + +#defined the below to enable help to work for applets + +AC_DEFINE_UNQUOTED(DATADIR, "${prefix}/share") +AC_DEFINE_UNQUOTED(SYSCONFDIR, "${prefix}/etc") +AC_DEFINE_UNQUOTED(LIBDIR, "${prefix}/lib") +AC_DEFINE_UNQUOTED(PREFIX, "$prefix")
Adding GNOMEVER2.1 keyword, setting priority->high (to help this bug's visibility), and adding the PATCH keyword.
Oops. I could have sworn this patch worked for me, but now that I try it again, I see that it doesn't. So this only goes to show that you should test your patches before you commit your mistakes to the bug database. (: Anyway, the problem is still the same, just the patch doesn't work. ARGH!
Well, here is a patch that really does fix the problem. I looked into several different solutions, and finally setteled on this one. It is a bit of a hack, but from what I can tell, this is the way that others have solved this same problem. Possibly a better solution would be to define this stuff in a Makefile and pass it via gcc's -D option. --- gnome-applets-2.2.0/configure.in.orig Sun Jan 26 09:39:30 2003 +++ gnome-applets-2.2.0/configure.in Sat Feb 1 15:00:57 2003 @@ -250,14 +250,17 @@ # Honor aclocal flags ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" -AC_DEFINE_UNQUOTED(GNOME_ICONDIR, "${prefix}/share/pixmaps") +PREFIX=$prefix +test "x$prefix" = xNONE && PREFIX=$ac_default_prefix +AC_DEFINE_UNQUOTED(PREFIX, "$PREFIX") + +AC_DEFINE(GNOME_ICONDIR, PREFIX"/share/pixmaps") #defined the below to enable help to work for applets -AC_DEFINE_UNQUOTED(DATADIR, "${prefix}/share") -AC_DEFINE_UNQUOTED(SYSCONFDIR, "${prefix}/etc") -AC_DEFINE_UNQUOTED(LIBDIR, "${prefix}/lib") -AC_DEFINE_UNQUOTED(PREFIX, "$prefix") +AC_DEFINE(DATADIR, PREFIX"/share") +AC_DEFINE(SYSCONFDIR, PREFIX"/etc") +AC_DEFINE(LIBDIR, PREFIX"/lib") AC_OUTPUT([ gnome-applets.spec
*** Bug 106076 has been marked as a duplicate of this bug. ***
Is this still applicable?
Yes it is. Only affects people who compile themselves and don't do "configure --prefix=something"
could the volume applet use the gnome-icon-theme instead? the appropriate icon is stock_volume.png
What's up with this? Is the patch ok to go into 2.6.1 and then focus on using the icon theme for 2.7.x?
Checking if this bug is still relevant.
GNOME 2.10 will feature a new mixer applet. If this bug is still relevant please reopen it after testing out the new mixer applet. Thanks.