From: John Darrington Date: Sun, 15 Mar 2009 22:15:00 +0000 (+0900) Subject: Focus var/data sheet after switching tabs X-Git-Tag: v0.7.3~229 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a86739f7fdb0a11a16f6c0a47c0e90773f134a53;p=pspp-builds.git Focus var/data sheet after switching tabs --- diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index 2a05538d..86119191 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -1457,13 +1457,19 @@ static gboolean on_switch_page (PsppireDataEditor *de, GtkNotebookPage *p, gint pagenum, gpointer data) { - if ( pagenum != PSPPIRE_DATA_EDITOR_DATA_VIEW ) + switch (pagenum) { + case PSPPIRE_DATA_EDITOR_DATA_VIEW: + gtk_widget_grab_focus (de->data_vbox); + on_select_range (de); + break; + case PSPPIRE_DATA_EDITOR_VARIABLE_VIEW: + gtk_widget_grab_focus (de->var_sheet); emit_selected_signal (de); - return TRUE; - } - - on_select_range (de); + break; + default: + break; + }; return TRUE; }