Description
Icons for the same XDG directories (Documents, Downloads, Music, Pictures, etc.) appear differently in the Bookmarks menu vs the Places sidebar, although they should be identical.
Both places use GTK_ICON_SIZE_MENU (16×16 px) — the size is the same.
Root cause
Icon source
Built-in places in the sidebar (Home, Documents, etc.) get their specific symbolic icon via nemo_file_get_control_icon_name() → get_symbolic_icon_name_for_file():
user-home-symbolic
folder-documents-symbolic
folder-music-symbolic
- etc.
User bookmarks (both in the menu and in the sidebar) get their icon via nemo_bookmark_get_icon_name().
The bug in get_default_folder_icon_name()
In libnemo-private/nemo-bookmark.c, function get_default_folder_icon_name() (line 139-157) does not check for XDG special directories. For all local folders it returns plain folder-symbolic instead of the specific icon:
if (g_file_is_native (bookmark->details->location)) {
ret = g_strdup (NEMO_ICON_SYMBOLIC_FOLDER); // always "folder-symbolic"
}
Meanwhile, get_symbolic_icon_name_for_file() in nemo-file.c:4680-4724 correctly identifies XDG directories and returns proper symbolic icons, but this function is not used in the bookmark fallback path.
Expected behavior
A bookmark pointing to ~/Documents should show folder-documents-symbolic, ~/Music → folder-music-symbolic, etc., not folder-symbolic for all.
Files involved
libnemo-private/nemo-bookmark.c — get_default_folder_icon_name() line 139
libnemo-private/nemo-file.c — get_symbolic_icon_name_for_file() line 4680
libnemo-private/nemo-icon-names.h — icon name definitions
src/nemo-window-bookmarks.c — bookmarks menu
src/nemo-places-sidebar.c — places sidebar
Description
Icons for the same XDG directories (Documents, Downloads, Music, Pictures, etc.) appear differently in the Bookmarks menu vs the Places sidebar, although they should be identical.
Both places use
GTK_ICON_SIZE_MENU(16×16 px) — the size is the same.Root cause
Icon source
Built-in places in the sidebar (Home, Documents, etc.) get their specific symbolic icon via
nemo_file_get_control_icon_name()→get_symbolic_icon_name_for_file():user-home-symbolicfolder-documents-symbolicfolder-music-symbolicUser bookmarks (both in the menu and in the sidebar) get their icon via
nemo_bookmark_get_icon_name().The bug in
get_default_folder_icon_name()In
libnemo-private/nemo-bookmark.c, functionget_default_folder_icon_name()(line 139-157) does not check for XDG special directories. For all local folders it returns plainfolder-symbolicinstead of the specific icon:Meanwhile,
get_symbolic_icon_name_for_file()innemo-file.c:4680-4724correctly identifies XDG directories and returns proper symbolic icons, but this function is not used in the bookmark fallback path.Expected behavior
A bookmark pointing to
~/Documentsshould showfolder-documents-symbolic,~/Music→folder-music-symbolic, etc., notfolder-symbolicfor all.Files involved
libnemo-private/nemo-bookmark.c—get_default_folder_icon_name()line 139libnemo-private/nemo-file.c—get_symbolic_icon_name_for_file()line 4680libnemo-private/nemo-icon-names.h— icon name definitionssrc/nemo-window-bookmarks.c— bookmarks menusrc/nemo-places-sidebar.c— places sidebar