[gtk+/gtk-2-16] Bug 592003 - Shift+click should always modify selection
- From: Matthias Clasen <matthiasc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-16] Bug 592003 - Shift+click should always modify selection
- Date: Sat, 29 Aug 2009 02:43:37 +0000 (UTC)
commit e755d10765466c359e98a0fddad08389524748d0
Author: Paolo Borelli <pborelli gnome org>
Date: Mon Aug 17 17:04:30 2009 +0200
Bug 592003 - Shift+click should always modify selection
Shift-click inside an existing selection reduces the selection to the
range from the insert mark to the clicked point instead of removing the
selection. This makes GtkTextView more consistent with GtkEntry.
gtk/gtktextview.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index bf2d4b1..18da865 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4314,7 +4314,8 @@ gtk_text_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
if (gtk_text_buffer_get_selection_bounds (get_buffer (text_view),
&start, &end) &&
- gtk_text_iter_in_range (&iter, &start, &end))
+ gtk_text_iter_in_range (&iter, &start, &end) &&
+ !(event->state & GDK_SHIFT_MASK))
{
text_view->drag_start_x = event->x;
text_view->drag_start_y = event->y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]