mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
macOS: Give GnuCash time to shut down gracefully.
Instead of letting macOS pull the rug out.
This commit is contained in:
parent
706277e6a8
commit
cbf2a7b9f1
@ -3705,14 +3705,17 @@ gnc_quartz_shutdown (GtkosxApplication *theApp, gpointer data)
|
|||||||
{
|
{
|
||||||
/* Do Nothing. It's too late. */
|
/* Do Nothing. It's too late. */
|
||||||
}
|
}
|
||||||
/* Should quit responds to NSApplicationBlockTermination; returning
|
/* Should quit responds to NSApplicationBlockTermination; returning TRUE means
|
||||||
* TRUE means "don't terminate", FALSE means "do terminate".
|
* "don't terminate", FALSE means "do terminate". gnc_main_window_quit() queues
|
||||||
|
* a timer that starts an orderly shutdown in 250ms and if we tell macOS it's OK
|
||||||
|
* to quit GnuCash gets terminated instead of doing its orderly shutdown,
|
||||||
|
* leaving the book locked.
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
gnc_quartz_should_quit (GtkosxApplication *theApp, GncMainWindow *window)
|
gnc_quartz_should_quit (GtkosxApplication *theApp, GncMainWindow *window)
|
||||||
{
|
{
|
||||||
if (gnc_main_window_all_finish_pending())
|
if (gnc_main_window_all_finish_pending())
|
||||||
return !gnc_main_window_quit (window);
|
gnc_main_window_quit (window);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user