[gedit] Control+scroll to move between search occurrences instead of just scroll.



commit 0df96d8ec7fbcaec441a990474f748ed7aace629
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Thu Apr 7 13:52:08 2011 +0200

    Control+scroll to move between search occurrences instead of just scroll.

 gedit/gedit-view-frame.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-view-frame.c b/gedit/gedit-view-frame.c
index 840c66c..affda82 100644
--- a/gedit/gedit-view-frame.c
+++ b/gedit/gedit-view-frame.c
@@ -482,12 +482,14 @@ search_widget_scroll_event (GtkWidget      *widget,
 		return retval;
 
 	/* SEARCH mode */
-	if (event->direction == GDK_SCROLL_UP)
+	if ((event->state & GDK_CONTROL_MASK) &&
+	    event->direction == GDK_SCROLL_UP)
 	{
 		search_again (frame, TRUE);
 		retval = TRUE;
 	}
-	else if (event->direction == GDK_SCROLL_DOWN)
+	else if ((event->state & GDK_CONTROL_MASK) &&
+	         event->direction == GDK_SCROLL_DOWN)
 	{
 		search_again (frame, FALSE);
 		retval = TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]