don't use gtk_main() / gtk_main_quit() but run our own main-loop like we

2004-07-12  Sven Neumann  <sven@gimp.org>

	* app/app_procs.s: don't use gtk_main() / gtk_main_quit() but run
	our own main-loop like we already used to do when being run
	non-interactively.
This commit is contained in:
Sven Neumann 2004-07-12 12:56:35 +00:00 committed by Sven Neumann
parent 5b83b759d7
commit 3b553547db
2 changed files with 16 additions and 22 deletions

View File

@ -1,3 +1,9 @@
2004-07-12 Sven Neumann <sven@gimp.org>
* app/app_procs.s: don't use gtk_main() / gtk_main_quit() but run
our own main-loop like we already used to do when being run
non-interactively.
2004-07-12 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.c

View File

@ -30,7 +30,7 @@
#include <unistd.h>
#endif
#include <gtk/gtk.h>
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
@ -293,30 +293,22 @@ app_run (const gchar *full_prog_name,
}
}
if (! no_interface)
gui_post_init (gimp);
batch_run (gimp, batch_cmds);
if (no_interface)
loop = g_main_loop_new (NULL, FALSE);
else
loop = NULL;
loop = g_main_loop_new (NULL, FALSE);
g_signal_connect_after (gimp, "exit",
G_CALLBACK (app_exit_after_callback),
loop);
if (loop)
{
gimp_threads_leave (gimp);
g_main_loop_run (loop);
gimp_threads_enter (gimp);
gimp_threads_leave (gimp);
g_main_loop_run (loop);
gimp_threads_enter (gimp);
g_main_loop_unref (loop);
}
else
{
gui_post_init (gimp);
gtk_main ();
}
g_main_loop_unref (loop);
g_object_unref (gimp);
base_exit ();
@ -350,11 +342,7 @@ app_exit_after_callback (Gimp *gimp,
*/
#ifdef GIMP_UNSTABLE
if (loop)
g_main_loop_quit (loop);
else
gtk_main_quit ();
g_main_loop_quit (loop);
#else
exit (EXIT_SUCCESS);
#endif