+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.
+
2009-04-08 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* backend/tiff/tiff2ps.c (tiff2ps_context_new):
Fixes memory leak. Bug #578285.
-
+
2009-04-06 Carlos Garcia Campos <carlosgc@gnome.org>
* libview/ev-view.[ch]: (ev_view_set_zoom),
Move ev_view_update_view_size() from libview to ev-window again
and make sure the view is not redrawn when calling
ev_view_set_zoom more than once with the same zoom scale.
-
+
2009-04-05 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* shell/ev-window.c:
libdocument \
backend \
libview \
+ libmisc \
properties \
shell \
po \
help/reference/shell/version.xml
libdocument/Makefile
libdocument/ev-version.h
+libmisc/Makefile
libview/Makefile
Makefile
po/Makefile.in
--- /dev/null
+noinst_LTLIBRARIES = libevmisc.la
+
+libevmisc_la_SOURCES = \
+ 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
+
+libevmisc_la_CFLAGS = \
+ -DDATADIR=\"$(pkgdatadir)\" \
+ $(SHELL_CORE_CFLAGS) \
+ $(WARNING_CFLAGS) \
+ $(DISABLE_DEPRECATED)
\ No newline at end of file
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#include "ev-document-links.h"
-#include "ev-marshal.h"
+#include <evince-document.h>
#include "ev-page-action.h"
#include "ev-page-action-widget.h"
-#include "ev-page-cache.h"
-#include "ev-window.h"
/* Widget we pass back */
static void ev_page_action_widget_init (EvPageActionWidget *action_widget);
*
*/
-#include "ev-page-cache.h"
+#include <evince-view.h>
#include <gtk/gtk.h>
#include <gtk/gtk.h>
#include "ev-page-action.h"
-#include "ev-page-cache.h"
-#include "ev-window.h"
-#include "ev-document-links.h"
#include "ev-page-action-widget.h"
-#include "ev-marshal.h"
struct _EvPageActionPrivate
{
#include <gtk/gtk.h>
-#include <ev-document.h>
-#include "ev-link.h"
+#include <evince-document.h>
G_BEGIN_DECLS
* Author:
* Martin Kretzschmar <Martin.Kretzschmar@inf.tu-dresden.de>
*
- * GPdf is free software; you can redistribute it and/or modify it
+ * Evince is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * GPdf is distributed in the hope that it will be useful, but WITHOUT
+ * Evince is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
{ EV_STOCK_VISIBLE, "eye"}
};
+static gchar *ev_icons_path;
+
/**
* ev_stock_icons_init:
*
GtkIconSource *source;
gint i;
+ ev_icons_path = g_build_filename (DATADIR, "icons", NULL);
+
factory = gtk_icon_factory_new ();
gtk_icon_factory_add_default (factory);
gtk_icon_source_free (source);
g_object_unref (G_OBJECT (factory));
+
+ ev_stock_icons_add_icons_path ();
+}
+
+void
+ev_stock_icons_shutdown (void)
+{
+ g_free (ev_icons_path);
+}
+
+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);
+ }
+}
+
+void
+ev_stock_icons_add_icons_path (void)
+{
+ ev_stock_icons_add_icons_path_for_screen (gdk_screen_get_default ());
}
* Author:
* Martin Kretzschmar <Martin.Kretzschmar@inf.tu-dresden.de>
*
- * GPdf is free software; you can redistribute it and/or modify it
+ * Evince is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
- * GPdf is distributed in the hope that it will be useful, but WITHOUT
+ * Evince is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
#define EV_STOCK_RUN_PRESENTATION "x-office-presentation"
#define EV_STOCK_VISIBLE "eye"
-void ev_stock_icons_init (void);
+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);
G_END_DECLS
data/evince.schemas.in
properties/ev-properties-main.c
properties/ev-properties-view.c
+libmisc/ev-page-action.c
+libmisc/ev-page-action-widget.c
libview/ev-jobs.c
libview/ev-view-accessible.c
libview/ev-view.c
shell/ev-navigation-action.c
shell/ev-navigation-action-widget.c
shell/ev-open-recent-action.c
-shell/ev-page-action.c
-shell/ev-page-action-widget.c
shell/ev-password-view.c
shell/ev-print-operation.c
shell/ev-properties-dialog.c
-I$(top_builddir)/libdocument \
-I$(top_srcdir)/libview \
-I$(top_builddir)/libview \
+ -I$(top_srcdir)/libmisc \
-I$(top_srcdir)/properties \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DGNOMEICONDIR=\""$(datadir)/pixmaps"\" \
ev-navigation-action.h \
ev-navigation-action-widget.c \
ev-navigation-action-widget.h \
- ev-page-action.c \
- ev-page-action.h \
- ev-page-action-widget.c \
- ev-page-action-widget.h \
ev-password-view.h \
ev-password-view.c \
ev-print-operation.h \
ev-sidebar-page.h \
ev-sidebar-thumbnails.c \
ev-sidebar-thumbnails.h \
- ev-stock-icons.c \
- ev-stock-icons.h \
main.c
evince_LDADD= \
$(top_builddir)/properties/libevproperties.la \
$(top_builddir)/libdocument/libevdocument.la \
$(top_builddir)/libview/libevview.la \
+ $(top_builddir)/libmisc/libevmisc.la \
$(SHELL_LIBS)
BUILT_SOURCES = ev-marshal.h ev-marshal.c
#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"
#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;
}
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);
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.
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) {
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 */
gtk_main ();
ev_shutdown ();
+ ev_stock_icons_shutdown ();
return 0;
}