From: John Darrington Date: Sat, 29 Nov 2008 01:37:20 +0000 (+0900) Subject: Improve useability of value label dialog. X-Git-Tag: v0.7.1~50^2~11 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5165f9875bb2aebe93c7ec9126f7a8897092ff13;p=pspp-builds.git Improve useability of value label dialog. Make the value entry widget grab the keyboard focus whenever the dialog is updated, and on showing the dialog. Fixes bug #24929 --- diff --git a/src/ui/gui/val-labs-dialog.c b/src/ui/gui/val-labs-dialog.c index 710d1766..d5228e04 100644 --- a/src/ui/gui/val-labs-dialog.c +++ b/src/ui/gui/val-labs-dialog.c @@ -270,6 +270,7 @@ on_change (GtkWidget *w, gpointer data) gtk_widget_set_sensitive (dialog->change_button, FALSE); repopulate_dialog (dialog); + gtk_widget_grab_focus (dialog->value_entry); return FALSE; } @@ -296,6 +297,7 @@ on_add (GtkWidget *w, gpointer data) gtk_widget_set_sensitive (dialog->add_button, FALSE); repopulate_dialog (dialog); + gtk_widget_grab_focus (dialog->value_entry); return FALSE; } @@ -311,6 +313,7 @@ on_remove (GtkWidget *w, gpointer data) val_labs_remove (dialog->labs, vl->value); repopulate_dialog (dialog); + gtk_widget_grab_focus (dialog->value_entry); gtk_widget_set_sensitive (dialog->remove_button, FALSE); @@ -528,6 +531,8 @@ val_labs_dialog_show (struct val_labs_dialog *dialog) gtk_widget_set_sensitive (dialog->change_button, FALSE); gtk_widget_set_sensitive (dialog->add_button, FALSE); + gtk_widget_grab_focus (dialog->value_entry); + repopulate_dialog (dialog); gtk_widget_show (dialog->window); }