summaryrefslogtreecommitdiff
path: root/libdocument/ev-attachment.c
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-11-23 18:15:54 +0300
committermonsta <[email protected]>2016-11-23 18:15:54 +0300
commitae5f4711a21508a70d7123dbc0efb610af1289a2 (patch)
tree54d4a9de3b092aa772ed8799fcf30e11e19ff93f /libdocument/ev-attachment.c
parent7884bbe50fe8b8c26e68b8077c18047861c2dd0c (diff)
downloadatril-ae5f4711a21508a70d7123dbc0efb610af1289a2.tar.bz2
atril-ae5f4711a21508a70d7123dbc0efb610af1289a2.tar.xz
move to GTK+3 (>= 3.14), drop GTK+2 code and --with-gtk build option
and require caja >= 1.17.1
Diffstat (limited to 'libdocument/ev-attachment.c')
-rw-r--r--libdocument/ev-attachment.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/libdocument/ev-attachment.c b/libdocument/ev-attachment.c
index 59af21ab..ec8bd35a 100644
--- a/libdocument/ev-attachment.c
+++ b/libdocument/ev-attachment.c
@@ -20,7 +20,7 @@
#include <config.h>
#include <glib/gi18n-lib.h>
#include <glib/gstdio.h>
-#include <gtk/gtk.h>
+#include <gdk/gdk.h>
#include "ev-file-helpers.h"
#include "ev-attachment.h"
@@ -347,12 +347,8 @@ ev_attachment_launch_app (EvAttachment *attachment,
{
gboolean result;
GList *files = NULL;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkAppLaunchContext *context;
GdkDisplay *display;
-#else
- GAppLaunchContext *context = NULL;
-#endif
GError *ioerror = NULL;
g_assert (G_IS_FILE (attachment->priv->tmp_file));
@@ -360,7 +356,6 @@ ev_attachment_launch_app (EvAttachment *attachment,
files = g_list_prepend (files, attachment->priv->tmp_file);
-#if GTK_CHECK_VERSION (3, 0, 0)
display = screen ? gdk_screen_get_display (screen) : gdk_display_get_default ();
context = gdk_display_get_app_launch_context (display);
gdk_app_launch_context_set_screen (context, screen);
@@ -370,17 +365,6 @@ ev_attachment_launch_app (EvAttachment *attachment,
G_APP_LAUNCH_CONTEXT (context),
&ioerror);
g_object_unref (context);
-#else
- context = G_APP_LAUNCH_CONTEXT (gdk_app_launch_context_new ());
- gdk_app_launch_context_set_screen (GDK_APP_LAUNCH_CONTEXT (context), screen);
- gdk_app_launch_context_set_timestamp (GDK_APP_LAUNCH_CONTEXT (context), timestamp);
-
- result = g_app_info_launch (attachment->priv->app, files,
- context, &ioerror);
-
- if (context)
- g_object_unref (context);
-#endif
if (!result) {
g_set_error (error,