Bookmarks show wrong icons for XDG directories (Documents, Music, etc.)
维护者通常 6 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 libnemo-private/nemo-bookmark.c 中的 get_default_folder_icon_name() 开始,然后将其与 libnemo-private/nemo-file.c 中的 get_symbolic_icon_name_for_file() 以及 nemo-icon-names.h 中的定义进行比较。检查 src/nemo-window-bookmarks.c 中的书签菜单和 src/nemo-places-sidebar.c 中的侧边栏。完成标准是 Documents 和 Music 等 XDG 书签在这两个位置显示相同的特定 symbolic 图标。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- C
- 星标
- 1.6k
- 派生
- 378
- 平均合并
- 10 天 14 小时
- 30 天内合并 PR
- 4
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
linuxmint/nemo 的其他 Issue
-
Copy dialog: Enter key accidentally cancels file copy可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
linuxmint/nemo#3838 · 1 条评论 · 1 个 reaction ·
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 6 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 6 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
elf_loader: Xtensa ignores the addend of R_XTENSA_GLOB_DAT / R_XTENSA_JMP_SLOT (C++ vtables)可能已有人在做 @diplfranzhoepfinger 今天认领。 未关闭elf_loader
难度 2/5 1-3 小时 新手友好度 72/100
espressif/esp-iot-solution#813 ·
维护者通常 1 天内回复
-
Status: Opened Type: Bug
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
msys2/MSYS2-packages#6919 ·
维护者通常 1 天内回复
-
severity: low
难度 2/5 1-3 小时 新手友好度 76/100
luainkernel/lunatik#2221 ·
维护者通常 1 天内回复