diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-06-20 00:46:09 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-06-30 17:13:04 -0400 |
commit | e9ac1bb4767b7139658fc2f5548c65a7baabb46b (patch) | |
tree | 862945bb60a4f03f9c8bdb5bbf379b709385df31 /gtk/gtkicontheme.c | |
parent | f6da4efd47064f68de068328edee86ff730713a0 (diff) | |
download | gtk+-e9ac1bb4767b7139658fc2f5548c65a7baabb46b.tar.gz |
Make gtk_icon_theme_add_resource_path public API
This makes it possible to look up icons in resources using
the icon theme api, and should be used as a replacement
for installing icons below $pkgdatadir/icons and adding
that location to the search path.
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r-- | gtk/gtkicontheme.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index acd6ff36ed..f715af8acb 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -1001,6 +1001,25 @@ gtk_icon_theme_prepend_search_path (GtkIconTheme *icon_theme, do_theme_change (icon_theme); } +/** + * gtk_icon_theme_add_resource_path: + * @icon_theme: a #GtkIconTheme + * @path: a resource 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 `@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: 3.14 + */ void gtk_icon_theme_add_resource_path (GtkIconTheme *icon_theme, const gchar *path) |