Commit 6ca43f4f authored by Tim Janik's avatar Tim Janik

now gimp quits correctly again!

-timj
parent 8fd700c8
......@@ -62,6 +62,8 @@ static void make_initialization_status_window(void);
static void destroy_initialization_status_window(void);
static gint is_app_exit_finish_done = FALSE;
static ProcArg quit_args[] =
{
{ PDB_INT32,
......@@ -283,12 +285,18 @@ app_init ()
}
gint
app_exit_finish_done (void)
{
return is_app_exit_finish_done;
}
void
app_exit_finish ()
{
static gint once = 0;
if (once) return;
once = 1;
if (app_exit_finish_done ())
return;
is_app_exit_finish_done = TRUE;
lc_dialog_free ();
gdisplays_delete ();
......@@ -328,8 +336,10 @@ app_exit (int kill_it)
/* If it's the user's perogative, and there are dirty images */
if (kill_it == 0 && gdisplays_dirty () && no_interface == FALSE)
really_quit_dialog ();
else
else if (no_interface == FALSE)
toolbox_free ();
else
app_exit_finish ();
}
/********************************************************
......
......@@ -23,6 +23,7 @@ void gimp_init (int, char **);
void app_init (void);
void app_exit (int);
void app_exit_finish (void);
gint app_exit_finish_done (void);
void app_init_update_status(char *label1val, char *label2val, float pct_progress);
#endif /* APP_PROCS_H */
......@@ -68,7 +68,7 @@ static char **gimp_argv;
* commands.
*/
void
int
main (int argc, char **argv)
{
int show_version;
......@@ -201,7 +201,10 @@ main (int argc, char **argv)
install_verify (init);
/* Main application loop */
gtk_main ();
if (!app_exit_finish_done ())
gtk_main ();
return 0;
}
static void
......
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