Commit 6b04ed8c authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan

Give "Yes" button initial keyboard focus.

2000-01-23  Jon K Hellan  <hellan@acm.org>

	* src/dialogs/autosave-prompt.glade: Give "Yes"
	button initial keyboard focus.

	* src/dialogs/autosave.glade: Set initial focus to
	first check button. Make OK the default.

	* src/dialogs/dialog-autocorrect.c (dialog_autocorrect): Make
	<Ret> in entry fields invoke default.
	(dialog_autocorrect, exceptions_callback):

	* src/dialogs/autocorrect-exceptions.glade: Set initial focus to
	text entry field. Make OK the default. Do not show column headers
	in clist. Remove unnecessary level of scrollwindow.

	* src/dialogs/autocorrect.glade: Make OK the default. Set initial
	focus to first check button. Define accelerators. Set widgets for
	"replace text when typed" insensitive until feature is
	implemented. Do not show column headers in clist.

	* src/dialogs/dialog-autosave.c (dialog_autosave): Make
	<Ret> in "minutes" fields invoke default.
parent 4a1f7e19
2000-01-23 Jon K Hellan <hellan@acm.org>
* src/dialogs/autosave-prompt.glade: Give "Yes"
button initial keyboard focus.
* src/dialogs/autosave.glade: Set initial focus to
first check button. Make OK the default.
* src/dialogs/dialog-autocorrect.c (dialog_autocorrect): Make
<Ret> in entry fields invoke default.
(dialog_autocorrect, exceptions_callback):
* src/dialogs/autocorrect-exceptions.glade: Set initial focus to
text entry field. Make OK the default. Do not show column headers
in clist. Remove unnecessary level of scrollwindow.
* src/dialogs/autocorrect.glade: Make OK the default. Set initial
focus to first check button. Define accelerators. Set widgets for
"replace text when typed" insensitive until feature is
implemented. Do not show column headers in clist.
* src/dialogs/dialog-autosave.c (dialog_autosave): Make
<Ret> in "minutes" fields invoke default.
2000-01-23 Michael Meeks <michael@edenproject.org>
......
2000-01-23 Jon K Hellan <hellan@acm.org>
* src/dialogs/autosave-prompt.glade: Give "Yes"
button initial keyboard focus.
* src/dialogs/autosave.glade: Set initial focus to
first check button. Make OK the default.
* src/dialogs/dialog-autocorrect.c (dialog_autocorrect): Make
<Ret> in entry fields invoke default.
(dialog_autocorrect, exceptions_callback):
* src/dialogs/autocorrect-exceptions.glade: Set initial focus to
text entry field. Make OK the default. Do not show column headers
in clist. Remove unnecessary level of scrollwindow.
* src/dialogs/autocorrect.glade: Make OK the default. Set initial
focus to first check button. Define accelerators. Set widgets for
"replace text when typed" insensitive until feature is
implemented. Do not show column headers in clist.
* src/dialogs/dialog-autosave.c (dialog_autosave): Make
<Ret> in "minutes" fields invoke default.
2000-01-23 Michael Meeks <michael@edenproject.org>
......
......@@ -116,6 +116,7 @@
<class>GtkEntry</class>
<name>entry1</name>
<can_focus>True</can_focus>
<has_focus>True</has_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
......@@ -148,7 +149,7 @@
<columns>1</columns>
<column_widths>80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<show_titles>False</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
......@@ -264,7 +265,7 @@
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow2</name>
<name>scrolledwindow4</name>
<hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
......@@ -276,33 +277,18 @@
</child>
<widget>
<class>GtkViewport</class>
<name>viewport2</name>
<class>GtkCList</class>
<name>clist2</name>
<can_focus>True</can_focus>
<columns>1</columns>
<column_widths>80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>False</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow4</name>
<hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<widget>
<class>GtkCList</class>
<name>clist2</name>
<can_focus>True</can_focus>
<columns>1</columns>
<column_widths>80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>Placeholder</class>
<child_name>CList:title</child_name>
</widget>
</widget>
<class>Placeholder</class>
<child_name>CList:title</child_name>
</widget>
</widget>
</widget>
......@@ -384,6 +370,7 @@
<class>GtkButton</class>
<name>button1</name>
<can_default>True</can_default>
<has_default>True</has_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
</widget>
......
......@@ -90,6 +90,7 @@
<can_default>True</can_default>
<has_default>True</has_default>
<can_focus>True</can_focus>
<has_focus>True</has_focus>
<stock_button>GNOME_STOCK_BUTTON_YES</stock_button>
</widget>
......
......@@ -98,7 +98,8 @@
<class>GtkCheckButton</class>
<name>autosave_on_off</name>
<can_focus>True</can_focus>
<label>Automatic Save Every</label>
<has_focus>True</has_focus>
<label>_Automatic Save Every</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
......@@ -128,7 +129,7 @@
<class>GtkCheckButton</class>
<name>prompt_on_off</name>
<can_focus>True</can_focus>
<label>Prompt Before Saving</label>
<label>_Prompt Before Saving</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
......@@ -153,13 +154,14 @@
<widget>
<class>GtkLabel</class>
<name>label1</name>
<label>Minutes</label>
<label>_Minutes</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<focus_target>minutes</focus_target>
<child>
<padding>0</padding>
<expand>False</expand>
......@@ -199,6 +201,7 @@
<class>GtkButton</class>
<name>button1</name>
<can_default>True</can_default>
<has_default>True</has_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
</widget>
......
......@@ -292,12 +292,24 @@ exceptions_callback (GtkWidget *widget, autocorrect_t *p)
e1.entry = glade_xml_get_widget (gui, "entry1");
e1.list = glade_xml_get_widget (gui, "clist1");
#if 0
/* Make <Ret> in entry fields invoke default */
/* *** FIXME: NO - invoke Add instead *** */
gnome_dialog_editable_enters (GNOME_DIALOG (dia),
GTK_EDITABLE (e1.entry));
#endif
gtk_signal_connect(GTK_OBJECT(e1.list), "select_row",
GTK_SIGNAL_FUNC(fl_select_row), NULL);
e2.entry = glade_xml_get_widget (gui, "entry2");
e2.list = glade_xml_get_widget (gui, "clist2");
#if 0
/* Make <Ret> in entry fields invoke default */
/* *** FIXME: NO - invoke Add instead *** */
gnome_dialog_editable_enters (GNOME_DIALOG (dia),
GTK_EDITABLE (e2.entry));
#endif
gtk_signal_connect(GTK_OBJECT(e2.list), "select_row",
GTK_SIGNAL_FUNC(in_select_row), NULL);
......@@ -344,6 +356,12 @@ exceptions_callback (GtkWidget *widget, autocorrect_t *p)
gtk_widget_show (p->dia);
}
/*
* Widgets for "replace text when typed" have been set insensitive in
* autocorrect.glade until the feature is implemented. The widgets are:
* checkbutton5, label1, label2, entry1, entry2.
*
*/
void
dialog_autocorrect (Workbook *wb)
{
......@@ -358,6 +376,7 @@ dialog_autocorrect (Workbook *wb)
#if 0
GtkWidget *replace;
#endif
GtkWidget *entry;
autocorrect_t p;
gint v;
......@@ -433,6 +452,14 @@ dialog_autocorrect (Workbook *wb)
gtk_signal_connect (GTK_OBJECT (replace), "toggled",
GTK_SIGNAL_FUNC (replace_toggled), wb);
#endif
/* Make <Ret> in entry fields invoke default */
entry = glade_xml_get_widget (gui, "entry1");
gnome_dialog_editable_enters (GNOME_DIALOG (dia),
GTK_EDITABLE (entry));
entry = glade_xml_get_widget (gui, "entry2");
gnome_dialog_editable_enters (GNOME_DIALOG (dia),
GTK_EDITABLE (entry));
v = gnumeric_dialog_run (wb, GNOME_DIALOG (dia));
if (v != 0) {
......
......@@ -117,6 +117,9 @@ dialog_autosave (Workbook *wb)
sprintf(buf, "%d", wb->autosave_minutes);
gtk_entry_set_text (GTK_ENTRY (minutes), buf);
gnome_dialog_editable_enters (GNOME_DIALOG (dia),
GTK_EDITABLE (minutes));
loop:
v = gnumeric_dialog_run (wb, GNOME_DIALOG (dia));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment