linuxmint / linuxmint/nemo

Bookmarks show wrong icons for XDG directories (Documents, Music, etc.)

Open Beginner friendly
#3,805 1 comment 0 reactions 0 assignees View on GitHub

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-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, ~/Musicfolder-music-symbolic, etc., not folder-symbolic for all.

Files involved

  • libnemo-private/nemo-bookmark.cget_default_folder_icon_name() line 139
  • libnemo-private/nemo-file.cget_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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.