summaryrefslogtreecommitdiff
path: root/src/file-manager
diff options
context:
space:
mode:
Diffstat (limited to 'src/file-manager')
-rw-r--r--src/file-manager/fm-list-view.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index 46f6c143..999254d0 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -665,6 +665,9 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
FMListView *view;
GtkTreeView *tree_view;
GtkTreePath *path;
+#if !GTK_CHECK_VERSION(3, 0, 0)
+ GtkWidget *caja_window;
+#endif
gboolean call_parent;
GtkTreeSelection *selection;
GtkWidgetClass *tree_view_class;
@@ -680,6 +683,14 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
tree_view_class = GTK_WIDGET_GET_CLASS (tree_view);
selection = gtk_tree_view_get_selection (tree_view);
+#if GTK_CHECK_VERSION(3, 0, 0)
+ /* Don't handle extra mouse buttons here */
+ if (event->button > 5)
+ {
+ return FALSE;
+ }
+#endif
+
if (event->window != gtk_tree_view_get_bin_window (tree_view))
{
return FALSE;
@@ -849,6 +860,13 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
}
}
+#if !GTK_CHECK_VERSION(3, 0, 0)
+ if (event->button > 5) {
+ caja_window = GTK_WIDGET (fm_directory_view_get_caja_window (FM_DIRECTORY_VIEW (view)));
+ call_parent = !caja_navigation_window_button_press_event (caja_window, event);
+ }
+#endif
+
if (call_parent)
{
tree_view_class->button_press_event (widget, event);
@@ -887,10 +905,22 @@ button_press_callback (GtkWidget *widget, GdkEventButton *event, gpointer callba
view->details->double_click_path[1] = view->details->double_click_path[0];
view->details->double_click_path[0] = NULL;
}
+#if GTK_CHECK_VERSION(3, 0, 0)
/* Deselect if people click outside any row. It's OK to
let default code run; it won't reselect anything. */
gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (tree_view));
tree_view_class->button_press_event (widget, event);
+#else
+ if (event->button > 5) {
+ caja_window = GTK_WIDGET (fm_directory_view_get_caja_window (FM_DIRECTORY_VIEW (view)));
+ call_parent = !caja_navigation_window_button_press_event (caja_window, event);
+ } else {
+ /* Deselect if people click outside any row. It's OK to
+ let default code run; it won't reselect anything. */
+ gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (tree_view));
+ tree_view_class->button_press_event (widget, event);
+ }
+#endif
if (event->button == 3)
{