panel menu entry doesn't show correct icon

Bug #197763 reported by Oliver Gerlich
22
Affects Status Importance Assigned to Milestone
glib2.0 (Ubuntu)
Fix Released
Low
Unassigned
Nominated for Hardy by Benjamin Drung
gnome-menus (Ubuntu)
Invalid
Low
Unassigned
Nominated for Hardy by Benjamin Drung
seahorse (Ubuntu)
Invalid
Low
Unassigned
Nominated for Hardy by Benjamin Drung

Bug Description

Binary package hint: seahorse

In current Hardy Alpha, the seahorse entry under panel -> Applications -> Accessories doesn't have the "keys" icon - it just has a standard "application" item as it seems. This is with seahorse 2.21.92-0ubuntu1 .
The seahorse.desktop file contains "Icon=seahorse". When creating a seahorse launcher on desktop, the (big) icon appears correctly; and when looking at the desktop in Nautilus in list view then, the small icon appears correctly as well. Just in the menu it's wrong :-) . I have rebooted, and it didn't help.

Revision history for this message
Oliver Gerlich (ogerlich) wrote :
Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

I can't confirm this. Using the same version on Hardy, the icon appears in the menu for me. Strange...

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

This installation is based on Hardy Alpha 5 iso, with all available updates installed (about daily).

Btw. Alacarte shows the same wrong icon as well. I wonder how to debug this problem?

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Is the file seahorse.xpm in /usr/share/pixmaps/ ?

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

Yes, it's there:

$ ls -l /usr/share/pixmaps/seahorse.xpm
-rw-r--r-- 1 root root 5225 2008-02-26 15:24 /usr/share/pixmaps/seahorse.xpm

Eog also displays it correctly.

There are also some more seahorse icons in /usr/share/icons/:

$ find /usr/share/icons/ -iname "seahorse*"
/usr/share/icons/hicolor/22x22/apps/seahorse-preferences.svg
/usr/share/icons/hicolor/22x22/apps/seahorse.svg
/usr/share/icons/hicolor/48x48/apps/seahorse.png
/usr/share/icons/hicolor/48x48/apps/seahorse-applet.png
/usr/share/icons/hicolor/48x48/apps/seahorse-preferences.png
/usr/share/icons/hicolor/scalable/apps/seahorse-preferences.svg
/usr/share/icons/hicolor/scalable/apps/seahorse.svg
/usr/share/icons/hicolor/scalable/apps/seahorse-applet.svg

Revision history for this message
Christoph Langner (chrissss) wrote :

I can confirm the problem. No icon inside the application menu...

Changed in seahorse:
status: New → Confirmed
Revision history for this message
Christoph Langner (chrissss) wrote :

$ dpkg -l seahorse*
ii seahorse 2.21.92-0ubuntu1 A Gnome front end for GnuPG

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

Looks like it's fixed with latest Seahorse upgrade (2.22.0-0ubuntu1). Christoph, can you confirm that?

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

Sorry :-( but it seems not to be fixed: after reboot the "keys" icon was gone and the generic icon was used again.

Changed in seahorse:
importance: Undecided → Low
Revision history for this message
Norbert Tretkowski (tretkowski) wrote :

The icon is still missing in the final 8.04 release.

Revision history for this message
Benjamin Drung (bdrung) wrote :

I have the same problem using the final 8.04 release. I have changed line 99 in /usr/share/applications/seahorse.desktop to "Icon=seahorse.png" and now it works for me.

Revision history for this message
Frederik Elwert (frederik-elwert) wrote :

I think that the svg files shouldn't be in the 22x22 directory. Maybe that causes problems, which would explain why changing the Icon key in the desktop file to "seahorse.png" fixes the issue.

On the other hand, I tried deleting the svg icons and copying the files from /usr/share/pixmaps/seahorse/22x22/ to /use/share/icons/hicolor/22x22/apps/, but this didn't help. So the problem might not be related to the svg files.

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

Not sure what to make of this; but Alacarte displays the correct Seahorse icon when starting it with English locale (like "LANG=en_GB.utf8 alacarte" or "LANG=en_NZ.utf8 alacarte"), and it displays the wrong (generic) icon when starting it with German locale (like "LANG=de_DE.UTF-8 alacarte" or "LANG=de_AT.utf8 alacarte ").

Revision history for this message
Christoph Korn (c-korn) wrote :

The seahorse icon is also not being displayed in the gnome menu using intrepid alpha 4. (With german language support)

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

The problem seems to be caused by the gettext support for .desktop files (01_gettext-desktopfiles.patch in glib2.0). More detailed, in source package gnome-menus in desktop-entries.c (function desktop_entry_load()), the function g_key_file_get_locale_string() from glib2.0 is used to get the icon name from /usr/share/applications/seahorse.desktop . In German locale, the gettext patch then causes that function to translate the icon name "seahorse" to "Seahorse", which is then not found as icon...

A workaround is to remove or disable the X-Ubuntu-Gettext-Domain line in seahorse.desktop.
A better solution might be to modify gnome-menus to use g_key_file_get_string() to get the icon name as untranslated string. This has the drawback that desktop file lines like "Icon[de]=seahorse-german" (to get a locale-specific icon) would not work anymore (is this actually used somewhere?). Also, the Desktop Entry Spec states that the Icon value is a "localestring", so g_key_file_get_locale_string() is actually the correct function to use...
The "Right Way" might be to add a flag to g_key_file_get_locale_string() so it loads the icon name as described in its documentation but without translating it with gettext... Not sure if this is possible, though, with regard to compatibility.

Revision history for this message
Oliver Gerlich (ogerlich) wrote :

Subscribing glib2 package as the problem is caused by a glib2 patch; also subscribing gnome-menus package as it looks to be a possible candidate for a bugfix.

Revision history for this message
Sebastien Bacher (seb128) wrote :

the bug is not a seahorse one

Changed in seahorse:
status: Confirmed → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :

confirming as a seahorse issue, theorically icon names can be translated so that's a bit tricky

Changed in glib2.0:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

confirming as a glib issue rather

Revision history for this message
Sebastien Bacher (seb128) wrote :

no need to have an another open task, the glib one is enough

Changed in gnome-menus:
importance: Undecided → Low
status: New → Invalid
Revision history for this message
John Doe (jodo-deactivatedaccount) wrote :

I can confirm this bug, too. Noticed it first on Hardy, now the same with Intrepid with all updates (04.09.08).

Revision history for this message
Benjamin Drung (bdrung) wrote :

This bug is fixed with up to date intrepid:

LANG = "de_DE.utf-8"
seahorse 2.23.92-0ubuntu2
glib2.0 2.18.0-1
gnome-menus 2.23.92-0ubuntu1

Changed in glib2.0:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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