#include <libview/ev-page-cache.h>
#include <libview/ev-view.h>
#include <libview/ev-view-type-builtins.h>
+#include <libview/ev-stock-icons.h>
#undef __EV_EVINCE_VIEW_H_INSIDE__
ev-page-action.c \
ev-page-action.h \
ev-page-action-widget.c \
- ev-page-action-widget.h \
- ev-stock-icons.c \
- ev-stock-icons.h
+ ev-page-action-widget.h
libevmisc_la_CFLAGS = \
-DDATADIR=\"$(pkgdatadir)\" \
ev-jobs.h \
ev-job-scheduler.h \
ev-page-cache.h \
+ ev-stock-icons.h \
ev-view.h \
ev-view-type-builtins.h
ev-job-scheduler.c \
ev-page-cache.c \
ev-pixbuf-cache.c \
+ ev-stock-icons.c \
ev-timeline.c \
ev-transition-animation.c \
ev-view.c \
$(INST_H_FILES)
libevview_la_CPPFLAGS = \
+ -DDATADIR=\"$(pkgdatadir)\" \
-DG_LOG_DOMAIN=\"EvinceView\" \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DEVINCE_COMPILATION \
#include <config.h>
#include <gtk/gtk.h>
-#include <gdk/gdk.h>
#include "ev-stock-icons.h"
static gchar *ev_icons_path;
+static void
+ev_stock_icons_add_icons_path_for_screen (GdkScreen *screen)
+{
+ GtkIconTheme *icon_theme;
+
+ g_return_if_fail (ev_icons_path != NULL);
+
+ 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;
+
+ /* GtkIconTheme will then look in Evince custom hicolor dir
+ * for icons as well as the standard search paths
+ */
+ 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_strfreev (path);
+ }
+}
+
/**
* ev_stock_icons_init:
*
g_object_unref (G_OBJECT (factory));
- ev_stock_icons_add_icons_path ();
+ ev_stock_icons_add_icons_path_for_screen (gdk_screen_get_default ());
}
void
-ev_stock_icons_shutdown (void)
+ev_stock_icons_set_screen (GdkScreen *screen)
{
- g_free (ev_icons_path);
+ g_return_if_fail (GDK_IS_SCREEN (screen));
+
+ ev_stock_icons_add_icons_path_for_screen (screen);
}
void
-ev_stock_icons_add_icons_path_for_screen (GdkScreen *screen)
+ev_stock_icons_shutdown (void)
{
- GtkIconTheme *icon_theme;
-
- g_return_if_fail (ev_icons_path != NULL);
-
- 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;
-
- /* GtkIconTheme will then look in Evince custom hicolor dir
- * for icons as well as the standard search paths
- */
- 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_strfreev (path);
- }
+ g_free (ev_icons_path);
}
void
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
+#if !defined (__EV_EVINCE_VIEW_H_INSIDE__) && !defined (EVINCE_COMPILATION)
+#error "Only <evince-view.h> can be included directly."
+#endif
+
#ifndef __EV_STOCK_ICONS_H__
#define __EV_STOCK_ICONS_H__
-#include <glib.h>
+#include <gdk/gdk.h>
G_BEGIN_DECLS
/* Evince stock icons */
#define EV_STOCK_ZOOM "zoom"
-#define EV_STOCK_ZOOM_PAGE "zoom-fit-page"
-#define EV_STOCK_ZOOM_WIDTH "zoom-fit-width"
+#define EV_STOCK_ZOOM_PAGE "zoom-fit-page"
+#define EV_STOCK_ZOOM_WIDTH "zoom-fit-width"
#define EV_STOCK_VIEW_DUAL "view-page-facing"
#define EV_STOCK_VIEW_CONTINUOUS "view-page-continuous"
#define EV_STOCK_ROTATE_LEFT "object-rotate-left"
#define EV_STOCK_RUN_PRESENTATION "x-office-presentation"
#define EV_STOCK_VISIBLE "eye"
-void ev_stock_icons_init (void);
-void ev_stock_icons_shutdown (void);
-void ev_stock_icons_add_icons_path (void);
-void ev_stock_icons_add_icons_path_for_screen (GdkScreen *screen);
+void ev_stock_icons_init (void);
+void ev_stock_icons_shutdown (void);
+void ev_stock_icons_set_screen (GdkScreen *screen);
G_END_DECLS
#include <gtk/gtkunixprint.h>
#include <glib/gi18n.h>
#include <evince-view.h>
-#include "ev-stock-icons.h"
#include "ev-page-action.h"
#include "ev-previewer-window.h"
#include <glib/gi18n.h>
#include <evince-document.h>
#include <evince-view.h>
-#include "ev-stock-icons.h"
#include "ev-previewer-window.h"
}
if (screen) {
- ev_stock_icons_add_icons_path_for_screen (screen);
+ ev_stock_icons_set_screen (screen);
gtk_window_set_screen (GTK_WINDOW (new_window), screen);
}
}
if (screen) {
- ev_stock_icons_add_icons_path_for_screen (screen);
+ ev_stock_icons_set_screen (screen);
gtk_window_set_screen (GTK_WINDOW (new_window), screen);
}