[gnumeric] fix focus/default handling
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] fix focus/default handling
- Date: Tue, 12 Jan 2010 07:28:36 +0000 (UTC)
commit 6e0b27e73e01857bd127e9222abd75c858ee42ee
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date: Tue Jan 12 00:27:48 2010 -0700
fix focus/default handling
2010-01-12 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-stf-export.c (stf_export_dialog_sheet_page_init): don't
select the iter.
(stf_export_dialog_switch_page): set the right default and focus
(stf_export_dialog): don't do it here
src/dialogs/ChangeLog | 7 +++++++
src/dialogs/dialog-stf-export.c | 10 ++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 41443de..ba7debf 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,10 @@
+2010-01-12 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * dialog-stf-export.c (stf_export_dialog_sheet_page_init): don't
+ select the iter.
+ (stf_export_dialog_switch_page): set the right default and focus
+ (stf_export_dialog): don't do it here
+
2010-01-11 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-stf-export.glade: add save-as-default checkbox
diff --git a/src/dialogs/dialog-stf-export.c b/src/dialogs/dialog-stf-export.c
index acaa279..319c723 100644
--- a/src/dialogs/dialog-stf-export.c
+++ b/src/dialogs/dialog-stf-export.c
@@ -30,6 +30,7 @@
#include <wbc-gtk.h>
#include <sheet.h>
#include <gui-util.h>
+#include <gnumeric-gconf.h>
#include <goffice/goffice.h>
#include <gtk/gtk.h>
@@ -630,10 +631,8 @@ stf_export_dialog_sheet_page_init (TextExportState *state)
if (!empty)
state->sheets.non_empty++;
- if (export) {
+ if (export)
state->sheets.num_selected++;
- gtk_tree_selection_select_iter (selection, &iter);
- }
}
set_sheet_selection_count (state, state->sheets.num_selected);
@@ -672,9 +671,13 @@ stf_export_dialog_switch_page (TextExportState *state, TextExportPage new_page)
if (new_page == PAGE_FORMAT) {
gtk_widget_hide (state->next_button);
gtk_widget_show (state->finish_button);
+ gtk_widget_grab_default (state->finish_button);
+ gtk_widget_grab_focus (state->finish_button);
} else {
gtk_widget_show (state->next_button);
gtk_widget_hide (state->finish_button);
+ gtk_widget_grab_default (state->next_button);
+ gtk_widget_grab_focus (state->next_button);
}
if (state->sheets.non_empty > 1) {
@@ -741,7 +744,6 @@ stf_export_dialog (WBCGtk *wbcg, GnmStfExport *stfe, Workbook *wb)
(&state,
(1 >= state.sheets.non_empty) ?
PAGE_FORMAT : PAGE_SHEETS);
- gtk_widget_grab_default (state.next_button);
g_signal_connect_swapped (G_OBJECT (state.back_button),
"clicked",
G_CALLBACK (cb_back_page), &state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]