From 9cce8c8c137b2792183ed27825adc671f0efa354 Mon Sep 17 00:00:00 2001 From: Shivram U Date: Mon, 9 Sep 2002 10:32:58 +0000 Subject: [PATCH] If the end iter is also a part of the selection, then we are in the Mon Sep 9 16:16:25 2002 Shivram U * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter is also a part of the selection, then we are in the selection. (#92768) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtktextview.c | 3 ++- 7 files changed, 38 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 16a2c36b21..3b3ec24a2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Sep 9 16:16:25 2002 Shivram U + + * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter + is also a part of the selection, then we are in the selection. + (#92768) + 2002-09-08 Tor Lillqvist * configure.in: Add AM_CONDITIONAL calls also in the non-x11 diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 16a2c36b21..3b3ec24a2f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Mon Sep 9 16:16:25 2002 Shivram U + + * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter + is also a part of the selection, then we are in the selection. + (#92768) + 2002-09-08 Tor Lillqvist * configure.in: Add AM_CONDITIONAL calls also in the non-x11 diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 16a2c36b21..3b3ec24a2f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Mon Sep 9 16:16:25 2002 Shivram U + + * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter + is also a part of the selection, then we are in the selection. + (#92768) + 2002-09-08 Tor Lillqvist * configure.in: Add AM_CONDITIONAL calls also in the non-x11 diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 16a2c36b21..3b3ec24a2f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Mon Sep 9 16:16:25 2002 Shivram U + + * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter + is also a part of the selection, then we are in the selection. + (#92768) + 2002-09-08 Tor Lillqvist * configure.in: Add AM_CONDITIONAL calls also in the non-x11 diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 16a2c36b21..3b3ec24a2f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Mon Sep 9 16:16:25 2002 Shivram U + + * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter + is also a part of the selection, then we are in the selection. + (#92768) + 2002-09-08 Tor Lillqvist * configure.in: Add AM_CONDITIONAL calls also in the non-x11 diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 16a2c36b21..3b3ec24a2f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Mon Sep 9 16:16:25 2002 Shivram U + + * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter + is also a part of the selection, then we are in the selection. + (#92768) + 2002-09-08 Tor Lillqvist * configure.in: Add AM_CONDITIONAL calls also in the non-x11 diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 1e35a3c650..65a19d5a87 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -5591,7 +5591,8 @@ gtk_text_view_drag_motion (GtkWidget *widget, } else if (gtk_text_buffer_get_selection_bounds (get_buffer (text_view), &start, &end) && - gtk_text_iter_in_range (&newplace, &start, &end)) + gtk_text_iter_compare (&newplace, &start) >= 0 && + gtk_text_iter_compare (&newplace, &end) <= 0) { /* We're inside the selection. */ }