[anjuta] anjuta: F6 switches focus instead of setting over (bgo#621678)



commit 5864a852b843cf441dfbd57c96d6886a1ffff019
Author: Johannes Schmid <jhs gnome org>
Date:   Tue Jun 22 22:51:28 2010 +0200

    anjuta: F6 switches focus instead of setting over (bgo#621678)
    
    Actually, it is sometimes difficult to decide if we want to handle the event in
    the focus widget or in the window. Maybe we need some more exceptions...

 src/anjuta-app.c |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/src/anjuta-app.c b/src/anjuta-app.c
index e44bf3a..2cbe78e 100644
--- a/src/anjuta-app.c
+++ b/src/anjuta-app.c
@@ -724,10 +724,30 @@ anjuta_app_key_press_event (GtkWidget   *widget,
 	if (grand_parent_class == NULL)
 		grand_parent_class = g_type_class_peek_parent (parent_class);
 
-	/* handle focus widget key events */
-	if (!handled)
-		handled = gtk_window_propagate_key_event (window, event);
-
+	switch (event->keyval)
+	{
+		case GDK_F1:
+		case GDK_F2:
+		case GDK_F3:
+		case GDK_F4:
+		case GDK_F5:
+		case GDK_F6:
+		case GDK_F7:
+		case GDK_F8:
+		case GDK_F9:
+		case GDK_F10:
+		case GDK_F11:
+		case GDK_F12:
+			/* handle mnemonics and accelerators */
+			if (!handled)
+				handled = gtk_window_activate_key (window, event);
+			break;
+		default:
+			/* handle focus widget key events */
+			if (!handled)
+				handled = gtk_window_propagate_key_event (window, event);
+	}
+	
 	/* handle mnemonics and accelerators */
 	if (!handled)
 		handled = gtk_window_activate_key (window, event);



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