From 9d99ebe30cc1978ef769f4d19b25369b64f83c3b Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 22 Nov 2020 10:52:45 +0000 Subject: [PATCH] Bug 309943 - When unable to obtain a lock, no option to open another file Currently when you get the message that GnuCash could not obtain a lock for the file to be opened you have four options... Open Read-Only, Create New File, Open Anyway, Quit This commit changes the 'Create new File' to 'Open with No File' which allows the user to then select... 'File->New' to create a new file, 'File->Open' to open a different file or one chosen from the history or 'File->Quit' to exit. --- gnucash/gnome-utils/gnc-file.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gnucash/gnome-utils/gnc-file.c b/gnucash/gnome-utils/gnc-file.c index 86b45725e9..37a0fc79b8 100644 --- a/gnucash/gnome-utils/gnc-file.c +++ b/gnucash/gnome-utils/gnc-file.c @@ -695,7 +695,7 @@ gnc_file_query_save (GtkWindow *parent, gboolean can_cancel) /* private utilities for file open; done in two stages */ -#define RESPONSE_NEW 1 +#define RESPONSE_NO_FILE 1 #define RESPONSE_OPEN 2 #define RESPONSE_QUIT 3 #define RESPONSE_READONLY 4 @@ -848,8 +848,8 @@ RESTART: gnc_gtk_dialog_add_button(dialog, _("_Open Read-Only"), "document-revert", RESPONSE_READONLY); - gnc_gtk_dialog_add_button(dialog, _("_Create New File"), - "document-new", RESPONSE_NEW); + gnc_gtk_dialog_add_button(dialog, _("_Open with No File"), + "document-new", RESPONSE_NO_FILE); gnc_gtk_dialog_add_button(dialog, _("Open _Anyway"), "document-open", RESPONSE_OPEN); if (shutdown_cb) @@ -861,7 +861,7 @@ RESTART: if (rc == GTK_RESPONSE_DELETE_EVENT) { - rc = shutdown_cb ? RESPONSE_QUIT : RESPONSE_NEW; + rc = shutdown_cb ? RESPONSE_QUIT : RESPONSE_NO_FILE; } switch (rc) { @@ -881,10 +881,9 @@ RESTART: break; default: /* Can't use the given file, so just create a new - * database so that the user will get a window that - * they can click "Exit" on. + * Gnucash window so they can choose File->New, File->Open + * or just "Exit". */ - gnc_file_new (parent); break; } }