Commit 1cff73da authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Miguel de Icaza

Change the order here. (dialog_autosave): Correct. Help button does not

2000-02-07  Miguel de Icaza  <miguel@gnu.org>

	* src/dialogs/dialog-autosave.c (dialog_autosave): Change the
	order here.
	(dialog_autosave): Correct.  Help button does not mean OK.  Hook
	up help.

	* src/dialogs/auto-save.glade: Beautify.
parent b3e9a312
2000-02-07 Miguel de Icaza <miguel@gnu.org>
* src/dialogs/dialog-autosave.c (dialog_autosave): Change the
order here.
(dialog_autosave): Correct. Help button does not mean OK. Hook
up help.
* src/dialogs/auto-save.glade: Beautify.
2000-02-01 ERDI Gergo <cactus@cactus.rulez.org>
* src/about.c (dialog_about): Added myself to the contributors list
......
2000-02-07 Miguel de Icaza <miguel@gnu.org>
* src/dialogs/dialog-autosave.c (dialog_autosave): Change the
order here.
(dialog_autosave): Correct. Help button does not mean OK. Hook
up help.
* src/dialogs/auto-save.glade: Beautify.
2000-02-01 ERDI Gergo <cactus@cactus.rulez.org>
* src/about.c (dialog_about): Added myself to the contributors list
......
......@@ -45,7 +45,7 @@
<homogeneous>False</homogeneous>
<spacing>8</spacing>
<child>
<padding>4</padding>
<padding>2</padding>
<expand>True</expand>
<fill>True</fill>
</child>
......@@ -73,35 +73,95 @@
</child>
<widget>
<class>GtkVBox</class>
<name>vbox2</name>
<class>GtkTable</class>
<name>table1</name>
<rows>3</rows>
<columns>1</columns>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<row_spacing>0</row_spacing>
<column_spacing>0</column_spacing>
<child>
<padding>0</padding>
<padding>2</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkCheckButton</class>
<name>autosave_on_off</name>
<can_focus>True</can_focus>
<has_focus>True</has_focus>
<label>_Automatic Save Every</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCheckButton</class>
<name>prompt_on_off</name>
<can_focus>True</can_focus>
<label>_Prompt Before Saving</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>True</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox2</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>20</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>True</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
<widget>
<class>GtkCheckButton</class>
<name>autosave_on_off</name>
<class>GtkEntry</class>
<name>minutes</name>
<width>40</width>
<can_focus>True</can_focus>
<has_focus>True</has_focus>
<label>_Automatic Save Every</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>3</text_max_length>
<text></text>
<child>
<padding>0</padding>
<expand>False</expand>
......@@ -110,72 +170,22 @@
</widget>
<widget>
<class>GtkEntry</class>
<name>minutes</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>3</text_max_length>
<text></text>
<class>GtkLabel</class>
<name>label1</name>
<label>minutes</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>4</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkCheckButton</class>
<name>prompt_on_off</name>
<can_focus>True</can_focus>
<label>_Prompt Before Saving</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkVBox</class>
<name>vbox3</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label1</name>
<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>
<fill>False</fill>
</child>
</widget>
<widget>
<class>Placeholder</class>
</widget>
<widget>
<class>Placeholder</class>
</widget>
</widget>
</widget>
</widget>
......
/*
* dialog-autosave.c:
*
* Author:
* Authors:
* Jukka-Pekka Iivonen <iivonen@iki.fi>
* Miguel de Icaza (miguel@kernel.org)
*
* (C) Copyright 2000 by Jukka-Pekka Iivonen <iivonen@iki.fi>
**/
......@@ -17,7 +18,10 @@
static void
autosave_on_off_toggled(GtkWidget *widget, Workbook *wb)
{
GtkWidget *entry = gtk_object_get_user_data (GTK_OBJECT (widget));
wb->autosave = GTK_TOGGLE_BUTTON (widget)->active;
gtk_widget_set_sensitive (entry, wb->autosave);
}
static void
......@@ -92,13 +96,23 @@ dialog_autosave (Workbook *wb)
return;
}
minutes = glade_xml_get_widget (gui, "minutes");
sprintf(buf, "%d", wb->autosave_minutes);
gtk_entry_set_text (GTK_ENTRY (minutes), buf);
gnome_dialog_editable_enters (GNOME_DIALOG (dia),
GTK_EDITABLE (minutes));
autosave_on_off = glade_xml_get_widget (gui, "autosave_on_off");
if (wb->autosave)
gtk_toggle_button_set_active ((GtkToggleButton *)
autosave_on_off, wb->autosave);
gtk_signal_connect (GTK_OBJECT (autosave_on_off), "toggled",
GTK_SIGNAL_FUNC (autosave_on_off_toggled), wb);
gtk_object_set_user_data (GTK_OBJECT (autosave_on_off), minutes);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (autosave_on_off), wb->autosave);
if (!wb->autosave)
gtk_widget_set_sensitive (minutes, FALSE);
prompt_on_off = glade_xml_get_widget (gui, "prompt_on_off");
if (wb->autosave_prompt)
gtk_toggle_button_set_active ((GtkToggleButton *)
......@@ -107,13 +121,6 @@ dialog_autosave (Workbook *wb)
gtk_signal_connect (GTK_OBJECT (prompt_on_off), "toggled",
GTK_SIGNAL_FUNC (prompt_on_off_toggled), wb);
minutes = glade_xml_get_widget (gui, "minutes");
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));
......@@ -129,7 +136,12 @@ loop:
gtk_widget_grab_focus (minutes);
goto loop;
}
} else {
} else if (v == 2) {
GnomeHelpMenuEntry *help_ref = { "gnumeric", "autosave.html" };
gnome_help_display (NULL, &help_ref);
} else if (v == 1) {
wb->autosave = old_autosave;
wb->autosave_prompt = old_prompt;
wb->autosave_minutes = old_minutes;
......
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