[gthumb: 3/9] do not postpone selection if drag&drop is not enabled
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 3/9] do not postpone selection if drag&drop is not enabled
- Date: Tue, 27 Apr 2010 19:29:02 +0000 (UTC)
commit f15f5400d8105aa303ea6d3dbef5d112680e3e6d
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Apr 25 19:11:36 2010 +0200
do not postpone selection if drag&drop is not enabled
gthumb/gth-icon-view.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/gth-icon-view.c b/gthumb/gth-icon-view.c
index f6cdcee..050ff5f 100644
--- a/gthumb/gth-icon-view.c
+++ b/gthumb/gth-icon-view.c
@@ -568,7 +568,10 @@ icon_view_button_press_event_cb (GtkWidget *widget,
pos = gtk_tree_path_get_indices (path)[0];
- if (! (event->state & GDK_CONTROL_MASK) && gth_file_selection_is_selected (GTH_FILE_SELECTION (icon_view), pos)) {
+ if (icon_view->priv->drag_source_enabled &&
+ ! (event->state & GDK_CONTROL_MASK)
+ && gth_file_selection_is_selected (GTH_FILE_SELECTION (icon_view), pos))
+ {
icon_view->priv->selection_pending = TRUE;
icon_view->priv->selection_pending_pos = pos;
retval = TRUE;
@@ -633,6 +636,9 @@ icon_view_motion_notify_event_cb (GtkWidget *widget,
{
GthIconView *icon_view = user_data;
+ if (! icon_view->priv->drag_source_enabled)
+ return FALSE;
+
if (icon_view->priv->dragging) {
if (! icon_view->priv->drag_started
&& gtk_drag_check_threshold (widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]