Continue button to grab default on realization
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 16 Apr 2009 23:59:28 +0000 (07:59 +0800)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 16 Apr 2009 23:59:28 +0000 (07:59 +0800)
src/ui/gui/psppire-buttonbox.c

index 184ebd16df8d8deac3115172710dd451847eb7d4..071751ad6fdeb6372cdd590c1ea8dcf47a347a5e 100644 (file)
@@ -272,6 +272,12 @@ psppire_button_box_init (PsppireButtonBox *bb)
   bb->button[PSPPIRE_BUTTON_CONTINUE] =
     gtk_button_new_with_mnemonic (_("Continue"));
 
+  GTK_WIDGET_SET_FLAGS (bb->button[PSPPIRE_BUTTON_CONTINUE],
+                       GTK_CAN_DEFAULT);
+
+  g_signal_connect (bb->button[PSPPIRE_BUTTON_CONTINUE], "realize",
+        G_CALLBACK (gtk_widget_grab_default), NULL);
+
   gtk_box_pack_start_defaults (GTK_BOX (bb),
                               bb->button[PSPPIRE_BUTTON_CONTINUE]);
   g_signal_connect (bb->button[PSPPIRE_BUTTON_CONTINUE], "clicked",