diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2007-01-19 18:14:36 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2007-01-19 18:14:36 (GMT) |
commit | 5573596668e24c8d47da896733b8e0b8ee23533f (patch) | |
tree | e1df5c7dd1a3a3819c6b2720706e735c18dddff4 /shell/ev-application.c | |
parent | fbabc13c05e8374447a6299527017419398edc55 (diff) |
Use icon theme associated with the window screen rather than default.
2007-01-19 Carlos Garcia Campos <carlosgc@gnome.org>
* shell/ev-stock-icons.c: (ev_stock_icons_init):
* shell/ev-application.c: (ev_application_open_uri_at_dest):
Use icon theme associated with the window screen rather than default.
svn path=/trunk/; revision=2238
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r-- | shell/ev-application.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c index 98bbd3e..53d284f 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -345,10 +345,36 @@ ev_application_open_uri_at_dest (EvApplication *application, gboolean unlink_temp_file, guint timestamp) { - EvWindow *new_window; + EvWindow *new_window; + GtkIconTheme *icon_theme; g_return_if_fail (uri != NULL); + icon_theme = gtk_icon_theme_get_for_screen (screen); + if (icon_theme) { + gchar **path = NULL; + gint n_paths; + gint i; + gchar *ev_icons_path; + + /* GtkIconTheme will then look in Evince custom hicolor dir + * for icons as well as the standard search paths + */ + ev_icons_path = g_build_filename (DATADIR, "icons", NULL); + gtk_icon_theme_get_search_path (icon_theme, &path, &n_paths); + for (i = n_paths - 1; i >= 0; i--) { + if (g_ascii_strcasecmp (ev_icons_path, path[i]) == 0) + break; + } + + if (i < 0) + gtk_icon_theme_append_search_path (icon_theme, + ev_icons_path); + + g_free (ev_icons_path); + g_strfreev (path); + } + new_window = ev_application_get_uri_window (application, uri); if (new_window == NULL) { |