为什么 IconTheme 资源路径没有在 get_search_path 上列出

Why doesn't IconTheme resource path get listed on get_search_path

在 Gtk::IconTheme 的 GTKMM 参考文档中,add_resource_path() 的部分说

void Gtk::IconTheme::add_resource_path ( const std::string & path )

Adds a resource path that will be looked at when looking for icons, similar to search paths.

This function should be used to make application-specific icons available as part of the icon theme.

The resources are considered as part of the hicolor icon theme and must be located in subdirectories that are defined in the hicolor icon theme, such as @a path/16x16/actions/run.png. Icons that are directly placed in the resource path instead of a subdirectory are also considered as ultimate fallback.

Since gtkmm 3.14:

Parameters

       path A resource path.

我为此创建了一个变量,下面是我的示例代码:

Glib::RefPtr<Gtk::IconTheme> window_icon_theme = Gtk::IconTheme::create();
window_icon_theme->add_resource_path("/home/keyikedalube/Source/basic-calc/icons")

// get the path lists
std::vector<Glib::ustring> path_lists = window_icon_theme->get_search_path();
for (auto i : path_lists)
        std::cout << i << endl;

输出产量:

/home/keyikedalube/.local/share/icons
/home/keyikedalube/.icons
/usr/share/xfce4/icons
/home/keyikedalube/.local/share/flatpak/exports/share/icons
/var/lib/flatpak/exports/share/icons
/usr/local/share/icons
/usr/share/icons
/usr/share/icons
/usr/share/xfce4/pixmaps
/home/keyikedalube/.local/share/flatpak/exports/share/pixmaps
/var/lib/flatpak/exports/share/pixmaps
/usr/local/share/pixmaps
/usr/share/pixmaps
/usr/share/pixmaps

我的资源路径 /home/keyikedalube/Source/basic-calc/icons 没有出现在列表中

我错过了什么?

引用 "resource" 路径的 API 是在谈论 GResources 内部的路径,而不是文件系统上的路径。