summaryrefslogtreecommitdiff
path: root/plugins/filebrowser
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/filebrowser')
-rw-r--r--plugins/filebrowser/Makefile.am4
-rw-r--r--plugins/filebrowser/pluma-file-browser-plugin.c1
-rw-r--r--plugins/filebrowser/pluma-file-browser-store.c2
-rw-r--r--plugins/filebrowser/pluma-file-browser-utils.c10
-rw-r--r--plugins/filebrowser/pluma-file-browser-view.c10
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.c14
6 files changed, 37 insertions, 4 deletions
diff --git a/plugins/filebrowser/Makefile.am b/plugins/filebrowser/Makefile.am
index cb03c183..2124904c 100644
--- a/plugins/filebrowser/Makefile.am
+++ b/plugins/filebrowser/Makefile.am
@@ -2,7 +2,7 @@
plugindir = $(PLUMA_PLUGINS_LIBS_DIR)
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(top_srcdir) \
$(PLUMA_CFLAGS) \
$(WARN_CFLAGS) \
@@ -76,7 +76,7 @@ gsettings_SCHEMAS = org.mate.pluma.plugins.filebrowser.gschema.xml
EXTRA_DIST = \
$(ui_DATA) \
$(plugin_in_files) \
- $(gsettings_SCHEMAS_in_in) \
+ $(gsettings_SCHEMAS).in.in \
pluma-file-browser-enum-types.h.template \
pluma-file-browser-enum-types.c.template \
pluma-file-browser-enum-register.c.template \
diff --git a/plugins/filebrowser/pluma-file-browser-plugin.c b/plugins/filebrowser/pluma-file-browser-plugin.c
index bce64c69..69b1e185 100644
--- a/plugins/filebrowser/pluma-file-browser-plugin.c
+++ b/plugins/filebrowser/pluma-file-browser-plugin.c
@@ -306,6 +306,7 @@ on_confirm_trash_changed (GSettings *settings,
PlumaFileBrowserPluginData *data;
gboolean enable = FALSE;
+ data = (PlumaFileBrowserPluginData *)(user_data);
enable = g_settings_get_boolean (settings, key);
data->confirm_trash = enable;
diff --git a/plugins/filebrowser/pluma-file-browser-store.c b/plugins/filebrowser/pluma-file-browser-store.c
index 6f611105..ba45feff 100644
--- a/plugins/filebrowser/pluma-file-browser-store.c
+++ b/plugins/filebrowser/pluma-file-browser-store.c
@@ -2480,6 +2480,8 @@ set_virtual_root_from_node (PlumaFileBrowserStore * model,
GSList *copy;
GtkTreePath *empty = NULL;
+ g_assert (node != NULL);
+
prev = node;
next = prev->parent;
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..6092248c 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"
@@ -319,7 +323,7 @@ set_click_policy_property (PlumaFileBrowserView *obj,
obj->priv->hover_path = NULL;
}
- if (GTK_WIDGET_REALIZED (GTK_WIDGET (obj))) {
+ if (gtk_widget_get_realized (GTK_WIDGET (obj))) {
win = gtk_widget_get_window (GTK_WIDGET (obj));
gdk_window_set_cursor (win, NULL);
@@ -638,7 +642,11 @@ key_press_event (GtkWidget *widget,
handled = FALSE;
break;
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ if (!gtk_widget_has_focus (widget)) {
+#else
if (!GTK_WIDGET_HAS_FOCUS (widget)) {
+#endif
handled = FALSE;
break;
}
diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c
index f2c54fe9..6e6be102 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>
@@ -993,7 +997,11 @@ create_toolbar (PlumaFileBrowserWidget * obj,
"DirectoryPrevious");
g_object_set (action, "is_important", TRUE, "short_label",
_("Previous location"), NULL);
+#if GTK_CHECK_VERSION (2, 16, 0)
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (widget), action);
+#else
gtk_action_connect_proxy (action, widget);
+#endif
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (widget), 0);
/* Next directory menu tool item */
@@ -1014,7 +1022,11 @@ create_toolbar (PlumaFileBrowserWidget * obj,
"DirectoryNext");
g_object_set (action, "is_important", TRUE, "short_label",
_("Previous location"), NULL);
+#if GTK_CHECK_VERSION (2, 16, 0)
+ gtk_activatable_set_related_action (GTK_ACTIVATABLE (widget), action);
+#else
gtk_action_connect_proxy (action, widget);
+#endif
gtk_toolbar_insert (GTK_TOOLBAR (toolbar), GTK_TOOL_ITEM (widget), 1);
gtk_box_pack_start (GTK_BOX (obj), toolbar, FALSE, FALSE, 0);
@@ -1640,6 +1652,8 @@ jump_to_location (PlumaFileBrowserWidget * obj, GList * item,
obj->priv->changing_location = TRUE;
+ g_assert (obj->priv->current_location != NULL);
+
loc = (Location *) (obj->priv->current_location->data);
/* Set the new root + virtual root */