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:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2007-05-09 16:26:44 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@src.gnome.org>2007-05-09 16:26:44 (GMT)
commit122c227b07387a942e4379eef8132fe6b6e92e80 (patch)
treee563df6100a1aa8eea5de74593c6aea1db507ba8 /shell/ev-application.c
parent33bf66b8f4e2d719c847af1c177c71b5173b49aa (diff)
Add app-specific icons to our icon theme. Fixes bug #425508.
2007-05-09 Nickolay V. Shmyrev <nshmyrev@yandex.ru> * shell/ev-application.c: (ev_application_open_window), (ev_application_add_icon_path_for_screen), (ev_application_open_uri_at_dest): * shell/ev-navigation-action-widget.c: (popup_menu_under_arrow): * shell/ev-navigation-action.c: (build_menu): Add app-specific icons to our icon theme. Fixes bug #425508. svn path=/trunk/; revision=2444
Diffstat (limited to 'shell/ev-application.c')
-rw-r--r--shell/ev-application.c52
1 files changed, 31 insertions, 21 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 1d21c2c..ce67ebb 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -45,6 +45,8 @@
#include <string.h>
+static void ev_application_add_icon_path_for_screen (GdkScreen *screen);
+
struct _EvApplication {
GObject base_instance;
@@ -379,6 +381,7 @@ ev_application_open_window (EvApplication *application,
if (screen) {
gtk_window_set_screen (GTK_WINDOW (new_window), screen);
}
+ ev_application_add_icon_path_for_screen (screen);
gtk_widget_show (new_window);
@@ -458,30 +461,11 @@ ev_application_get_uri_window (EvApplication *application, const char *uri)
return uri_window;
}
-/**
- * ev_application_open_uri_at_dest:
- * @application: The instance of the application.
- * @uri: The uri to be opened.
- * @screen: Thee screen where the link will be shown.
- * @dest: The #EvLinkDest of the document.
- * @mode: The run mode of the window.
- * @unlink_temp_file: The unlink_temp_file option value.
- * @timestamp: Current time value.
- */
-void
-ev_application_open_uri_at_dest (EvApplication *application,
- const char *uri,
- GdkScreen *screen,
- EvLinkDest *dest,
- EvWindowRunMode mode,
- gboolean unlink_temp_file,
- guint timestamp)
+static void
+ev_application_add_icon_path_for_screen (GdkScreen *screen)
{
- 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;
@@ -506,6 +490,32 @@ ev_application_open_uri_at_dest (EvApplication *application,
g_free (ev_icons_path);
g_strfreev (path);
}
+}
+
+/**
+ * ev_application_open_uri_at_dest:
+ * @application: The instance of the application.
+ * @uri: The uri to be opened.
+ * @screen: Thee screen where the link will be shown.
+ * @dest: The #EvLinkDest of the document.
+ * @mode: The run mode of the window.
+ * @unlink_temp_file: The unlink_temp_file option value.
+ * @timestamp: Current time value.
+ */
+void
+ev_application_open_uri_at_dest (EvApplication *application,
+ const char *uri,
+ GdkScreen *screen,
+ EvLinkDest *dest,
+ EvWindowRunMode mode,
+ gboolean unlink_temp_file,
+ guint timestamp)
+{
+ EvWindow *new_window;
+
+ g_return_if_fail (uri != NULL);
+
+ ev_application_add_icon_path_for_screen (screen);
new_window = ev_application_get_uri_window (application, uri);