2006-12-10 05:33:38 +08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
1997-11-25 06:05:25 +08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
1997-11-25 06:05:25 +08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
1997-11-25 06:05:25 +08:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-07-12 05:27:07 +08:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1997-11-25 06:05:25 +08:00
|
|
|
*/
|
2000-12-29 23:22:01 +08:00
|
|
|
|
1999-02-21 07:20:54 +08:00
|
|
|
#include "config.h"
|
1999-09-28 01:58:10 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
2001-12-02 22:59:30 +08:00
|
|
|
#include <stdlib.h>
|
2009-12-30 07:38:31 +08:00
|
|
|
#include <locale.h>
|
2002-02-18 22:34:50 +08:00
|
|
|
|
1999-02-21 07:20:54 +08:00
|
|
|
#ifdef HAVE_SYS_PARAM_H
|
1997-11-25 06:05:25 +08:00
|
|
|
#include <sys/param.h>
|
1999-02-21 07:20:54 +08:00
|
|
|
#endif
|
2002-02-18 22:34:50 +08:00
|
|
|
|
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
user_installation is needed here, not in user_install.c, parse
gtkrc an friends only if(!no_interface), create the Gimp object
before parsing gimp's rc files an pas it to the parse functions,
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
* app/errors.[ch]: added the fatal message func here (from main.c),
removed the StackTraceMode enum.
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
pointer to some functions.
* app/gimpunit.c
* app/unitrc.h: ok, this is ugly: renamed all functions to
_gimp_unit_*() and made them public. The unit list is part
of the Gimp object now, so pass a Gimp* to all functions.
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
functions which are used by widgets.
* app/main.c: cleaned up the global variables, removed the fatal
message handler, call app_init() directly, not via the
user_install stuff, misc. cleanups.
* app/user_install.[ch]: removed the check if user_installation is
needed (done by app_procs.c now).
* app/core/gimp.[ch]: added the user_unit list and the "busy"
boolean. Moved gimp_[set|unset]_busy() here. Added
gimp_initialize() which is called after unitrc and gimprc are
parsed.
* app/batch.c
* app/colormaps.c
* app/devices.c
* app/disp_callbacks.c
* app/gdisplay_ops.c
* app/gimphelp.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/core/gimpcontext.c
* app/core/gimpdatafiles.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimpparasite.c
* app/core/gimpparasitelist.h
* app/gui/file-open-dialog.c
* app/gui/gui.[ch]
* app/gui/info-dialog.c
* app/gui/info-window.c
* app/gui/preferences-dialog.c
* app/gui/session.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptransformtool.c
* app/tools/tool_manager.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcursor.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/app.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/unit.pdb
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
2001-07-11 03:16:16 +08:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2018-03-23 02:29:35 +08:00
|
|
|
#include <glib/gstdio.h>
|
2013-10-15 07:58:39 +08:00
|
|
|
#include <gio/gio.h>
|
2008-02-07 19:43:19 +08:00
|
|
|
#include <gegl.h>
|
2001-02-07 09:16:18 +08:00
|
|
|
|
2018-03-23 02:29:35 +08:00
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
|
|
|
|
2011-08-31 06:25:22 +08:00
|
|
|
#ifdef G_OS_WIN32
|
|
|
|
#include <windows.h>
|
|
|
|
#include <winnls.h>
|
|
|
|
#endif
|
|
|
|
|
2017-01-09 06:00:19 +08:00
|
|
|
#undef GIMP_DISABLE_DEPRECATED /* for compat enums */
|
2001-05-22 04:30:16 +08:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2017-01-09 06:00:19 +08:00
|
|
|
#define GIMP_DISABLE_DEPRECATED
|
2006-06-05 21:48:57 +08:00
|
|
|
#include "libgimpconfig/gimpconfig.h"
|
2001-01-25 06:36:18 +08:00
|
|
|
|
2003-10-02 19:26:26 +08:00
|
|
|
#include "core/core-types.h"
|
2001-04-07 23:58:26 +08:00
|
|
|
|
2002-11-19 04:50:31 +08:00
|
|
|
#include "config/gimprc.h"
|
|
|
|
|
2016-11-11 19:32:18 +08:00
|
|
|
#include "gegl/gimp-gegl.h"
|
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
#include "core/gimp.h"
|
2015-09-30 07:57:33 +08:00
|
|
|
#include "core/gimp-batch.h"
|
2006-04-29 08:47:53 +08:00
|
|
|
#include "core/gimp-user-install.h"
|
2018-03-23 02:29:35 +08:00
|
|
|
#include "core/gimpimage.h"
|
2001-12-01 08:14:14 +08:00
|
|
|
|
2001-11-11 03:35:21 +08:00
|
|
|
#include "file/file-open.h"
|
|
|
|
|
2004-07-12 22:32:31 +08:00
|
|
|
#ifndef GIMP_CONSOLE_COMPILATION
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2004-09-13 23:15:23 +08:00
|
|
|
#include "dialogs/user-install-dialog.h"
|
|
|
|
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
#include "gui/gimpapp.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "gui/gui.h"
|
2004-07-12 22:32:31 +08:00
|
|
|
#endif
|
2001-04-18 05:43:29 +08:00
|
|
|
|
2007-02-02 22:27:16 +08:00
|
|
|
#include "app.h"
|
2003-05-29 19:34:30 +08:00
|
|
|
#include "errors.h"
|
2022-02-07 18:02:19 +08:00
|
|
|
#include "gimpconsoleapp.h"
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
#include "gimpcoreapp.h"
|
2022-07-07 01:33:00 +08:00
|
|
|
#include "language.h"
|
2017-06-15 21:30:45 +08:00
|
|
|
#include "sanity.h"
|
2010-06-25 01:11:56 +08:00
|
|
|
#include "gimp-debug.h"
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2003-03-26 00:38:19 +08:00
|
|
|
#include "gimp-intl.h"
|
2019-12-09 02:08:49 +08:00
|
|
|
#include "gimp-update.h"
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-15 07:23:52 +08:00
|
|
|
|
2008-07-11 17:08:07 +08:00
|
|
|
|
2001-10-25 21:30:01 +08:00
|
|
|
/* local prototypes */
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2014-05-03 06:54:20 +08:00
|
|
|
static void app_init_update_noop (const gchar *text1,
|
|
|
|
const gchar *text2,
|
|
|
|
gdouble percentage);
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
static void app_activate_callback (GimpCoreApp *app,
|
|
|
|
gpointer user_data);
|
2014-05-03 06:54:20 +08:00
|
|
|
static void app_restore_after_callback (Gimp *gimp,
|
|
|
|
GimpInitStatusFunc status_callback);
|
|
|
|
static gboolean app_exit_after_callback (Gimp *gimp,
|
|
|
|
gboolean kill_it,
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
GApplication *app);
|
2014-05-03 06:54:20 +08:00
|
|
|
|
2018-04-28 20:00:23 +08:00
|
|
|
#if 0
|
|
|
|
/* left here as documentation how to do compat enums */
|
2017-02-27 03:10:54 +08:00
|
|
|
GType gimp_convert_dither_type_compat_get_type (void); /* compat cruft */
|
2018-04-28 20:00:23 +08:00
|
|
|
#endif
|
2017-01-25 06:25:02 +08:00
|
|
|
|
2014-05-03 06:54:20 +08:00
|
|
|
|
|
|
|
/* local variables */
|
|
|
|
|
2018-04-29 23:27:47 +08:00
|
|
|
static GObject *initial_monitor = NULL;
|
1997-11-25 06:05:25 +08:00
|
|
|
|
1999-12-18 00:37:50 +08:00
|
|
|
|
2001-10-25 21:30:01 +08:00
|
|
|
/* public functions */
|
1998-01-20 08:12:21 +08:00
|
|
|
|
2005-02-09 06:57:24 +08:00
|
|
|
void
|
|
|
|
app_libs_init (GOptionContext *context,
|
|
|
|
gboolean no_interface)
|
2003-05-29 19:34:30 +08:00
|
|
|
{
|
2018-04-28 20:00:23 +08:00
|
|
|
#if 0
|
2017-01-09 06:00:19 +08:00
|
|
|
GQuark quark;
|
2018-04-28 20:00:23 +08:00
|
|
|
#endif
|
2017-01-09 06:00:19 +08:00
|
|
|
|
2013-10-20 06:34:18 +08:00
|
|
|
/* disable OpenCL before GEGL is even initialized; this way we only
|
|
|
|
* enable if wanted in gimprc, instead of always enabling, and then
|
|
|
|
* disabling again if wanted in gimprc
|
|
|
|
*/
|
|
|
|
g_object_set (gegl_config (),
|
|
|
|
"use-opencl", FALSE,
|
2014-02-26 02:00:13 +08:00
|
|
|
"application-license", "GPL3",
|
2013-10-20 06:34:18 +08:00
|
|
|
NULL);
|
|
|
|
|
2008-04-25 19:44:00 +08:00
|
|
|
g_option_context_add_group (context, gegl_get_option_group ());
|
|
|
|
|
2004-07-12 22:32:31 +08:00
|
|
|
#ifndef GIMP_CONSOLE_COMPILATION
|
2007-12-20 23:49:54 +08:00
|
|
|
if (! no_interface)
|
2004-07-12 22:32:31 +08:00
|
|
|
{
|
2005-02-09 06:57:24 +08:00
|
|
|
gui_libs_init (context);
|
2004-07-12 22:32:31 +08:00
|
|
|
}
|
|
|
|
#endif
|
2017-01-09 06:00:19 +08:00
|
|
|
|
2018-04-28 20:00:23 +08:00
|
|
|
#if 0
|
|
|
|
/* left here as documentation how to do compat enums */
|
|
|
|
|
2017-12-18 01:41:34 +08:00
|
|
|
/* keep compat enum code in sync with pdb/enumcode.pl */
|
2017-01-09 06:00:19 +08:00
|
|
|
quark = g_quark_from_static_string ("gimp-compat-enum");
|
|
|
|
|
2017-02-27 03:10:54 +08:00
|
|
|
g_type_set_qdata (GIMP_TYPE_CONVERT_DITHER_TYPE, quark,
|
2017-03-12 23:40:15 +08:00
|
|
|
(gpointer) gimp_convert_dither_type_compat_get_type ());
|
2018-04-28 20:00:23 +08:00
|
|
|
#endif
|
2003-05-29 19:34:30 +08:00
|
|
|
}
|
|
|
|
|
2004-03-30 19:32:21 +08:00
|
|
|
void
|
2004-07-12 22:32:31 +08:00
|
|
|
app_abort (gboolean no_interface,
|
|
|
|
const gchar *abort_message)
|
2004-03-30 19:32:21 +08:00
|
|
|
{
|
2004-07-12 22:32:31 +08:00
|
|
|
#ifndef GIMP_CONSOLE_COMPILATION
|
|
|
|
if (no_interface)
|
|
|
|
#endif
|
|
|
|
{
|
|
|
|
g_print ("%s\n\n", abort_message);
|
|
|
|
}
|
|
|
|
#ifndef GIMP_CONSOLE_COMPILATION
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gui_abort (abort_message);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
app_exit (EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
app_exit (gint status)
|
|
|
|
{
|
|
|
|
exit (status);
|
2004-03-30 19:32:21 +08:00
|
|
|
}
|
|
|
|
|
app: when called with --quit, GIMP exit code will report batch failure.
If you call GIMP with batch commands and ask it to quit immediately, you
are likely interested by failure information. For this reason, let's now
report exit code other than success, but only in such case. In
particular, even if the batch commands fail, but GIMP is not set to exit
immediately, we continue reporting SUCCESS run at the very end (when
exiting interactively).
Note that I hardcode a few exit values, as standardly found on Linux
(but not using headers which may not be found on all platforms; in
particular, Windows apparently doesn't use any standard code other than
0 for success, from what my searches return).
Additionally, when several commands are requested, GIMP will now stop at
the first failing and will return its error code, and print a message on
stderr to easily report the failed command for easier debugging.
2022-04-16 08:25:03 +08:00
|
|
|
gint
|
2003-11-17 08:17:01 +08:00
|
|
|
app_run (const gchar *full_prog_name,
|
2005-02-03 07:23:33 +08:00
|
|
|
const gchar **filenames,
|
2014-07-28 21:03:06 +08:00
|
|
|
GFile *alternate_system_gimprc,
|
|
|
|
GFile *alternate_gimprc,
|
2003-11-17 08:17:01 +08:00
|
|
|
const gchar *session_name,
|
2004-10-06 17:56:15 +08:00
|
|
|
const gchar *batch_interpreter,
|
|
|
|
const gchar **batch_commands,
|
2022-04-16 06:46:32 +08:00
|
|
|
gboolean quit,
|
2007-04-17 23:54:01 +08:00
|
|
|
gboolean as_new,
|
2003-11-17 08:17:01 +08:00
|
|
|
gboolean no_interface,
|
|
|
|
gboolean no_data,
|
|
|
|
gboolean no_fonts,
|
|
|
|
gboolean no_splash,
|
|
|
|
gboolean be_verbose,
|
|
|
|
gboolean use_shm,
|
|
|
|
gboolean use_cpu_accel,
|
|
|
|
gboolean console_messages,
|
2006-09-10 00:36:15 +08:00
|
|
|
gboolean use_debug_handler,
|
2014-09-14 07:08:25 +08:00
|
|
|
gboolean show_playground,
|
2018-03-29 17:20:20 +08:00
|
|
|
gboolean show_debug_menu,
|
2003-12-06 01:08:35 +08:00
|
|
|
GimpStackTraceMode stack_trace_mode,
|
2018-01-27 04:20:52 +08:00
|
|
|
GimpPDBCompatMode pdb_compat_mode,
|
|
|
|
const gchar *backtrace_file)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2022-02-07 18:02:19 +08:00
|
|
|
Gimp *gimp = NULL;
|
|
|
|
GApplication *app = NULL;
|
|
|
|
GFile *default_folder = NULL;
|
|
|
|
GFile *gimpdir = NULL;
|
|
|
|
const gchar *abort_message = NULL;
|
|
|
|
gint retval = EXIT_SUCCESS;
|
2012-12-15 07:34:15 +08:00
|
|
|
|
|
|
|
if (filenames && filenames[0] && ! filenames[1] &&
|
|
|
|
g_file_test (filenames[0], G_FILE_TEST_IS_DIR))
|
|
|
|
{
|
|
|
|
if (g_path_is_absolute (filenames[0]))
|
|
|
|
{
|
2014-07-10 02:12:05 +08:00
|
|
|
default_folder = g_file_new_for_path (filenames[0]);
|
2012-12-15 07:34:15 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
gchar *absolute = g_build_path (G_DIR_SEPARATOR_S,
|
|
|
|
g_get_current_dir (),
|
|
|
|
filenames[0],
|
|
|
|
NULL);
|
2014-07-10 02:12:05 +08:00
|
|
|
default_folder = g_file_new_for_path (absolute);
|
2012-12-15 07:34:15 +08:00
|
|
|
g_free (absolute);
|
|
|
|
}
|
|
|
|
|
|
|
|
filenames = NULL;
|
|
|
|
}
|
2004-07-15 05:27:11 +08:00
|
|
|
|
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
user_installation is needed here, not in user_install.c, parse
gtkrc an friends only if(!no_interface), create the Gimp object
before parsing gimp's rc files an pas it to the parse functions,
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
* app/errors.[ch]: added the fatal message func here (from main.c),
removed the StackTraceMode enum.
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
pointer to some functions.
* app/gimpunit.c
* app/unitrc.h: ok, this is ugly: renamed all functions to
_gimp_unit_*() and made them public. The unit list is part
of the Gimp object now, so pass a Gimp* to all functions.
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
functions which are used by widgets.
* app/main.c: cleaned up the global variables, removed the fatal
message handler, call app_init() directly, not via the
user_install stuff, misc. cleanups.
* app/user_install.[ch]: removed the check if user_installation is
needed (done by app_procs.c now).
* app/core/gimp.[ch]: added the user_unit list and the "busy"
boolean. Moved gimp_[set|unset]_busy() here. Added
gimp_initialize() which is called after unitrc and gimprc are
parsed.
* app/batch.c
* app/colormaps.c
* app/devices.c
* app/disp_callbacks.c
* app/gdisplay_ops.c
* app/gimphelp.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/core/gimpcontext.c
* app/core/gimpdatafiles.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimpparasite.c
* app/core/gimpparasitelist.h
* app/gui/file-open-dialog.c
* app/gui/gui.[ch]
* app/gui/info-dialog.c
* app/gui/info-window.c
* app/gui/preferences-dialog.c
* app/gui/session.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptransformtool.c
* app/tools/tool_manager.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcursor.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/app.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/unit.pdb
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
2001-07-11 03:16:16 +08:00
|
|
|
/* Create an instance of the "Gimp" object which is the root of the
|
|
|
|
* core object system
|
|
|
|
*/
|
2003-11-30 22:44:13 +08:00
|
|
|
gimp = gimp_new (full_prog_name,
|
|
|
|
session_name,
|
2012-12-15 07:34:15 +08:00
|
|
|
default_folder,
|
2003-11-30 22:44:13 +08:00
|
|
|
be_verbose,
|
|
|
|
no_data,
|
|
|
|
no_fonts,
|
|
|
|
no_interface,
|
|
|
|
use_shm,
|
2013-06-20 02:42:56 +08:00
|
|
|
use_cpu_accel,
|
2003-11-30 22:44:13 +08:00
|
|
|
console_messages,
|
2014-09-14 07:08:25 +08:00
|
|
|
show_playground,
|
2018-03-29 17:20:20 +08:00
|
|
|
show_debug_menu,
|
2003-12-06 01:08:35 +08:00
|
|
|
stack_trace_mode,
|
|
|
|
pdb_compat_mode);
|
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
user_installation is needed here, not in user_install.c, parse
gtkrc an friends only if(!no_interface), create the Gimp object
before parsing gimp's rc files an pas it to the parse functions,
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
* app/errors.[ch]: added the fatal message func here (from main.c),
removed the StackTraceMode enum.
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
pointer to some functions.
* app/gimpunit.c
* app/unitrc.h: ok, this is ugly: renamed all functions to
_gimp_unit_*() and made them public. The unit list is part
of the Gimp object now, so pass a Gimp* to all functions.
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
functions which are used by widgets.
* app/main.c: cleaned up the global variables, removed the fatal
message handler, call app_init() directly, not via the
user_install stuff, misc. cleanups.
* app/user_install.[ch]: removed the check if user_installation is
needed (done by app_procs.c now).
* app/core/gimp.[ch]: added the user_unit list and the "busy"
boolean. Moved gimp_[set|unset]_busy() here. Added
gimp_initialize() which is called after unitrc and gimprc are
parsed.
* app/batch.c
* app/colormaps.c
* app/devices.c
* app/disp_callbacks.c
* app/gdisplay_ops.c
* app/gimphelp.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/core/gimpcontext.c
* app/core/gimpdatafiles.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimpparasite.c
* app/core/gimpparasitelist.h
* app/gui/file-open-dialog.c
* app/gui/gui.[ch]
* app/gui/info-dialog.c
* app/gui/info-window.c
* app/gui/preferences-dialog.c
* app/gui/session.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptransformtool.c
* app/tools/tool_manager.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcursor.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/app.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/unit.pdb
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
2001-07-11 03:16:16 +08:00
|
|
|
|
2021-12-20 01:09:28 +08:00
|
|
|
g_clear_object (&default_folder);
|
|
|
|
|
2022-02-07 18:02:19 +08:00
|
|
|
#ifndef GIMP_CONSOLE_COMPILATION
|
|
|
|
app = gimp_app_new (gimp, no_splash, quit, as_new, filenames, batch_interpreter, batch_commands);
|
|
|
|
#else
|
|
|
|
app = gimp_console_app_new (gimp, quit, as_new, filenames, batch_interpreter, batch_commands);
|
|
|
|
#endif
|
2014-07-10 02:12:05 +08:00
|
|
|
|
2013-06-20 02:42:56 +08:00
|
|
|
gimp_cpu_accel_set_use (use_cpu_accel);
|
|
|
|
|
2021-12-20 01:09:28 +08:00
|
|
|
/* Check if the user's gimp_directory exists */
|
2014-10-07 02:33:47 +08:00
|
|
|
gimpdir = gimp_directory_file (NULL);
|
|
|
|
|
|
|
|
if (g_file_query_file_type (gimpdir, G_FILE_QUERY_INFO_NONE, NULL) !=
|
2014-07-29 18:04:17 +08:00
|
|
|
G_FILE_TYPE_DIRECTORY)
|
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
user_installation is needed here, not in user_install.c, parse
gtkrc an friends only if(!no_interface), create the Gimp object
before parsing gimp's rc files an pas it to the parse functions,
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
* app/errors.[ch]: added the fatal message func here (from main.c),
removed the StackTraceMode enum.
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
pointer to some functions.
* app/gimpunit.c
* app/unitrc.h: ok, this is ugly: renamed all functions to
_gimp_unit_*() and made them public. The unit list is part
of the Gimp object now, so pass a Gimp* to all functions.
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
functions which are used by widgets.
* app/main.c: cleaned up the global variables, removed the fatal
message handler, call app_init() directly, not via the
user_install stuff, misc. cleanups.
* app/user_install.[ch]: removed the check if user_installation is
needed (done by app_procs.c now).
* app/core/gimp.[ch]: added the user_unit list and the "busy"
boolean. Moved gimp_[set|unset]_busy() here. Added
gimp_initialize() which is called after unitrc and gimprc are
parsed.
* app/batch.c
* app/colormaps.c
* app/devices.c
* app/disp_callbacks.c
* app/gdisplay_ops.c
* app/gimphelp.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/core/gimpcontext.c
* app/core/gimpdatafiles.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimpparasite.c
* app/core/gimpparasitelist.h
* app/gui/file-open-dialog.c
* app/gui/gui.[ch]
* app/gui/info-dialog.c
* app/gui/info-window.c
* app/gui/preferences-dialog.c
* app/gui/session.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptransformtool.c
* app/tools/tool_manager.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcursor.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/app.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/unit.pdb
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
2001-07-11 03:16:16 +08:00
|
|
|
{
|
2016-09-14 07:27:42 +08:00
|
|
|
GimpUserInstall *install = gimp_user_install_new (G_OBJECT (gimp),
|
|
|
|
be_verbose);
|
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
user_installation is needed here, not in user_install.c, parse
gtkrc an friends only if(!no_interface), create the Gimp object
before parsing gimp's rc files an pas it to the parse functions,
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
* app/errors.[ch]: added the fatal message func here (from main.c),
removed the StackTraceMode enum.
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
pointer to some functions.
* app/gimpunit.c
* app/unitrc.h: ok, this is ugly: renamed all functions to
_gimp_unit_*() and made them public. The unit list is part
of the Gimp object now, so pass a Gimp* to all functions.
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
functions which are used by widgets.
* app/main.c: cleaned up the global variables, removed the fatal
message handler, call app_init() directly, not via the
user_install stuff, misc. cleanups.
* app/user_install.[ch]: removed the check if user_installation is
needed (done by app_procs.c now).
* app/core/gimp.[ch]: added the user_unit list and the "busy"
boolean. Moved gimp_[set|unset]_busy() here. Added
gimp_initialize() which is called after unitrc and gimprc are
parsed.
* app/batch.c
* app/colormaps.c
* app/devices.c
* app/disp_callbacks.c
* app/gdisplay_ops.c
* app/gimphelp.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/core/gimpcontext.c
* app/core/gimpdatafiles.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimpparasite.c
* app/core/gimpparasitelist.h
* app/gui/file-open-dialog.c
* app/gui/gui.[ch]
* app/gui/info-dialog.c
* app/gui/info-window.c
* app/gui/preferences-dialog.c
* app/gui/session.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptransformtool.c
* app/tools/tool_manager.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcursor.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/app.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/unit.pdb
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
2001-07-11 03:16:16 +08:00
|
|
|
|
2006-04-29 08:47:53 +08:00
|
|
|
#ifdef GIMP_CONSOLE_COMPILATION
|
2021-08-23 19:26:43 +08:00
|
|
|
gimp_user_install_run (install, 1);
|
2006-04-29 08:47:53 +08:00
|
|
|
#else
|
2006-06-05 21:48:57 +08:00
|
|
|
if (! (no_interface ?
|
2021-08-23 19:26:43 +08:00
|
|
|
gimp_user_install_run (install, 1) :
|
2016-12-21 11:05:32 +08:00
|
|
|
user_install_dialog_run (install)))
|
|
|
|
exit (EXIT_FAILURE);
|
2004-07-12 22:32:31 +08:00
|
|
|
#endif
|
2006-04-29 08:47:53 +08:00
|
|
|
|
|
|
|
gimp_user_install_free (install);
|
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
user_installation is needed here, not in user_install.c, parse
gtkrc an friends only if(!no_interface), create the Gimp object
before parsing gimp's rc files an pas it to the parse functions,
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
* app/errors.[ch]: added the fatal message func here (from main.c),
removed the StackTraceMode enum.
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
pointer to some functions.
* app/gimpunit.c
* app/unitrc.h: ok, this is ugly: renamed all functions to
_gimp_unit_*() and made them public. The unit list is part
of the Gimp object now, so pass a Gimp* to all functions.
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
functions which are used by widgets.
* app/main.c: cleaned up the global variables, removed the fatal
message handler, call app_init() directly, not via the
user_install stuff, misc. cleanups.
* app/user_install.[ch]: removed the check if user_installation is
needed (done by app_procs.c now).
* app/core/gimp.[ch]: added the user_unit list and the "busy"
boolean. Moved gimp_[set|unset]_busy() here. Added
gimp_initialize() which is called after unitrc and gimprc are
parsed.
* app/batch.c
* app/colormaps.c
* app/devices.c
* app/disp_callbacks.c
* app/gdisplay_ops.c
* app/gimphelp.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/core/gimpcontext.c
* app/core/gimpdatafiles.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimpparasite.c
* app/core/gimpparasitelist.h
* app/gui/file-open-dialog.c
* app/gui/gui.[ch]
* app/gui/info-dialog.c
* app/gui/info-window.c
* app/gui/preferences-dialog.c
* app/gui/session.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptransformtool.c
* app/tools/tool_manager.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcursor.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/app.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/unit.pdb
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
2001-07-11 03:16:16 +08:00
|
|
|
}
|
1998-04-30 13:30:28 +08:00
|
|
|
|
2014-10-07 02:33:47 +08:00
|
|
|
g_object_unref (gimpdir);
|
|
|
|
|
2018-03-26 07:22:36 +08:00
|
|
|
gimp_load_config (gimp, alternate_system_gimprc, alternate_gimprc);
|
|
|
|
|
2018-02-21 21:39:43 +08:00
|
|
|
/* Initialize the error handling after creating/migrating the config
|
|
|
|
* directory because it will create some folders for backup and crash
|
|
|
|
* logs in advance. Therefore running this before
|
|
|
|
* gimp_user_install_new() would break migration as well as initial
|
|
|
|
* folder creations.
|
2018-03-26 07:22:36 +08:00
|
|
|
*
|
|
|
|
* It also needs to be run after gimp_load_config() because error
|
|
|
|
* handling is based on Preferences. It means that early loading code
|
|
|
|
* is not handled by our debug code, but that's not a big deal.
|
2018-02-21 21:39:43 +08:00
|
|
|
*/
|
|
|
|
errors_init (gimp, full_prog_name, use_debug_handler,
|
|
|
|
stack_trace_mode, backtrace_file);
|
|
|
|
|
2017-06-15 21:30:45 +08:00
|
|
|
/* run the late-stage sanity check. it's important that this check is run
|
|
|
|
* after the call to language_init() (see comment in sanity_check_late().)
|
|
|
|
*/
|
|
|
|
abort_message = sanity_check_late ();
|
|
|
|
if (abort_message)
|
|
|
|
app_abort (no_interface, abort_message);
|
|
|
|
|
2016-11-11 19:34:10 +08:00
|
|
|
/* initialize lowlevel stuff */
|
|
|
|
gimp_gegl_init (gimp);
|
|
|
|
|
2014-05-03 06:54:20 +08:00
|
|
|
/* Connect our restore_after callback before gui_init() connects
|
|
|
|
* theirs, so ours runs first and can grab the initial monitor
|
|
|
|
* before the GUI's restore_after callback resets it.
|
|
|
|
*/
|
|
|
|
g_signal_connect_after (gimp, "restore",
|
|
|
|
G_CALLBACK (app_restore_after_callback),
|
|
|
|
NULL);
|
|
|
|
|
2013-07-05 03:36:40 +08:00
|
|
|
g_signal_connect_after (gimp, "exit",
|
|
|
|
G_CALLBACK (app_exit_after_callback),
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
app);
|
2018-03-23 02:29:35 +08:00
|
|
|
|
2022-02-07 18:02:19 +08:00
|
|
|
g_signal_connect (app, "activate",
|
|
|
|
G_CALLBACK (app_activate_callback),
|
|
|
|
NULL);
|
|
|
|
retval = g_application_run (app, 0, NULL);
|
2018-03-23 02:29:35 +08:00
|
|
|
|
2022-02-07 18:02:19 +08:00
|
|
|
if (! retval)
|
|
|
|
retval = gimp_core_app_get_exit_status (GIMP_CORE_APP (app));
|
2003-02-03 21:21:31 +08:00
|
|
|
|
2018-01-30 03:14:03 +08:00
|
|
|
if (gimp->be_verbose)
|
|
|
|
g_print ("EXIT: %s\n", G_STRFUNC);
|
|
|
|
|
2021-12-20 01:09:28 +08:00
|
|
|
g_clear_object (&app);
|
2003-11-17 08:17:01 +08:00
|
|
|
|
app: add gimp-parallel
Add gimp-parallel.[cc,h], which provides a set of parallel
algorithms.
These currently include:
- gimp_parallel_distribute(): Calls a callback function in
parallel on multiple threads, passing it the current thread
index, and the total number of threads. Allows specifying the
maximal number of threads used.
- gimp_parallel_distribute_range(): Splits a range of integers
between multiple threads, passing the sub-range to a callback
function. Allows specifying the minimal sub-range size.
- gimp_parallel_distribute_area(): Splits a rectangular area
between multiple threads, passing the sub-area to a callback
function. Allows specifying the minimal sub-area.
The callback function is passed using an appropriately-typed
function pointer, and a user-data pointer. Additionally, when used
in a C++ file, each of the above functions has an overloaded
template version, taking the callback through a generic parameter,
without a user-data pointer, which allows using function objects.
2018-04-05 03:16:42 +08:00
|
|
|
gimp_gegl_exit (gimp);
|
|
|
|
|
2018-05-04 03:43:19 +08:00
|
|
|
errors_exit ();
|
|
|
|
|
2022-04-16 06:40:39 +08:00
|
|
|
while (g_main_context_pending (NULL))
|
|
|
|
g_main_context_iteration (NULL, TRUE);
|
|
|
|
|
2003-11-30 22:44:13 +08:00
|
|
|
g_object_unref (gimp);
|
2007-12-21 00:29:52 +08:00
|
|
|
|
2010-06-25 01:11:56 +08:00
|
|
|
gimp_debug_instances ();
|
2010-06-24 04:30:39 +08:00
|
|
|
|
2007-12-21 00:29:52 +08:00
|
|
|
gegl_exit ();
|
app: when called with --quit, GIMP exit code will report batch failure.
If you call GIMP with batch commands and ask it to quit immediately, you
are likely interested by failure information. For this reason, let's now
report exit code other than success, but only in such case. In
particular, even if the batch commands fail, but GIMP is not set to exit
immediately, we continue reporting SUCCESS run at the very end (when
exiting interactively).
Note that I hardcode a few exit values, as standardly found on Linux
(but not using headers which may not be found on all platforms; in
particular, Windows apparently doesn't use any standard code other than
0 for success, from what my searches return).
Additionally, when several commands are requested, GIMP will now stop at
the first failing and will return its error code, and print a message on
stderr to easily report the failed command for easier debugging.
2022-04-16 08:25:03 +08:00
|
|
|
|
|
|
|
return retval;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2001-03-30 19:16:05 +08:00
|
|
|
|
2001-10-25 21:30:01 +08:00
|
|
|
/* private functions */
|
1998-02-04 06:54:35 +08:00
|
|
|
|
2003-09-02 01:26:09 +08:00
|
|
|
static void
|
2009-12-30 07:38:31 +08:00
|
|
|
app_init_update_noop (const gchar *text1,
|
2003-09-02 01:26:09 +08:00
|
|
|
const gchar *text2,
|
|
|
|
gdouble percentage)
|
|
|
|
{
|
2009-12-30 07:38:31 +08:00
|
|
|
/* deliberately do nothing */
|
|
|
|
}
|
|
|
|
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
static void
|
|
|
|
app_activate_callback (GimpCoreApp *app,
|
|
|
|
gpointer user_data)
|
|
|
|
{
|
|
|
|
Gimp *gimp = NULL;
|
|
|
|
GimpInitStatusFunc update_status_func = NULL;
|
|
|
|
const gchar **filenames;
|
|
|
|
const gchar *current_language;
|
|
|
|
gchar *prev_language = NULL;
|
|
|
|
GError *font_error = NULL;
|
|
|
|
gint batch_retval;
|
|
|
|
|
|
|
|
g_return_if_fail (GIMP_IS_CORE_APP (app));
|
|
|
|
|
|
|
|
gimp = gimp_core_app_get_gimp (app);
|
|
|
|
|
|
|
|
gimp_core_app_set_exit_status (app, EXIT_SUCCESS);
|
|
|
|
|
|
|
|
#ifndef GIMP_CONSOLE_COMPILATION
|
|
|
|
if (! gimp->no_interface)
|
|
|
|
update_status_func = gui_init (gimp, gimp_app_get_no_splash (GIMP_APP (app)), GIMP_APP (app), NULL);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (! update_status_func)
|
|
|
|
update_status_func = app_init_update_noop;
|
|
|
|
|
|
|
|
/* Create all members of the global Gimp instance which need an already
|
|
|
|
* parsed gimprc, e.g. the data factories
|
|
|
|
*/
|
|
|
|
gimp_initialize (gimp, update_status_func);
|
|
|
|
|
|
|
|
g_object_get (gimp->edit_config,
|
|
|
|
"prev-language", &prev_language,
|
|
|
|
NULL);
|
|
|
|
/* Language was already initialized. I call this again only to get the
|
|
|
|
* actual language information.
|
|
|
|
*/
|
|
|
|
current_language = language_init (NULL);
|
|
|
|
gimp->query_all = (prev_language == NULL ||
|
|
|
|
g_strcmp0 (prev_language, current_language) != 0);
|
|
|
|
g_free (prev_language);
|
|
|
|
|
|
|
|
/* Load all data files */
|
|
|
|
gimp_restore (gimp, update_status_func, &font_error);
|
|
|
|
|
|
|
|
/* enable autosave late so we don't autosave when the
|
|
|
|
* monitor resolution is set in gui_init()
|
|
|
|
*/
|
|
|
|
gimp_rc_set_autosave (GIMP_RC (gimp->edit_config), TRUE);
|
|
|
|
|
|
|
|
/* check for updates *after* enabling config autosave, so that the timestamp
|
|
|
|
* is saved
|
|
|
|
*/
|
|
|
|
gimp_update_auto_check (gimp->edit_config, gimp);
|
|
|
|
|
|
|
|
/* Setting properties to be used for the next run. */
|
|
|
|
g_object_set (gimp->edit_config,
|
|
|
|
/* Set this after gimp_update_auto_check(). */
|
|
|
|
"config-version", GIMP_VERSION,
|
|
|
|
/* Set this after gimp_restore(). */
|
|
|
|
"prev-language", current_language,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
#ifndef GIMP_CONSOLE_COMPILATION
|
|
|
|
if (! gimp->no_interface)
|
|
|
|
{
|
|
|
|
/* Before opening images from command line, check for salvaged images
|
|
|
|
* and query interactively to know if we should recover or discard
|
|
|
|
* them.
|
|
|
|
*/
|
|
|
|
GList *recovered_files;
|
|
|
|
GList *iter;
|
|
|
|
|
|
|
|
recovered_files = errors_recovered ();
|
|
|
|
if (recovered_files &&
|
|
|
|
gui_recover (g_list_length (recovered_files)))
|
|
|
|
{
|
|
|
|
for (iter = recovered_files; iter; iter = iter->next)
|
|
|
|
{
|
|
|
|
GFile *file;
|
|
|
|
GimpImage *image;
|
|
|
|
GError *error = NULL;
|
|
|
|
GimpPDBStatusType status;
|
|
|
|
|
|
|
|
file = g_file_new_for_path (iter->data);
|
|
|
|
image = file_open_with_display (gimp,
|
|
|
|
gimp_get_user_context (gimp),
|
|
|
|
NULL,
|
|
|
|
file,
|
|
|
|
gimp_core_app_get_as_new (app),
|
|
|
|
initial_monitor,
|
|
|
|
&status, &error);
|
|
|
|
if (image)
|
|
|
|
{
|
|
|
|
/* Break ties with the backup directory. */
|
|
|
|
gimp_image_set_file (image, NULL);
|
|
|
|
/* One of the rare exceptions where we should call
|
|
|
|
* gimp_image_dirty() directly instead of creating
|
|
|
|
* an undo. We want the image to be dirty from
|
|
|
|
* scratch, without anything to undo.
|
|
|
|
*/
|
|
|
|
gimp_image_dirty (image, GIMP_DIRTY_IMAGE);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
g_error_free (error);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_object_unref (file);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/* Delete backup XCF images. */
|
|
|
|
for (iter = recovered_files; iter; iter = iter->next)
|
|
|
|
{
|
|
|
|
g_unlink (iter->data);
|
|
|
|
}
|
|
|
|
g_list_free_full (recovered_files, g_free);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Load the images given on the command-line. */
|
|
|
|
filenames = gimp_core_app_get_filenames (app);
|
|
|
|
if (filenames != NULL)
|
|
|
|
{
|
|
|
|
gint i;
|
|
|
|
|
|
|
|
for (i = 0; filenames[i] != NULL; i++)
|
|
|
|
{
|
|
|
|
GFile *file = g_file_new_for_commandline_arg (filenames[i]);
|
|
|
|
|
|
|
|
file_open_from_command_line (gimp, file,
|
|
|
|
gimp_core_app_get_as_new (app),
|
|
|
|
initial_monitor);
|
|
|
|
|
|
|
|
g_object_unref (file);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* The software is now fully loaded and ready to be used and get
|
|
|
|
* external input.
|
|
|
|
*/
|
|
|
|
gimp->initialized = TRUE;
|
|
|
|
|
|
|
|
if (font_error)
|
|
|
|
{
|
|
|
|
gimp_message_literal (gimp, NULL,
|
|
|
|
GIMP_MESSAGE_INFO,
|
|
|
|
font_error->message);
|
|
|
|
g_error_free (font_error);
|
|
|
|
}
|
|
|
|
|
|
|
|
batch_retval = gimp_batch_run (gimp,
|
|
|
|
gimp_core_app_get_batch_interpreter (app),
|
|
|
|
gimp_core_app_get_batch_commands (app));
|
|
|
|
|
|
|
|
if (gimp_core_app_get_quit (app))
|
|
|
|
{
|
|
|
|
/* Only if we are in batch mode, we want to exit with the
|
|
|
|
* return value of the batch command.
|
|
|
|
*/
|
|
|
|
gimp_core_app_set_exit_status (app, batch_retval);
|
|
|
|
|
|
|
|
/* Emit the "exit" signal, but also properly free all images still
|
|
|
|
* opened.
|
|
|
|
*/
|
|
|
|
gimp_exit (gimp, TRUE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-05-03 06:54:20 +08:00
|
|
|
static void
|
|
|
|
app_restore_after_callback (Gimp *gimp,
|
|
|
|
GimpInitStatusFunc status_callback)
|
|
|
|
{
|
2018-04-29 23:27:47 +08:00
|
|
|
gint dummy;
|
|
|
|
|
2014-05-03 06:54:20 +08:00
|
|
|
/* Getting the display name for a -1 display returns the initial
|
|
|
|
* monitor during startup. Need to call this from a restore_after
|
|
|
|
* callback, because before restore(), the GUI can't return anything,
|
|
|
|
* after after restore() the initial monitor gets reset.
|
|
|
|
*/
|
2018-04-29 23:27:47 +08:00
|
|
|
g_free (gimp_get_display_name (gimp, -1, &initial_monitor, &dummy));
|
2014-05-03 06:54:20 +08:00
|
|
|
}
|
|
|
|
|
2002-12-05 23:49:59 +08:00
|
|
|
static gboolean
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
app_exit_after_callback (Gimp *gimp,
|
|
|
|
gboolean kill_it,
|
|
|
|
GApplication *app)
|
2001-10-25 21:30:01 +08:00
|
|
|
{
|
2003-10-02 19:26:26 +08:00
|
|
|
if (gimp->be_verbose)
|
2008-02-19 21:38:24 +08:00
|
|
|
g_print ("EXIT: %s\n", G_STRFUNC);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2004-02-26 22:01:57 +08:00
|
|
|
/*
|
|
|
|
* In stable releases, we simply call exit() here. This speeds up
|
|
|
|
* the process of quitting GIMP and also works around the problem
|
|
|
|
* that plug-ins might still be running.
|
|
|
|
*
|
|
|
|
* In unstable releases, we shut down GIMP properly in an attempt
|
|
|
|
* to catch possible problems in our finalizers.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef GIMP_UNSTABLE
|
2007-12-21 00:29:52 +08:00
|
|
|
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
g_application_quit (G_APPLICATION (app));
|
2007-12-21 00:29:52 +08:00
|
|
|
|
2004-02-26 22:01:57 +08:00
|
|
|
#else
|
2007-12-21 00:29:52 +08:00
|
|
|
|
2018-07-06 14:06:18 +08:00
|
|
|
gimp_gegl_exit (gimp);
|
|
|
|
|
2007-12-29 09:35:04 +08:00
|
|
|
gegl_exit ();
|
|
|
|
|
app: cleanup MR !734.
- app_activate_callback() moved with other private functions.
- Removing the `if (app)` test in app_activate_callback() as we don't
set it to NULL anymore. The app variable is always set.
- As a consequence of the previous point, change signature of
app_exit_after_callback() which doesn't have to change the value of
app anymore.
- Don't emit direcly the "exit" signal from app_activate_callback(). We
must call `gimp_exit (gimp, TRUE);` instead, which does more than just
emitting this signal. It also takes care of cleaning any remaining
images without a display. If we don't do this, we are leaking
GeglBuffer when opening images from command lines while quitting
immediately with --quit.
- Get rid of gimp_core_app_set_values() which was completely bypassing
the fact that all the properties of a GimpCoreApp were construct-only.
Instead make these proper properties. I use a trick used in other
interface, creating a gimp_container_view_install_properties() which
is called from child classes.
The point of GimpCoreApp is not just to share a common interface, it's
rather to weakly simulate some kind of multi-inheritance in GObject.
Since we want both GimpApp and GimpConsoleApp to inherit from a same
parent class while we also want them to inherit either from
GtkApplication and GApplication respectively (yet without linking to
GTK in this second case), we are stuck as far as normal GObject
inheritance goes. This is why we use an interface to which we add a
private struct through a GQuark trick. We want the property settings
and function implementations to also be part of this shared code.
- Get rid of all the abstract methods of GimpCoreApp of the form
get_*(). These are useless as we don't expect these to have different
implementation depending on the actual child class. Once again, our
main goal was to simulate multiple inheritance rather than actually
have an interface with various implementations.
- Make "no-splash" a property of GimpApp, because it's cleaner this way.
- Fix gimp_core_app_private_finalize().
- don't use #pragma once, it's not standard. Just use include guards.
- Fix includes: order was wrong, include from the source, not other
headers, etc.
- Clean various other details, coding styles, fix several more bugs and
more…
2022-10-07 02:44:06 +08:00
|
|
|
exit (gimp_core_app_get_exit_status (GIMP_CORE_APP (app)));
|
2007-12-21 00:29:52 +08:00
|
|
|
|
2004-02-26 22:01:57 +08:00
|
|
|
#endif
|
|
|
|
|
2002-12-05 23:49:59 +08:00
|
|
|
return FALSE;
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|