GNOME Bugzilla – Bug 532473
show custom icon on the browser's path button bar
Last modified: 2012-08-20 22:12:17 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)"
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.
Changing component as part of ongoing bug reorganisation work.
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...
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).
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?
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?
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 :)
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))) {
In general, I don't think we want images displayed in the pathbar.