Bookmarks show wrong icons for XDG directories (Documents, Music, etc.)
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 1.6k
- Forks
- 368
- Avg merge
- 4d 4h
- Merged PRs (30d)
- 2
Description
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-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 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in libnemo-private/nemo-bookmark.c at get_default_folder_icon_name(), then compare it with get_symbolic_icon_name_for_file() in libnemo-private/nemo-file.c and the definitions in nemo-icon-names.h. Check the bookmarks menu in src/nemo-window-bookmarks.c and the sidebar in src/nemo-places-sidebar.c. Done means XDG bookmarks such as Documents and Music display the same specific symbolic icons in both places.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100