! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-panel: uses wrong icon names
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description Chris Bainbridge 2015-02-06 20:44:40 CET
Created attachment 5907 
use xfsm-hibernate and xfsm-suspend icons in panel

plugins/actions/actions.c should use xfsm-hibernate and xfsm-suspend icons as it  uses xfsm-reboot, so no need to rely on (probably, rare) missing external icons. 

Related: bug #8760
Comment 1 Steve Dodier-Lazaro editbugs 2015-02-08 18:17:57 CET
@Nick, could you please review this patch in time for 4.12?

system-suspend and system-hibernate are not FD.o standards, so I would believe applying the patch is a good idea.
Comment 2 Simon Steinbeiss editbugs 2015-02-09 09:04:45 CET
@Chris: I disagree. Actually system-suspend and system-hibernate are as close as we get to the fd.org icon naming spec. Using a generic name is a lot better than using a xfce prefix. (See http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html#names for reference, e.g. system-shutdown)

So maybe we should rather turn this around and check which components rely on xfsm-hibernate and -suspend and switch those over to system-suspend (and also rename the icons installed in hicolor by some xfce component over to system-*). Thoughts?

(Just as an additional note: There aren't that many icon themes that support the xfsm-* icon names. E.g. Faenza doesn't.)
Comment 3 Chris Bainbridge 2015-02-09 12:52:10 CET
> Using a generic name is a lot better than using a xfce prefix.

The problem is interaction with freedesktop theme projects. Theme projects can not be expected to implement support for custom XFCE icon names that are not in the freedesktop icon naming standard. This means that, in every case where XFCE relies on a non-standard icon name, to correctly handle the common situation where the theme does not implement that icon name, XFCE must either fallback to a standard icon name or fallback to a custom icon name that is guaranteed to be present on an XFCE desktop.

> So maybe we should rather turn this around and check which components rely on
> xfsm-hibernate and -suspend and switch those over to system-suspend

This will not solve the problem of missing icons in themes that do not implement non-standard icon names.

> There aren't that many icon themes that support the xfsm-* icon names. E.g.
> Faenza doesn't.

The xfsm-* icons are provided by xfce4-session, so will always be present on an XFCE desktop regardless of whatever the current theme is.
Comment 4 Simon Steinbeiss editbugs 2015-02-09 13:01:44 CET
(In reply to Chris Bainbridge from comment #3)
> The xfsm-* icons are provided by xfce4-session, so will always be present on
> an XFCE desktop regardless of whatever the current theme is.

Well that is exactly my point, I'd prefer to change the icon-name in xfce4-session (and all other places) to system-suspend etc.

Ofc icon-theme maintainers cannot be expected to add lots of custom icons, then again, they actually have to, if they want their users to have a consistent experience. Being an icon-theme maintainer myself, I know the woes of that very well...
Comment 5 Chris Bainbridge 2015-02-09 17:07:31 CET
Looks like suspend and hibernate were deliberately left out of the icon spec:[0]

> I think you're missing the point. In general, I think we should get rid of the
> extra icons in all cases, not just the base theme, and then have the apps ship
> them. Doing that doesn't solve anything.

I guess that is why Gnome is still shipping them as gpm-suspend, gpm-hibernate etc.[1]

So the correct answer might be to discuss updating the spec, but it looks like the spec hasn't been updated in a long time.

> Well that is exactly my point, I'd prefer to change the icon-name in 
> xfce4-session (and all other places) to system-suspend etc.

Part of the reason so many people encounter this broken icon issue is that the Debian packages default to the Tango icons where system-suspend and system-hibernate are missing. Arch Linux seems to have the same issue, so they recommend users manually symlink to the xfpm icons.[2] 

Is there a reason XFCE on Debian defaults to an icon theme with missing icons? 
Is that the default when XFCE is built from source? 
Wouldn't it make more sense to default to an icon set that supports all the icons used in the default desktop? 

Changing the icon names everywhere else won't actually fix the issue of missing icons in the default desktop, since the icons will still be installed into the same apps directory, but won't be supported by the theme. I don't see any support for a fallback icon in the gtk call used for loading the icons - if it fails to find the icon, it just returns success and the "broken icon" image.


[0] https://bugs.freedesktop.org/show_bug.cgi?id=5763
[1] http://www.freedesktop.org/wiki/Specifications/icon-naming-spec/to-be-named/
[2] https://wiki.archlinux.org/index.php/xfce#Action_Buttons.2FMissing_Icons
Comment 6 Simon Steinbeiss editbugs 2015-02-11 16:57:20 CET
The hicolor icon theme should be inherited always, so installing icons there is the safest option there is.

I don't think a discussion about updating the icon naming spec is going to very fruitful. Either way, I'm not opposing the patch to be merged as is and I agree that it is more consistent with what we already have. I still don't like the whole xfsm-* naming scheme though and think a more standard-looking name (even if there's no real standard) should be used.
Comment 7 Chris Bainbridge 2015-02-11 17:50:36 CET
I agree it would make sense to switch to the more standard names, it should be a trivial change. The other xfsm-* icons could also be renamed: (KDE list at https://www.archlinux.org/packages/extra/any/oxygen-icons/files/ )

xfsm-reboot -> system-reboot.png (freedesktop compliant)
xfsm-logout -> system-log-out (freedesktop compliant)
xfsm-hibernate -> system-hibernate (non-compliant, but same as KDE)
xfsm-shutdown -> system-shutdown (freedesktop compliant)
xfsm-suspend -> system-suspend (non-compliant, should be same as KDE but Oxygen still uses system-suspend-hibernate)

btw I was looking to see what KDE does and found this note: https://techbase.kde.org/Projects/Oxygen/namingSpec/actions

        system-suspend                 OK * (KDE 3 name: suspend)
        system-suspend-hibernate       -> system-hibernate (agreed upon
                                       by GNOME, XFCE and KDE maintainers)
                                       (KDE 3 name: hibernate)

So it seems at some time there was an agreement for everyone to use system-hibernate anyway.
Comment 8 Andrzej editbugs 2015-02-12 00:47:54 CET
What is the reason actions plugin is using xfsm-reboot and not system-reboot?

Is there any way for setting a "fallback" icon? E.g. try system-suspend and if that fails xfsm-suspend. I prefer standard icon names as they are more likely to be themed. However, xfsm-* variants have a benefit of being always present.
Comment 9 Andrzej editbugs 2015-02-12 01:03:43 CET
Renamed xfsm-reboot to system-reboot.

Eric, can you rename xfsm-* icons to system-* ones in xfce4-session and install them in hicolor(?). Apparently that is the correct way of implementing a fallback.
Comment 10 Simon Steinbeiss editbugs 2015-02-12 01:07:32 CET
Just an additional note: xfce4-session already installs those icons in the hicolor-theme, so the only way those icons could have been missing from the panel before is with a name mismatch (which is what this bugreport really uncovered).

So using the same icon-names in session and panel this bug should be resolved. Thanks guys!

And for reference, this is the commit for the panel: f41489f8aec3f45338f5c2cdb93c4a5e35ae427e
Comment 11 Steve Dodier-Lazaro editbugs 2015-02-12 01:26:44 CET
A last note: should we note ask that the Debian Tango maintainers add hicolor as a fallback theme for Tango?
Comment 12 Chris Bainbridge 2015-02-12 01:33:15 CET
It seems to already fallback to hicolor from Tango - I tested:

# cp /usr/share/icons/hicolor/48x48/apps/{xfsm,system}-suspend.png
# gtk-update-icon-cache /usr/share/icons/hicolor

Then restarted xfce4-panel and the icon is now found.

This is on Debian Jessie.
Comment 13 Simon Steinbeiss editbugs 2015-02-12 20:09:14 CET
@Eric: Actually in terms of xfce4-session, I would prefer if we just add symlinks from xfsm-suspend to system-suspend etc. That way we maintain backward compatibility and who knows, maybe some other component is using these icon names too.
Comment 14 Eric Koegel editbugs 2015-02-14 07:39:38 CET
I used Chris Bainbridge's list for renaming the icons, thanks!
The patch only renames the icons. I'll need to look into the
symlinks more since what I was trying was causing make distcheck
to fail. The patch pushed is:
http://git.xfce.org/xfce/xfce4-session/commit/?id=a101dc79a47f04a96676221d25a4d344f35dc82d
Comment 15 Eric Koegel editbugs 2015-02-14 14:27:19 CET
Instead of fighting with automake, I pushed a patch which just
puts the symlinks in the icon dirs and installs them with the
others. Xfpm does it the same way. Thanks goes to Simon for
pointing this out. Pushed to master in:
http://git.xfce.org/xfce/xfce4-session/commit/?id=1852ede5b76c12b91af759c37ee52a2dcc89a971

Bug #11513

Reported by:
Chris Bainbridge
Reported on: 2015-02-06
Last modified on: 2015-02-14

People

Assignee:
Eric Koegel
CC List:
6 users

Version

Version:
4.10.1

Attachments

Additional information