After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 532473 - show custom icon on the browser's path button bar
show custom icon on the browser's path button bar
Status: RESOLVED WONTFIX
Product: nautilus
Classification: Core
Component: Path Bar
2.22.x
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 619791
 
 
Reported: 2008-05-10 12:25 UTC by Sebastien Bacher
Modified: 2012-08-20 22:12 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Show icons in pathbar, including custom icons (#532473) (1.53 KB, patch)
2010-07-10 23:18 UTC, Marcus Carlson
needs-work Details | Review
Add pathbar icons for all folders except for "normal" folders (5.42 KB, patch)
2010-07-11 11:36 UTC, Marcus Carlson
none Details | Review

Description Sebastien Bacher 2008-05-10 12:25:23 UTC
the bug has been opened on https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/228210

"Binary package hint: nautilus

I have noticed that folders with custom icons do not show those icons on the path bar. Would it be possible to do that?

http://launchpadlibrarian.net/14364949/Pantallazo-1.png
(mockup) see how the Video folder shows its custom icon  (81.2 KiB, image/png)"
Comment 1 Allan Day 2010-05-27 08:51:58 UTC
Thanks for the bug report. The path bar doesn't show icons at the moment, afaik. So this would require special treatment of those directories with custom folders. I'm not convinced that this would be worth the effort of setting all that up, but I'll set status to new, since it's a reasonable suggestion.
Comment 2 Allan Day 2010-06-20 20:05:51 UTC
Changing component as part of ongoing bug reorganisation work.
Comment 3 Marcus Carlson 2010-07-10 23:18:30 UTC
Created attachment 165654 [details] [review]
Show icons in pathbar, including custom icons (#532473)

Not sure if the comment in the code about Bug 80925 is still valid as it seems to be from 2002. However I replaced the code with the same as in other places and if that one's slow then we got more problems...
Comment 4 Cosimo Cecchi 2010-07-11 00:15:40 UTC
Review of attachment 165654 [details] [review]:

::: src/nautilus-pathbar.c
@@ +1151,2 @@
+	return nautilus_file_get_icon (button_data->file, 48,
+				       NAUTILUS_FILE_ICON_FLAGS_USE_THUMBNAILS | NAUTILUS_FILE_ICON_FLAGS_IGNORE_VISITING);

This doesn't only lookup the custom icon, but also gets the default icon if there's no custom one; as that check is already done before in _update_button_appearance(), you should use something like

icon = nautilus_file_get_custom_icon ()
return nautilus_icon_info_lookup_from_name (icon, NAUTILUS_PATH_BAR_ICON_SIZE); (do not hardcode 48 here).
Comment 5 Marcus Carlson 2010-07-11 00:40:57 UTC
From an initial look it seems XDG folders such as Movies, Images etc isn't set with n_f_get_custom_icon() and nautilus_icon_info_lookup_from_path() doesn't take a uri as return by n_f_get_custom_icon().

Any suggestion?
Comment 6 Cosimo Cecchi 2010-07-11 00:48:29 UTC
Oh, then you could try removing altogether the calls to get_custom_user_icon_info() and get_type_icon_info() from _update_button_appearance() and use nautilus_file_get_icon() there directly?
Comment 7 Marcus Carlson 2010-07-11 11:36:42 UTC
Created attachment 165675 [details] [review]
Add pathbar icons for all folders except for "normal" folders

Something like this?

Just pretend nautilus_file_is_user_special_directory() is not part of this patch :)
Comment 8 Marcus Carlson 2010-07-11 19:51:30 UTC
Also,
> +	} else if (!(is_special_directory (file)) && (flags & NAUTILUS_FILE_ICON_FLAGS_NO_DEFAULT_FOLDER)) {

should be the other way around;

> +	} else if ((flags & NAUTILUS_FILE_ICON_FLAGS_NO_DEFAULT_FOLDER) && !(is_special_directory (file))) {
Comment 9 William Jon McCann 2012-08-20 22:12:17 UTC
In general, I don't think we want images displayed in the pathbar.