X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fev-application.c;h=53d284f1fad805d28f234b1fe91de26edce896e7;hb=refs%2Ftags%2FEVINCE_0_8_2;hp=f669c140965745753cc108e475e8e98ccdfb6040;hpb=8c83adb77352c7b8457b14efecc254a1d3f20a2e;p=evince.git diff --git a/shell/ev-application.c b/shell/ev-application.c index f669c140..53d284f1 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) { @@ -366,7 +392,9 @@ ev_application_open_uri_at_dest (EvApplication *application, we can restore window size without flickering */ ev_window_open_uri (new_window, uri, dest, mode, unlink_temp_file); + ev_document_fc_mutex_lock (); gtk_widget_show (GTK_WIDGET (new_window)); + ev_document_fc_mutex_unlock (); gtk_window_present_with_time (GTK_WINDOW (new_window), timestamp);