Add warning close_last_window and show it when user tries to close the

last GnuCash window. Fixes #338865.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14580 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler 2006-07-30 01:25:12 +00:00
parent 3b84f4ca95
commit fd7877718f
3 changed files with 22 additions and 1 deletions

View File

@ -1,5 +1,10 @@
2006-07-30 Andreas Köhler <andi5.py@gmx.net>
* src/gnome/schemas/apps_gnucash_warnings.schemas.in:
* src/gnome-utils/gnc-main-window.c: Add warning close_last_window
and show it when user tries to close the last GnuCash window.
Fixes #338865.
* src/gnome-utils/gnc-gnome-utils.c:
* src/gnome-utils/glade/preferences.glade:
* src/gnome/schemas/apps_gnucash_general.schemas.in: Add new

View File

@ -1036,7 +1036,7 @@ gnc_main_window_delete_event (GtkWidget *window,
GTK_STOCK_QUIT, GTK_RESPONSE_OK,
NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
response = gtk_dialog_run (GTK_DIALOG (dialog));
response = gnc_dialog_run (GTK_DIALOG (dialog), "close_last_window");
gtk_widget_destroy(dialog);
if (response == GTK_RESPONSE_OK) {

View File

@ -19,6 +19,22 @@
</locale>
</schema>
<schema>
<key>/schemas/apps/gnucash/general/warnings/close_last_window</key>
<applyto>/apps/gnucash/general/warnings/permanent/close_last_window</applyto>
<applyto>/apps/gnucash/general/warnings/temporary/close_last_window</applyto>
<owner>gnucash</owner>
<type>int</type>
<default>0</default>
<locale name="C">
<short>Exit GnuCash</short>
<long>
This dialog is presented when you attempt to close the last GnuCash
window.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/gnucash/general/warnings/mark_split_unreconciled</key>
<applyto>/apps/gnucash/general/warnings/permanent/mark_split_unreconciled</applyto>