Add default-to-save timeout on save-on-changes dialog

If the timeout is reached, the dialog is closed as if the user clicked on save.
The timeout period can be set via the preferences dialog

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23312 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2013-10-22 15:44:26 +00:00
parent a0ff784259
commit e39e3a2c68
4 changed files with 330 additions and 152 deletions

View File

@ -1073,6 +1073,7 @@ gnc_preferences_dialog_create(void)
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "auto_decimal_places_adj"); gnc_builder_add_from_file (builder, "dialog-preferences.glade", "auto_decimal_places_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "autosave_interval_minutes_adj"); gnc_builder_add_from_file (builder, "dialog-preferences.glade", "autosave_interval_minutes_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "save_on_close_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "date_backmonth_adj"); gnc_builder_add_from_file (builder, "dialog-preferences.glade", "date_backmonth_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "max_transactions_adj"); gnc_builder_add_from_file (builder, "dialog-preferences.glade", "max_transactions_adj");
gnc_builder_add_from_file (builder, "dialog-preferences.glade", "key_length_adj"); gnc_builder_add_from_file (builder, "dialog-preferences.glade", "key_length_adj");

View File

@ -63,7 +63,6 @@
#include "core-utils/gnc-version.h" #include "core-utils/gnc-version.h"
#include "gnc-window.h" #include "gnc-window.h"
#include "gnc-prefs.h" #include "gnc-prefs.h"
#include "gnc-prefs.h"
#include "option-util.h" #include "option-util.h"
// +JSLED // +JSLED
//#include "gnc-html.h" //#include "gnc-html.h"
@ -100,6 +99,8 @@ enum
#define GNC_PREF_TAB_POSITION_RIGHT "tab-position-right" #define GNC_PREF_TAB_POSITION_RIGHT "tab-position-right"
#define GNC_PREF_TAB_WIDTH "tab-width" #define GNC_PREF_TAB_WIDTH "tab-width"
#define GNC_PREF_TAB_COLOR "show-account-color-tabs" #define GNC_PREF_TAB_COLOR "show-account-color-tabs"
#define GNC_PREF_SAVE_CLOSE_EXPIRES "save-on-close-expires"
#define GNC_PREF_SAVE_CLOSE_WAIT_TIME "save-on-close-wait-time"
#define GNC_MAIN_WINDOW_NAME "GncMainWindow" #define GNC_MAIN_WINDOW_NAME "GncMainWindow"
@ -115,6 +116,11 @@ static GQuark window_type = 0;
/** A list of all extant main windows. This is for convenience as the /** A list of all extant main windows. This is for convenience as the
* same information can be obtained from the object tracking code. */ * same information can be obtained from the object tracking code. */
static GList *active_windows = NULL; static GList *active_windows = NULL;
/** Count down timer for the save changes dialog. If the timer reaches zero
* any changes will be saved and the save dialog closed automatically */
static uint secs_to_save = 0;
#define MSG_AUTO_SAVE _("Changes will be saved automatically in %d seconds")
/* Declarations *********************************************************/ /* Declarations *********************************************************/
static void gnc_main_window_class_init (GncMainWindowClass *klass); static void gnc_main_window_class_init (GncMainWindowClass *klass);
@ -1121,6 +1127,45 @@ gnc_main_window_page_exists (GncPluginPage *page)
return FALSE; return FALSE;
} }
static gboolean auto_save_countdown (GtkWidget *dialog)
{
GtkWidget *label;
gchar *timeoutstr = NULL;
if (secs_to_save < 0)
{
PWARN ("Count down aborted - timer reached a negative value.\n"
"This is probably because the timer was improperly initialized.");
return G_SOURCE_REMOVE;
}
/* Stop count down if user closed the dialog since the last time we were called */
if (!GTK_IS_DIALOG (dialog))
return G_SOURCE_REMOVE;
/* Stop count down if count down text can't be updated */
label = GTK_WIDGET (g_object_get_data (G_OBJECT (dialog), "count-down-label"));
if (!GTK_IS_LABEL (label))
return G_SOURCE_REMOVE;
secs_to_save--;
DEBUG ("Counting down: %d seconds", secs_to_save);
timeoutstr = g_strdup_printf (MSG_AUTO_SAVE, secs_to_save);
gtk_label_set_text (GTK_LABEL (label), timeoutstr);
g_free (timeoutstr);
/* Count down reached 0. Save and close dialog */
if (!secs_to_save)
{
gtk_dialog_response (GTK_DIALOG(dialog), GTK_RESPONSE_APPLY);
return G_SOURCE_REMOVE;
}
/* Run another cycle */
return G_SOURCE_CONTINUE;
}
/** This function prompts the user to save the file with a dialog that /** This function prompts the user to save the file with a dialog that
* follows the HIG guidelines. * follows the HIG guidelines.
@ -1136,7 +1181,7 @@ gnc_main_window_prompt_for_save (GtkWidget *window)
{ {
QofSession *session; QofSession *session;
QofBook *book; QofBook *book;
GtkWidget *dialog; GtkWidget *dialog, *msg_area, *label;
gint response; gint response;
const gchar *filename, *tmp; const gchar *filename, *tmp;
const gchar *title = _("Save changes to file %s before closing?"); const gchar *title = _("Save changes to file %s before closing?");
@ -1194,6 +1239,28 @@ gnc_main_window_prompt_for_save (GtkWidget *window)
GTK_STOCK_SAVE, GTK_RESPONSE_APPLY, GTK_STOCK_SAVE, GTK_RESPONSE_APPLY,
NULL); NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_APPLY); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_APPLY);
/* If requested by the user, add a timeout to the question to save automatically
* if the user doesn't answer after a chosen number of seconds.
*/
if (gnc_prefs_get_bool (GNC_PREFS_GROUP_GENERAL, GNC_PREF_SAVE_CLOSE_EXPIRES))
{
gchar *timeoutstr = NULL;
secs_to_save = gnc_prefs_get_int (GNC_PREFS_GROUP_GENERAL, GNC_PREF_SAVE_CLOSE_WAIT_TIME);
timeoutstr = g_strdup_printf (MSG_AUTO_SAVE, secs_to_save);
label = GTK_WIDGET(gtk_label_new (timeoutstr));
g_free (timeoutstr);
gtk_widget_show (label);
msg_area = gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG(dialog));
gtk_box_pack_end (GTK_BOX(msg_area), label, TRUE, TRUE, 0);
g_object_set (G_OBJECT (label), "xalign", 0.0, NULL);
g_object_set_data (G_OBJECT (dialog), "count-down-label", label);
g_timeout_add_seconds (1, (GSourceFunc)auto_save_countdown, dialog);
}
response = gtk_dialog_run (GTK_DIALOG (dialog)); response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy(dialog); gtk_widget_destroy(dialog);

View File

@ -2,55 +2,6 @@
<interface> <interface>
<requires lib="gtk+" version="2.24"/> <requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide --> <!-- interface-naming-policy project-wide -->
<object class="GtkAdjustment" id="auto_decimal_places_adj">
<property name="lower">1</property>
<property name="upper">8</property>
<property name="value">2</property>
<property name="step_increment">1</property>
<property name="page_increment">4</property>
</object>
<object class="GtkAdjustment" id="autosave_interval_minutes_adj">
<property name="upper">99999</property>
<property name="value">3</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="date_backmonth_adj">
<property name="upper">11</property>
<property name="value">6</property>
<property name="step_increment">1</property>
<property name="page_increment">4</property>
</object>
<object class="GtkListStore" id="date_formats">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name example -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">US</col>
<col id="1" translatable="yes">07/31/2013</col>
</row>
<row>
<col id="0" translatable="yes">UK</col>
<col id="1" translatable="yes">31/07/2013</col>
</row>
<row>
<col id="0" translatable="yes">Europe</col>
<col id="1" translatable="yes">31.07.2013</col>
</row>
<row>
<col id="0" translatable="yes">ISO</col>
<col id="1" translatable="yes">2013-07-31</col>
</row>
<row>
<col id="0" translatable="yes">Locale</col>
<col id="1" translatable="yes">(dummy)</col>
</row>
</data>
</object>
<object class="GtkDialog" id="GnuCash Preferences"> <object class="GtkDialog" id="GnuCash Preferences">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="title" translatable="yes">GnuCash Preferences</property> <property name="title" translatable="yes">GnuCash Preferences</property>
@ -369,7 +320,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkHBox" id="pref/window.pages.account-tree.summary/end-period"> <object class="GtkHBox" id="pref/window.pages.account-tree.summary/end-period">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<child> <child>
@ -1180,6 +1131,9 @@
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child> <child>
<object class="GtkRadioButton" id="pref/general/date-completion-thisyear"> <object class="GtkRadioButton" id="pref/general/date-completion-thisyear">
<property name="label" translatable="yes">In the current calendar year</property> <property name="label" translatable="yes">In the current calendar year</property>
@ -1301,7 +1255,7 @@ many months before the current month:</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="n_rows">22</property> <property name="n_rows">25</property>
<property name="n_columns">4</property> <property name="n_columns">4</property>
<child> <child>
<placeholder/> <placeholder/>
@ -1357,42 +1311,6 @@ many months before the current month:</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child> <child>
<object class="GtkLabel" id="label50"> <object class="GtkLabel" id="label50">
<property name="visible">True</property> <property name="visible">True</property>
@ -1513,8 +1431,8 @@ many months before the current month:</property>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="top_attach">17</property> <property name="top_attach">20</property>
<property name="bottom_attach">18</property> <property name="bottom_attach">21</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property>
</packing> </packing>
@ -1530,8 +1448,8 @@ many months before the current month:</property>
</object> </object>
<packing> <packing>
<property name="right_attach">4</property> <property name="right_attach">4</property>
<property name="top_attach">15</property> <property name="top_attach">18</property>
<property name="bottom_attach">16</property> <property name="bottom_attach">19</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
<property name="x_padding">12</property> <property name="x_padding">12</property>
@ -1707,8 +1625,8 @@ many months before the current month:</property>
<property name="use_markup">True</property> <property name="use_markup">True</property>
</object> </object>
<packing> <packing>
<property name="top_attach">20</property> <property name="top_attach">23</property>
<property name="bottom_attach">21</property> <property name="bottom_attach">24</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
</packing> </packing>
@ -1723,8 +1641,8 @@ many months before the current month:</property>
<property name="mnemonic_widget">pref/dialogs.search/new-search-limit</property> <property name="mnemonic_widget">pref/dialogs.search/new-search-limit</property>
</object> </object>
<packing> <packing>
<property name="top_attach">21</property> <property name="top_attach">24</property>
<property name="bottom_attach">22</property> <property name="bottom_attach">25</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
<property name="x_padding">12</property> <property name="x_padding">12</property>
@ -1749,8 +1667,8 @@ many months before the current month:</property>
<packing> <packing>
<property name="left_attach">1</property> <property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">21</property> <property name="top_attach">24</property>
<property name="bottom_attach">22</property> <property name="bottom_attach">25</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
</packing> </packing>
@ -1880,8 +1798,8 @@ many months before the current month:</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="top_attach">19</property> <property name="top_attach">17</property>
<property name="bottom_attach">20</property> <property name="bottom_attach">18</property>
<property name="x_options">GTK_FILL</property> <property name="x_options">GTK_FILL</property>
<property name="y_options"/> <property name="y_options"/>
</packing> </packing>
@ -1899,8 +1817,8 @@ many months before the current month:</property>
<property name="group">pref/general/retain-type-days</property> <property name="group">pref/general/retain-type-days</property>
</object> </object>
<packing> <packing>
<property name="top_attach">16</property> <property name="top_attach">19</property>
<property name="bottom_attach">17</property> <property name="bottom_attach">20</property>
<property name="x_padding">12</property> <property name="x_padding">12</property>
</packing> </packing>
</child> </child>
@ -1917,8 +1835,8 @@ many months before the current month:</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
</object> </object>
<packing> <packing>
<property name="top_attach">17</property> <property name="top_attach">20</property>
<property name="bottom_attach">18</property> <property name="bottom_attach">21</property>
<property name="x_padding">12</property> <property name="x_padding">12</property>
</packing> </packing>
</child> </child>
@ -1935,11 +1853,159 @@ many months before the current month:</property>
<property name="group">pref/general/retain-type-days</property> <property name="group">pref/general/retain-type-days</property>
</object> </object>
<packing> <packing>
<property name="top_attach">18</property> <property name="top_attach">21</property>
<property name="bottom_attach">19</property> <property name="bottom_attach">22</property>
<property name="x_padding">12</property> <property name="x_padding">12</property>
</packing> </packing>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkCheckButton" id="pref/general/save-on-close-expires">
<property name="label" translatable="yes">Enable timeout on "Save changes on closing" question</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">If enabeled, the "Save changes on closing" question will only wait a limited number of seconds for an answer. If the user didn't answer within that time, the changes will be saved automatically and the question window closed.</property>
<property name="use_underline">True</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="right_attach">4</property>
<property name="top_attach">15</property>
<property name="bottom_attach">16</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Time to wait for answer:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">pref/general/autosave-interval-minutes</property>
</object>
<packing>
<property name="top_attach">16</property>
<property name="bottom_attach">17</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
<property name="x_padding">12</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkSpinButton" id="pref/general/save-on-close-wait-time">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">The number of seconds to wait before the question window will be closed and the changes saved automatically.</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="adjustment">save_on_close_adj</property>
<property name="climb_rate">1</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">seconds</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">16</property>
<property name="bottom_attach">17</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<object class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="top_attach">22</property>
<property name="bottom_attach">23</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="position">3</property> <property name="position">3</property>
@ -2094,27 +2160,6 @@ many months before the current month:</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">4</property> <property name="position">4</property>
@ -3123,6 +3168,30 @@ many months before the current month:</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child> <child>
<object class="GtkLabel" id="label72"> <object class="GtkLabel" id="label72">
<property name="visible">True</property> <property name="visible">True</property>
@ -3493,30 +3562,6 @@ many months before the current month:</property>
<property name="y_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property>
</packing> </packing>
</child> </child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object> </object>
<packing> <packing>
<property name="position">8</property> <property name="position">8</property>
@ -3548,6 +3593,55 @@ many months before the current month:</property>
<action-widget response="-7">closebutton2</action-widget> <action-widget response="-7">closebutton2</action-widget>
</action-widgets> </action-widgets>
</object> </object>
<object class="GtkAdjustment" id="auto_decimal_places_adj">
<property name="lower">1</property>
<property name="upper">8</property>
<property name="value">2</property>
<property name="step_increment">1</property>
<property name="page_increment">4</property>
</object>
<object class="GtkAdjustment" id="autosave_interval_minutes_adj">
<property name="upper">99999</property>
<property name="value">3</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="date_backmonth_adj">
<property name="upper">11</property>
<property name="value">6</property>
<property name="step_increment">1</property>
<property name="page_increment">4</property>
</object>
<object class="GtkListStore" id="date_formats">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name example -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">US</col>
<col id="1" translatable="yes">07/31/2013</col>
</row>
<row>
<col id="0" translatable="yes">UK</col>
<col id="1" translatable="yes">31/07/2013</col>
</row>
<row>
<col id="0" translatable="yes">Europe</col>
<col id="1" translatable="yes">31.07.2013</col>
</row>
<row>
<col id="0" translatable="yes">ISO</col>
<col id="1" translatable="yes">2013-07-31</col>
</row>
<row>
<col id="0" translatable="yes">Locale</col>
<col id="1" translatable="yes">(dummy)</col>
</row>
</data>
</object>
<object class="GtkAdjustment" id="key_length_adj"> <object class="GtkAdjustment" id="key_length_adj">
<property name="lower">1</property> <property name="lower">1</property>
<property name="upper">999</property> <property name="upper">999</property>
@ -3574,6 +3668,12 @@ many months before the current month:</property>
<property name="step_increment">1</property> <property name="step_increment">1</property>
<property name="page_increment">10</property> <property name="page_increment">10</property>
</object> </object>
<object class="GtkAdjustment" id="save_on_close_adj">
<property name="upper">300</property>
<property name="value">20</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="tab_width_adj"> <object class="GtkAdjustment" id="tab_width_adj">
<property name="lower">1</property> <property name="lower">1</property>
<property name="upper">100</property> <property name="upper">100</property>

View File

@ -30,6 +30,16 @@
<summary>Auto-save time interval</summary> <summary>Auto-save time interval</summary>
<description>The number of minutes until saving of the data file to harddisk will be started automatically. If zero, no saving will be started automatically.</description> <description>The number of minutes until saving of the data file to harddisk will be started automatically. If zero, no saving will be started automatically.</description>
</key> </key>
<key name="save-on-close-expires" type="b">
<default>false</default>
<summary>Enable timeout on "Save changes on closing" question</summary>
<description>If enabeled, the "Save changes on closing" question will only wait a limited number of seconds for an answer. If the user didn't answer within that time, the changes will be saved automatically and the question window closed.</description>
</key>
<key name="save-on-close-wait-time" type="i">
<default>20</default>
<summary>Time to wait for answer</summary>
<description>The number of seconds to wait before the question window will be closed and the changes saved automatically.</description>
</key>
<key name="negative-in-red" type="b"> <key name="negative-in-red" type="b">
<default>true</default> <default>true</default>
<summary>Display negative amounts in red</summary> <summary>Display negative amounts in red</summary>