[gthumb] fixed drag and drop with the middle mouse button
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] fixed drag and drop with the middle mouse button
- Date: Tue, 7 Feb 2012 19:08:11 +0000 (UTC)
commit 507b7174efebb25f305b4bddaaa27815bf8edaa7
Author: Paolo Bacchilega <paobac src gnome org>
Date: Tue Feb 7 20:07:09 2012 +0100
fixed drag and drop with the middle mouse button
gthumb/gth-browser.c | 4 ++--
gthumb/gth-grid-view.c | 13 +++++++++----
2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index fff9633..2d1636e 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -3380,7 +3380,7 @@ gth_file_list_button_press_cb (GtkWidget *widget,
}
gth_file_list_popup_menu (browser, event);
- return TRUE;
+ return FALSE;
}
else if ((event->type == GDK_BUTTON_PRESS) && (event->button == 2)) {
GtkWidget *file_view;
@@ -3393,7 +3393,7 @@ gth_file_list_button_press_cb (GtkWidget *widget,
gth_file_selection_select (GTH_FILE_SELECTION (file_view), pos);
gth_file_view_set_cursor (GTH_FILE_VIEW (file_view), pos);
}
- return TRUE;
+ return FALSE;
}
else if ((event->type == GDK_2BUTTON_PRESS) && (event->button == 2)) {
gth_browser_fullscreen (browser);
diff --git a/gthumb/gth-grid-view.c b/gthumb/gth-grid-view.c
index ecec1a4..31a5a8a 100644
--- a/gthumb/gth-grid-view.c
+++ b/gthumb/gth-grid-view.c
@@ -2695,10 +2695,15 @@ gth_grid_view_button_press (GtkWidget *widget,
else if ((pos != -1) && (event->button == 1) && (event->type == GDK_BUTTON_PRESS)) {
/* This can be the start of a dragging action. */
- self->priv->dragging = TRUE;
- self->priv->drag_button = 1;
- self->priv->drag_start_x = event->x;
- self->priv->drag_start_y = event->y;
+ if (! (event->state & GDK_CONTROL_MASK)
+ && ! (event->state & GDK_SHIFT_MASK)
+ && self->priv->drag_source_enabled)
+ {
+ self->priv->dragging = TRUE;
+ self->priv->drag_button = 1;
+ self->priv->drag_start_x = event->x;
+ self->priv->drag_start_y = event->y;
+ }
if (self->priv->selection_mode != GTK_SELECTION_NONE) {
GthGridViewItem *item;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]