GNOME Bugzilla – Bug 525153
Encrypted drive/media icons revert to fallback icon
Last modified: 2008-04-02 21:09:37 UTC
Please describe the problem: Encrypted drives (I've only tested it with luks encrypted drives), show up in nautilus under computer, using the fallback-icon of a blank sheet with paper behind it. This occurs with both locked and unlocked drives. Steps to reproduce: 1. Create an encrypted volume 2. Open the computer view in nautilus 3. Actual results: Ugly fallback-icons appear (see following screenshot, which contains one locked and one unlocked encrypted drive). Expected results: Some vaguely drive/media shaped icons should appear, preferably indicating whether they're encrypted (or potentially an unlocked-encrypted drive/media). Does this happen every time? Both of my encrypted volumes show up this way, but I haven't extensively tested that it occurs on different machines, on USB/removable drives, etc. Other information: I was directed here by Rodney in bug 506532 comment 16, suggesting that this was due to an icon naming error, and related either to gvfs or glib/gio. I'm happy to run any tests that may help or try out patches against the 2.22 tarballs, just let me know if I can help... 5:)
Created attachment 108271 [details] Screenshot of missing icons for locked and unlocked encrypted volumes This screen shot shows a 20Gb encrypted volume, and a 60Gb encrypted and mounted volume, both are missing their icons, whilst the cd-rom drive and main filesystem do display the correct icons.
the code uses media-encrypted which is not available in gnome-icon-theme
It should use a fallback when the icon is not available.
Created attachment 108443 [details] [review] Fallback patch Ok, there has landed an intermediate fixup on stable which was to just remove the media-encrypted *at all*. I don't think that is too optimal, since some distros (e.g. fedora 9) already provide those icons. Also even if its not optimal that there are only two icons for encrypted drives so there is no distinction between encrypted media types (e.g. usb drives and hard drives) I think its better to give the user *some* feedback that a volume is encrypted, even though it might not be to correct media icon. The attached patch makes to code fallback in case of encrypted media. I am going to apply that patch before 2.22.1 if after it got some testing (since I haven't done that, I only made sure it compiles).
Created attachment 108444 [details] [review] Updated version, don't include garbage this time
Created attachment 108445 [details] [review] Also include a patch for GHalVolume. Forgot to also patch the GHalVolume. Sorry.
Hi Christian, thanks for creating the patch. I had to modify it slightly to apply to 0.2.2 cleanly, (it was simply the lack of interim fix that caused the difference). Unfortunately I'm still seeing the same thing as I was in my original screenshots (after a full reboot). I'm happy to try out any other patches you may have, if it'll help solve the problem?
Yeah, I am realized it here as well. The fallback is not good enough. Needs some code duplication from glib. I am on it. Thanks.
Created attachment 108491 [details] [review] Another take This is getting old, really old, but I think that should fix it (eventually).
Should be fixed with the following commit: Add icon fallbacks for encrypted drives/media. (#525153) * hal/hal-utils.h: * hal/hal-utils.c: Create new files for utility functions and move get_disc_icon() and get_disc_name() here. Also create get_themed_icon_with_fallbacks() to create GThemedIcons with default fallbacks but with the ability to pass in another name to create the fallbacks from then the icon name. * hal/ghalmount.c: * hal/ghalvolume.c: Use newly created get_themed_icon_with_fallbacks () and pass in custom fallback name for encrypted mounts/volumes (#525153). * hal/Makefile.am: Add hal-utils.[hc] * programs/gvfs-mount.c: Display the icon names for mounts/volumes if the icon is a GThemedIcon.
Thanks, after a few headaches with git-diff (which doesn't seem to include new files) and git-diff --cached (which contains new files, but not modified ones), I finally got the patch sorted and tested, and it does indeed work! Thanks for all your help Christian. 5:)
Cool! Thanks for testing. Marking the patch as committed.