summaryrefslogtreecommitdiff
path: root/plugins/filebrowser
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-30 16:20:47 +0100
committerStefano Karapetsas <[email protected]>2013-10-30 16:20:47 +0100
commite79794e482337c26cdeb3daff28c12ea8fb2f5d8 (patch)
tree163d27c54f085476eb89f2f31f3fde14d855ba7d /plugins/filebrowser
parent7f0ccea48196a0da9523db3d566ee8020cd742a1 (diff)
downloadpluma-e79794e482337c26cdeb3daff28c12ea8fb2f5d8.tar.bz2
pluma-e79794e482337c26cdeb3daff28c12ea8fb2f5d8.tar.xz
plugins: Add GTK3 support
Diffstat (limited to 'plugins/filebrowser')
-rw-r--r--plugins/filebrowser/pluma-file-browser-utils.c10
-rw-r--r--plugins/filebrowser/pluma-file-browser-view.c4
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.c4
3 files changed, 17 insertions, 1 deletions
diff --git a/plugins/filebrowser/pluma-file-browser-utils.c b/plugins/filebrowser/pluma-file-browser-utils.c
index b8274907..86c64053 100644
--- a/plugins/filebrowser/pluma-file-browser-utils.c
+++ b/plugins/filebrowser/pluma-file-browser-utils.c
@@ -169,8 +169,12 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
/* Add a cancel button */
button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
gtk_widget_show (button);
-
+
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_default (button, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+#endif
gtk_dialog_add_action_widget (GTK_DIALOG (dlg),
button,
GTK_RESPONSE_CANCEL);
@@ -184,7 +188,11 @@ pluma_file_browser_utils_confirmation_dialog (PlumaWindow * window,
}
gtk_widget_show (button);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_widget_set_can_default (button, TRUE);
+#else
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
+#endif
gtk_dialog_add_action_widget (GTK_DIALOG (dlg),
button,
GTK_RESPONSE_OK);
diff --git a/plugins/filebrowser/pluma-file-browser-view.c b/plugins/filebrowser/pluma-file-browser-view.c
index e2488415..eaad61fc 100644
--- a/plugins/filebrowser/pluma-file-browser-view.c
+++ b/plugins/filebrowser/pluma-file-browser-view.c
@@ -22,7 +22,11 @@
#include <string.h>
#include <gio/gio.h>
#include <pluma/pluma-plugin.h>
+#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#include <gdk/gdkkeysyms-compat.h>
+#endif
#include "pluma-file-browser-store.h"
#include "pluma-file-bookmarks-store.h"
diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c
index 22c3c3b0..8e9a0a84 100644
--- a/plugins/filebrowser/pluma-file-browser-widget.c
+++ b/plugins/filebrowser/pluma-file-browser-widget.c
@@ -28,7 +28,11 @@
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
+#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#include <gdk/gdkkeysyms-compat.h>
+#endif
#include <pluma/pluma-utils.h>
#include <pluma/pluma-plugin.h>