summaryrefslogtreecommitdiff
path: root/pluma/pluma-print-preview.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-30 00:56:56 +0100
committerStefano Karapetsas <[email protected]>2013-10-30 00:56:56 +0100
commit7f0ccea48196a0da9523db3d566ee8020cd742a1 (patch)
tree4a66f87edcc70ca3949c750148df218c9a41ba28 /pluma/pluma-print-preview.c
parent5f87f646777bf5b09610bbc6eed8fafd007f34c6 (diff)
downloadpluma-7f0ccea48196a0da9523db3d566ee8020cd742a1.tar.bz2
pluma-7f0ccea48196a0da9523db3d566ee8020cd742a1.tar.xz
pluma: Add GTK3 support
Diffstat (limited to 'pluma/pluma-print-preview.c')
-rw-r--r--pluma/pluma-print-preview.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/pluma/pluma-print-preview.c b/pluma/pluma-print-preview.c
index c37d85fa..350f7367 100644
--- a/pluma/pluma-print-preview.c
+++ b/pluma/pluma-print-preview.c
@@ -34,8 +34,11 @@
#include <math.h>
#include <stdlib.h>
#include <glib/gi18n.h>
-#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#include <gdk/gdkkeysyms-compat.h>
+#endif
#include <cairo-pdf.h>
@@ -956,7 +959,11 @@ create_preview_layout (PlumaPrintPreview *preview)
GDK_BUTTON_PRESS_MASK |
GDK_KEY_PRESS_MASK);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_focus (priv->layout, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (priv->layout, GTK_CAN_FOCUS);
+#endif
g_signal_connect (priv->layout,
"key-press-event",