Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-application.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-04-08 13:10:00 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2009-04-08 13:10:00 (GMT)
commit5adc9f2e1a99e29b8a761388e17c08a6e4d79d5d (patch)
tree7f517616d8a21ef5184b7378915e1813c003b35a /shell/ev-application.c
parenta281d3cc1f64de07b4b8336c580ad4f5fcb861ed (diff)
Move EvPageAction and EvStockIcons from shell to a new internal library
2009-04-08 Carlos Garcia Campos <carlosgc@gnome.org> * configure.ac: * Makefile.am: * po/POTFILES.in: * shell/Makefile.am: * shell/ev-page-action-widget.[ch]: * shell/ev-page-action.[ch]: * shell/ev-stock-icons.[ch]: * shell/ev-application.c: * shell/main.c: * libmisc/Makefile.am: * libmisc/ev-page-action-widget.[ch]: * libmisc/ev-page-action.[ch]: * libmisc/ev-stock-icons.[ch]: Move EvPageAction and EvStockIcons from shell to a new internal library (libevmisc) that will be used by the evince previewer too. svn path=/trunk/; revision=3577
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r--shell/ev-application.c43
1 files changed, 6 insertions, 37 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 6cd5a5b..8ce0899 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -40,6 +40,7 @@
#include "ev-file-helpers.h"
#include "ev-metadata-manager.h"
#include "ev-utils.h"
+#include "ev-stock-icons.h"
#ifdef ENABLE_DBUS
#include "ev-media-player-keys.h"
@@ -50,8 +51,7 @@
#include "ev-application-service.h"
#endif
-static void ev_application_add_icon_path_for_screen (GdkScreen *screen);
-static void ev_application_save_print_settings (EvApplication *application);
+static void ev_application_save_print_settings (EvApplication *application);
struct _EvApplication {
GObject base_instance;
@@ -454,9 +454,9 @@ ev_application_open_window (EvApplication *application,
}
if (screen) {
+ ev_stock_icons_add_icons_path_for_screen (screen);
gtk_window_set_screen (GTK_WINDOW (new_window), screen);
}
- ev_application_add_icon_path_for_screen (screen);
if (!GTK_WIDGET_REALIZED (new_window))
gtk_widget_realize (new_window);
@@ -545,37 +545,6 @@ ev_application_get_uri_window (EvApplication *application, const char *uri)
return uri_window;
}
-static void
-ev_application_add_icon_path_for_screen (GdkScreen *screen)
-{
- GtkIconTheme *icon_theme;
-
- icon_theme = screen ? gtk_icon_theme_get_for_screen (screen) : gtk_icon_theme_get_default ();
- 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);
- }
-}
-
/**
* ev_application_open_uri_at_dest:
* @application: The instance of the application.
@@ -601,8 +570,6 @@ ev_application_open_uri_at_dest (EvApplication *application,
g_return_if_fail (uri != NULL);
- ev_application_add_icon_path_for_screen (screen);
-
new_window = ev_application_get_uri_window (application, uri);
if (new_window == NULL) {
@@ -613,8 +580,10 @@ ev_application_open_uri_at_dest (EvApplication *application,
new_window = EV_WINDOW (ev_window_new ());
}
- if (screen)
+ if (screen) {
+ ev_stock_icons_add_icons_path_for_screen (screen);
gtk_window_set_screen (GTK_WINDOW (new_window), screen);
+ }
/* We need to load uri before showing the window, so
we can restore window size without flickering */