Commit 80fa9267 authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte

GladeApp: add GLADE_ENV_ICON_THEME_PATH

Add env variable to append extra icon theme search paths
parent 5d479663
......@@ -371,8 +371,22 @@ glade_app_init (GladeApp *app)
if (!initialized)
{
gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
pixmaps_dir);
GtkIconTheme *default_icon_theme = gtk_icon_theme_get_default ();
const gchar *path;
gtk_icon_theme_append_search_path (default_icon_theme, pixmaps_dir);
/* Handle extra icon theme paths. Needed for tests to work */
if ((path = g_getenv (GLADE_ENV_ICON_THEME_PATH)))
{
gchar **tokens = g_strsplit (path, ":", -1);
gint i;
for (i = 0; tokens[i]; i++)
gtk_icon_theme_append_search_path (default_icon_theme, tokens[i]);
g_strfreev (tokens);
}
glade_cursor_init ();
......
......@@ -40,6 +40,7 @@ G_BEGIN_DECLS
#define GLADE_ENV_MODULE_PATH "GLADE_MODULE_SEARCH_PATH"
#define GLADE_ENV_TESTING "GLADE_TESTING"
#define GLADE_ENV_PIXMAP_DIR "GLADE_PIXMAP_DIR"
#define GLADE_ENV_ICON_THEME_PATH "GLADE_ICON_THEME_PATH"
#define GLADE_ENV_BUNDLED "GLADE_BUNDLED"
typedef struct _GladeApp GladeApp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment