mirror of https://github.com/GNOME/gimp.git
libgimp: make gimp_close() static to gimp.c again
Instead of calling _gimp_close() and returning from both the main plug-in loop variants, simply only return and call gimp_close() from where both loops return to, at the end of gimp_main_internal().
This commit is contained in:
parent
05d47f197a
commit
e3374e7d4e
|
@ -31,7 +31,6 @@ extern GIOChannel *_gimp_readchannel;
|
|||
extern GIOChannel *_gimp_writechannel;
|
||||
|
||||
|
||||
void _gimp_close (void);
|
||||
void _gimp_config (GPConfig *config);
|
||||
void _gimp_loop (GimpRunProc run_proc);
|
||||
void _gimp_read_expect_msg (GimpWireMessage *msg,
|
||||
|
|
|
@ -151,6 +151,7 @@ static gint gimp_main_internal (GType plug_in_ty
|
|||
gint argc,
|
||||
gchar *argv[]);
|
||||
|
||||
static void gimp_close (void);
|
||||
static void gimp_debug_stop (void);
|
||||
static void gimp_message_func (const gchar *log_domain,
|
||||
GLogLevelFlags log_level,
|
||||
|
@ -735,7 +736,7 @@ gimp_main_internal (GType plug_in_type,
|
|||
PLUG_IN_INFO.query_proc ();
|
||||
}
|
||||
|
||||
_gimp_close ();
|
||||
gimp_close ();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -755,7 +756,7 @@ gimp_main_internal (GType plug_in_type,
|
|||
PLUG_IN_INFO.init_proc ();
|
||||
}
|
||||
|
||||
_gimp_close ();
|
||||
gimp_close ();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -779,6 +780,8 @@ gimp_main_internal (GType plug_in_type,
|
|||
_gimp_loop (PLUG_IN_INFO.run_proc);
|
||||
}
|
||||
|
||||
gimp_close ();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -791,7 +794,7 @@ gimp_main_internal (GType plug_in_type,
|
|||
void
|
||||
gimp_quit (void)
|
||||
{
|
||||
_gimp_close ();
|
||||
gimp_close ();
|
||||
|
||||
#if defined G_OS_WIN32 && defined HAVE_EXCHNDL
|
||||
if (plug_in_backtrace_path)
|
||||
|
@ -1228,8 +1231,8 @@ gimp_get_progname (void)
|
|||
|
||||
/* private functions */
|
||||
|
||||
void
|
||||
_gimp_close (void)
|
||||
static void
|
||||
gimp_close (void)
|
||||
{
|
||||
if (gimp_debug_flags & GIMP_DEBUG_QUIT)
|
||||
gimp_debug_stop ();
|
||||
|
|
|
@ -955,16 +955,12 @@ _gimp_loop (GimpRunProc run_proc)
|
|||
while (TRUE)
|
||||
{
|
||||
if (! gimp_wire_read_msg (_gimp_readchannel, &msg, NULL))
|
||||
{
|
||||
_gimp_close ();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
switch (msg.type)
|
||||
{
|
||||
case GP_QUIT:
|
||||
gimp_wire_destroy (&msg);
|
||||
_gimp_close ();
|
||||
return;
|
||||
|
||||
case GP_CONFIG:
|
||||
|
@ -980,7 +976,6 @@ _gimp_loop (GimpRunProc run_proc)
|
|||
case GP_PROC_RUN:
|
||||
gimp_proc_run (msg.data, run_proc);
|
||||
gimp_wire_destroy (&msg);
|
||||
_gimp_close ();
|
||||
return;
|
||||
|
||||
case GP_PROC_RETURN:
|
||||
|
|
|
@ -169,16 +169,12 @@ gimp_plug_in_loop (GimpPlugIn *plug_in)
|
|||
GimpWireMessage msg;
|
||||
|
||||
if (! gimp_wire_read_msg (_gimp_readchannel, &msg, NULL))
|
||||
{
|
||||
_gimp_close ();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
switch (msg.type)
|
||||
{
|
||||
case GP_QUIT:
|
||||
gimp_wire_destroy (&msg);
|
||||
_gimp_close ();
|
||||
return;
|
||||
|
||||
case GP_CONFIG:
|
||||
|
@ -194,7 +190,6 @@ gimp_plug_in_loop (GimpPlugIn *plug_in)
|
|||
case GP_PROC_RUN:
|
||||
gimp_plug_in_proc_run (plug_in, msg.data);
|
||||
gimp_wire_destroy (&msg);
|
||||
_gimp_close ();
|
||||
return;
|
||||
|
||||
case GP_PROC_RETURN:
|
||||
|
|
Loading…
Reference in New Issue