summaryrefslogtreecommitdiff
path: root/gtk/gtkapplication.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2014-07-07 14:32:10 -0400
committerRyan Lortie <desrt@desrt.ca>2014-07-07 14:46:27 -0400
commit687a84692393cd26db85dbda7d78a2d3bc325ed7 (patch)
treee2d52feb16d8d7e7471fd8ea1b0731a96185c8a4 /gtk/gtkapplication.c
parent868ee07f492d60e87bcf4b4aa67b27de9e5ad4ea (diff)
downloadgtk+-687a84692393cd26db85dbda7d78a2d3bc325ed7.tar.gz
GtkAppliation: setup icon theme resource path
If we have a resource base path for the application, set up an icon theme search path based on it (within the default icon theme). https://bugzilla.gnome.org/show_bug.cgi?id=722092
Diffstat (limited to 'gtk/gtkapplication.c')
-rw-r--r--gtk/gtkapplication.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 27a513a2fa..c79f80ea05 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -36,6 +36,7 @@
#include "gtkmain.h"
#include "gtkrecentmanager.h"
#include "gtkaccelmapprivate.h"
+#include "gtkicontheme.h"
#include "gtkbuilder.h"
#include "gtkintl.h"
@@ -514,6 +515,17 @@ gtk_application_load_resources (GtkApplication *application)
if (base_path == NULL)
return;
+ /* Expand the icon search path */
+ {
+ GtkIconTheme *default_theme;
+ gchar *iconspath;
+
+ default_theme = gtk_icon_theme_get_default ();
+ iconspath = g_strconcat (base_path, "/icons", NULL);
+ gtk_icon_theme_add_resource_path (default_theme, iconspath);
+ g_free (iconspath);
+ }
+
/* Load the menus */
{
gchar *menuspath;