summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eom-plugin-engine.c20
-rw-r--r--src/eom-print.c3
-rw-r--r--src/eom-window.c5
-rw-r--r--src/main.c8
4 files changed, 36 insertions, 0 deletions
diff --git a/src/eom-plugin-engine.c b/src/eom-plugin-engine.c
index dc434f2..5b93de3 100644
--- a/src/eom-plugin-engine.c
+++ b/src/eom-plugin-engine.c
@@ -34,7 +34,11 @@
#include <glib/gi18n.h>
#include <glib.h>
#include <gio/gio.h>
+#ifdef HAVE_GIREPOSITORY_2
+#include <girepository/girepository.h>
+#else
#include <girepository.h>
+#endif
#define USER_EOM_PLUGINS_LOCATION "plugins/"
@@ -87,25 +91,41 @@ eom_plugin_engine_new (void)
private_path = g_build_filename (LIBDIR, "girepository-1.0", NULL);
/* This should be moved to libpeas */
+#ifdef HAVE_GIREPOSITORY_2
+ if (gi_repository_require (gi_repository_dup_default (),
+ "Peas", "1.0", 0, &error) == NULL)
+#else
if (g_irepository_require (g_irepository_get_default (),
"Peas", "1.0", 0, &error) == NULL)
+#endif
{
g_warning ("Error loading Peas typelib: %s\n",
error->message);
g_clear_error (&error);
}
+#ifdef HAVE_GIREPOSITORY_2
+ if (gi_repository_require (gi_repository_dup_default (),
+ "PeasGtk", "1.0", 0, &error) == NULL)
+#else
if (g_irepository_require (g_irepository_get_default (),
"PeasGtk", "1.0", 0, &error) == NULL)
+#endif
{
g_warning ("Error loading PeasGtk typelib: %s\n",
error->message);
g_clear_error (&error);
}
+#ifdef HAVE_GIREPOSITORY_2
+ if (gi_repository_require_private (gi_repository_dup_default (),
+ private_path, "Eom", "1.0", 0,
+ &error) == NULL)
+#else
if (g_irepository_require_private (g_irepository_get_default (),
private_path, "Eom", "1.0", 0,
&error) == NULL)
+#endif
{
g_warning ("Error loading Eom typelib: %s\n",
error->message);
diff --git a/src/eom-print.c b/src/eom-print.c
index 4d20a29..cdd3f7e 100644
--- a/src/eom-print.c
+++ b/src/eom-print.c
@@ -514,6 +514,9 @@ eom_print_set_print_settings (GtkPrintSettings *print_settings)
key_file = g_key_file_new ();
}
+ /* Clear n-copies settings since we do not want to persist that one */
+ gtk_print_settings_unset (print_settings, GTK_PRINT_SETTINGS_N_COPIES);
+
gtk_print_settings_to_key_file (print_settings, key_file, EOM_PRINT_SETTINGS_GROUP);
eom_print_save_key_file (key_file);
diff --git a/src/eom-window.c b/src/eom-window.c
index 3d572f9..e24738b 100644
--- a/src/eom-window.c
+++ b/src/eom-window.c
@@ -5099,14 +5099,19 @@ eom_window_button_press (GtkWidget *widget, GdkEventButton *event)
EomWindow *window = EOM_WINDOW (widget);
gint result = FALSE;
+ /* We currently can't tell whether the old button codes (6, 7) are
+ * still in use. So we keep them in addition to the new ones (8, 9)
+ */
if (event->type == GDK_BUTTON_PRESS) {
switch (event->button) {
case 6:
+ case 8:
eom_thumb_view_select_single (EOM_THUMB_VIEW (window->priv->thumbview),
EOM_THUMB_VIEW_SELECT_LEFT);
result = TRUE;
break;
case 7:
+ case 9:
eom_thumb_view_select_single (EOM_THUMB_VIEW (window->priv->thumbview),
EOM_THUMB_VIEW_SELECT_RIGHT);
result = TRUE;
diff --git a/src/main.c b/src/main.c
index 94487d8..f11618d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -27,8 +27,12 @@
#include "config.h"
#endif
#ifdef HAVE_INTROSPECTION
+#ifdef HAVE_GIREPOSITORY_2
+#include <girepository/girepository.h>
+#else
#include <girepository.h>
#endif
+#endif
#include "eom-session.h"
#include "eom-debug.h"
@@ -116,8 +120,12 @@ main (int argc, char **argv)
* Using gtk_get_option_group here initializes gtk during parsing */
g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
#ifdef HAVE_INTROSPECTION
+#ifdef HAVE_GIREPOSITORY_2
+ g_option_context_add_group (ctx, gi_repository_get_option_group ());
+#else
g_option_context_add_group (ctx, g_irepository_get_option_group ());
#endif
+#endif
if (!g_option_context_parse (ctx, &argc, &argv, &error)) {
gchar *help_msg;