Make close button grab the focus on popup
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 29 Nov 2008 03:03:13 +0000 (12:03 +0900)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 29 Nov 2008 03:03:13 +0000 (12:03 +0900)
src/ui/gui/message-dialog.c
src/ui/gui/message-dialog.glade

index 281ef527d55f357ab3897743c884a58a16e76cfd..d0f02dfaddef54f32b3c3fd9088fd8e7a7738fc0 100644 (file)
@@ -260,6 +260,7 @@ popup_messages (gpointer unused UNUSED)
     goto use_fallback;
   gtk_text_view_set_buffer (text_view, text_buffer);
 
+  gtk_widget_grab_focus (get_widget_assert (message_xml, "close-button"));
   gtk_dialog_run ( GTK_DIALOG (message_dialog));
   gtk_widget_hide (message_dialog);
 
index 719c1aadce7e8adb4b01c223a2385cc277bfdf15..39ad36796ccc4770b5c075fbb9d3feb0c9808235 100644 (file)
@@ -86,7 +86,7 @@
             <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
             <property name="layout_style">GTK_BUTTONBOX_END</property>
             <child>
-              <widget class="GtkButton" id="button1">
+              <widget class="GtkButton" id="close-button">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>