1997-11-25 06:05:25 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (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
|
|
|
|
* along with this program; if not, write to the Free Software
|
1998-04-13 13:44:11 +08:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
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>
|
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
|
|
|
|
2001-02-07 09:16:18 +08:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2001-05-22 04:30:16 +08:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2001-01-25 06:36:18 +08:00
|
|
|
|
2001-05-13 19:35:20 +08:00
|
|
|
#include "tools/tools-types.h"
|
2000-12-17 05:37:03 +08:00
|
|
|
|
2001-05-21 02:37:07 +08:00
|
|
|
#include "base/base.h"
|
2001-04-07 23:58:26 +08:00
|
|
|
|
2002-11-19 04:50:31 +08:00
|
|
|
#include "config/gimprc.h"
|
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
#include "core/gimp.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
#include "core/gimpdatafactory.h"
|
2002-03-28 07:15:00 +08:00
|
|
|
#include "core/gimpunits.h"
|
2001-05-09 10:32:03 +08:00
|
|
|
|
2002-03-21 01:46:13 +08:00
|
|
|
#include "plug-in/plug-ins.h"
|
2001-12-01 08:14:14 +08:00
|
|
|
|
2001-11-11 03:35:21 +08:00
|
|
|
#include "file/file-open.h"
|
2002-04-14 22:38:55 +08:00
|
|
|
#include "file/file-utils.h"
|
2001-11-11 03:35:21 +08:00
|
|
|
|
2001-10-13 20:52:30 +08:00
|
|
|
#include "display/gimpdisplay-foreach.h"
|
2001-09-26 07:23:09 +08:00
|
|
|
|
2001-07-07 20:17:23 +08:00
|
|
|
#include "tools/tool_manager.h"
|
2001-04-07 23:58:26 +08:00
|
|
|
|
2001-04-18 05:43:29 +08:00
|
|
|
#include "gui/gui.h"
|
|
|
|
#include "gui/splash.h"
|
2001-11-11 03:35:21 +08:00
|
|
|
#include "gui/user-install-dialog.h"
|
2001-04-18 05:43:29 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
#include "appenv.h"
|
|
|
|
#include "app_procs.h"
|
|
|
|
#include "batch.h"
|
|
|
|
#include "undo.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
|
|
|
#include "libgimp/gimpintl.h"
|
|
|
|
|
2000-12-29 23:22:01 +08:00
|
|
|
|
2001-10-25 21:30:01 +08:00
|
|
|
/* local prototypes */
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-10-25 21:30:01 +08:00
|
|
|
static void app_init_update_status (const gchar *text1,
|
|
|
|
const gchar *text2,
|
|
|
|
gdouble percentage);
|
|
|
|
static void app_exit_finish (void);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2002-11-19 04:50:31 +08:00
|
|
|
/* gimprc debugging code, to be removed */
|
|
|
|
static void gimprc_notify_callback (GObject *object,
|
|
|
|
GParamSpec *pspec);
|
|
|
|
|
1999-12-18 00:37:50 +08:00
|
|
|
|
2001-10-25 21:30:01 +08:00
|
|
|
/* global variables */
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-10-25 21:30:01 +08:00
|
|
|
Gimp *the_gimp = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
/* public functions */
|
1998-01-20 08:12:21 +08:00
|
|
|
|
2001-07-05 03:31:35 +08:00
|
|
|
void
|
|
|
|
app_init (gint gimp_argc,
|
|
|
|
gchar **gimp_argv)
|
1997-11-25 06:05:25 +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
|
|
|
const gchar *gimp_dir;
|
2002-11-30 21:08:44 +08:00
|
|
|
GimpRc *gimprc;
|
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
|
|
|
|
*/
|
2001-12-01 08:14:14 +08:00
|
|
|
the_gimp = gimp_new (be_verbose,
|
|
|
|
no_data,
|
|
|
|
no_interface,
|
2002-12-01 20:16:03 +08:00
|
|
|
use_shm,
|
2001-12-01 08:14:14 +08:00
|
|
|
stack_trace_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
|
|
|
|
2001-12-02 05:02:34 +08:00
|
|
|
gimp_object_set_name (GIMP_OBJECT (the_gimp), prog_name);
|
|
|
|
|
2001-07-25 23:22:55 +08:00
|
|
|
/* Check if the user's gimp_directory exists
|
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
|
|
|
*/
|
|
|
|
gimp_dir = gimp_directory ();
|
1998-04-30 13:30:28 +08:00
|
|
|
|
2002-02-18 22:34:50 +08:00
|
|
|
if (!g_file_test (gimp_dir, G_FILE_TEST_IS_DIR))
|
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
|
|
|
{
|
|
|
|
/* not properly installed */
|
|
|
|
|
|
|
|
if (no_interface)
|
|
|
|
{
|
|
|
|
g_print (_("The GIMP is not properly installed for the current user\n"));
|
|
|
|
g_print (_("User installation was skipped because the '--nointerface' flag was encountered\n"));
|
|
|
|
g_print (_("To perform user installation, run the GIMP without the '--nointerface' flag\n"));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2002-11-21 04:39:23 +08:00
|
|
|
user_install_dialog_create (alternate_system_gimprc,
|
2002-11-26 22:54:28 +08:00
|
|
|
alternate_gimprc,
|
|
|
|
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
|
|
|
|
|
|
|
gtk_main ();
|
|
|
|
}
|
|
|
|
}
|
1998-04-30 13:30:28 +08:00
|
|
|
|
2002-11-26 22:54:28 +08:00
|
|
|
/* this needs to be done before gimprc loading because gimprc can
|
|
|
|
* use user defined units
|
|
|
|
*/
|
2002-11-19 04:50:31 +08:00
|
|
|
gimp_unitrc_load (the_gimp);
|
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
|
|
|
|
2002-11-30 21:08:44 +08:00
|
|
|
gimprc = gimp_rc_new (alternate_system_gimprc,
|
|
|
|
alternate_gimprc,
|
|
|
|
be_verbose);
|
2002-11-19 04:50:31 +08:00
|
|
|
|
|
|
|
/* solely for debugging */
|
2002-11-30 21:08:44 +08:00
|
|
|
g_signal_connect (G_OBJECT (gimprc), "notify",
|
2002-11-19 04:50:31 +08:00
|
|
|
G_CALLBACK (gimprc_notify_callback),
|
|
|
|
NULL);
|
|
|
|
|
2001-11-23 07:46:13 +08:00
|
|
|
/* initialize lowlevel stuff */
|
2002-12-01 00:31:39 +08:00
|
|
|
base_init (GIMP_BASE_CONFIG (gimprc), use_mmx);
|
2002-11-30 21:08:44 +08:00
|
|
|
|
|
|
|
gimp_set_config (the_gimp, GIMP_CORE_CONFIG (gimprc));
|
|
|
|
|
|
|
|
g_object_unref (gimprc);
|
|
|
|
gimprc = NULL;
|
2001-11-23 07:46:13 +08:00
|
|
|
|
2001-04-16 04:12:16 +08:00
|
|
|
if (! no_interface)
|
|
|
|
{
|
2001-11-18 00:32:34 +08:00
|
|
|
gui_themes_init (the_gimp);
|
2001-08-06 04:34:10 +08:00
|
|
|
|
2001-04-16 04:12:16 +08:00
|
|
|
if (! no_splash)
|
2001-10-22 20:13:44 +08:00
|
|
|
splash_create (! no_splash_image);
|
2001-04-16 04:12:16 +08:00
|
|
|
}
|
1998-07-02 07:06:49 +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 all members of the global Gimp instance which need an already
|
|
|
|
* parsed gimprc, e.g. the data factories
|
2001-07-05 03:31:35 +08:00
|
|
|
*/
|
2001-10-20 00:41:09 +08:00
|
|
|
gimp_initialize (the_gimp, app_init_update_status);
|
2001-07-05 03:31:35 +08:00
|
|
|
|
2001-11-18 00:32:34 +08:00
|
|
|
if (! no_interface)
|
1998-02-18 04:14:29 +08:00
|
|
|
{
|
2002-11-25 08:04:26 +08:00
|
|
|
gui_environ_init (the_gimp);
|
2001-11-18 00:32:34 +08:00
|
|
|
tool_manager_init (the_gimp);
|
1998-02-18 04:14:29 +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
|
|
|
/* Load all data files
|
|
|
|
*/
|
2001-10-20 00:41:09 +08:00
|
|
|
gimp_restore (the_gimp, app_init_update_status, no_data);
|
1998-03-27 02:24:42 +08:00
|
|
|
|
2001-10-24 00:23:32 +08:00
|
|
|
if (! no_interface)
|
|
|
|
{
|
|
|
|
gui_init (the_gimp);
|
2002-06-17 18:34:28 +08:00
|
|
|
tool_manager_restore (the_gimp);
|
2001-10-24 00:23:32 +08:00
|
|
|
}
|
|
|
|
|
2001-10-20 00:41:09 +08:00
|
|
|
/* Initialize the plug-in structures
|
|
|
|
*/
|
2002-03-21 01:46:13 +08:00
|
|
|
plug_ins_init (the_gimp, app_init_update_status);
|
2001-03-30 21:31:41 +08:00
|
|
|
|
2001-04-16 04:12:16 +08:00
|
|
|
if (! no_interface)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-04-16 04:12:16 +08:00
|
|
|
if (! no_splash)
|
|
|
|
splash_destroy ();
|
2001-02-12 11:27:28 +08:00
|
|
|
|
2001-10-25 21:30:01 +08:00
|
|
|
gui_restore (the_gimp, restore_session);
|
1998-08-13 23:25:41 +08:00
|
|
|
}
|
2001-07-05 03:31:35 +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
|
|
|
/* Parse the rest of the command line arguments as images to load
|
|
|
|
*/
|
2001-07-05 03:31:35 +08:00
|
|
|
if (gimp_argc > 0)
|
2001-10-29 19:47:11 +08:00
|
|
|
{
|
2002-04-14 22:38:55 +08:00
|
|
|
gint i;
|
2001-10-29 19:47:11 +08:00
|
|
|
|
|
|
|
for (i = 0; i < gimp_argc; i++)
|
|
|
|
{
|
|
|
|
if (gimp_argv[i])
|
|
|
|
{
|
2002-04-14 22:38:55 +08:00
|
|
|
GError *error = NULL;
|
|
|
|
gchar *uri;
|
2002-02-27 00:30:14 +08:00
|
|
|
|
2002-04-17 04:25:27 +08:00
|
|
|
uri = file_utils_filename_to_uri (the_gimp->load_procs,
|
|
|
|
gimp_argv[i], &error);
|
2002-02-27 00:30:14 +08:00
|
|
|
|
2002-04-14 22:38:55 +08:00
|
|
|
if (! uri)
|
2002-02-27 00:30:14 +08:00
|
|
|
{
|
2002-04-14 22:38:55 +08:00
|
|
|
g_printerr ("conversion filename -> uri failed: %s\n",
|
|
|
|
error->message);
|
|
|
|
g_error_free (error);
|
2002-02-27 00:30:14 +08:00
|
|
|
}
|
2002-04-17 04:25:27 +08:00
|
|
|
else
|
|
|
|
{
|
2002-04-19 22:09:53 +08:00
|
|
|
GimpPDBStatusType dummy;
|
|
|
|
|
|
|
|
file_open_with_display (the_gimp, uri, &dummy, NULL);
|
2002-02-27 00:30:14 +08:00
|
|
|
|
2002-04-17 04:25:27 +08:00
|
|
|
g_free (uri);
|
|
|
|
}
|
2001-10-29 19:47:11 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2001-07-05 03:31:35 +08:00
|
|
|
|
2001-12-01 08:14:14 +08:00
|
|
|
batch_init (the_gimp, batch_cmds);
|
2001-07-05 03:31:35 +08:00
|
|
|
|
|
|
|
if (! no_interface)
|
|
|
|
{
|
2001-07-07 20:17:23 +08:00
|
|
|
gui_post_init (the_gimp);
|
2001-07-05 03:31:35 +08:00
|
|
|
}
|
2001-10-25 21:30:01 +08:00
|
|
|
|
2001-11-18 00:32:34 +08:00
|
|
|
gimp_main_loop (the_gimp);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
|
|
|
|
2001-03-30 19:16:05 +08:00
|
|
|
void
|
|
|
|
app_exit (gboolean kill_it)
|
1998-02-05 13:41:05 +08:00
|
|
|
{
|
2001-03-30 19:16:05 +08:00
|
|
|
/* If it's the user's perogative, and there are dirty images */
|
2002-05-09 01:48:24 +08:00
|
|
|
if (! kill_it && gimp_displays_dirty (the_gimp) && ! no_interface)
|
2001-10-25 21:30:01 +08:00
|
|
|
gui_really_quit_dialog (G_CALLBACK (app_exit_finish));
|
2001-03-30 19:16:05 +08:00
|
|
|
else
|
|
|
|
app_exit_finish ();
|
1998-02-05 13:41:05 +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
|
|
|
|
2001-10-25 21:30:01 +08:00
|
|
|
static void
|
|
|
|
app_init_update_status (const gchar *text1,
|
|
|
|
const gchar *text2,
|
|
|
|
gdouble percentage)
|
|
|
|
{
|
|
|
|
if (! no_interface && ! no_splash)
|
|
|
|
{
|
|
|
|
splash_update (text1, text2, percentage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
app_exit_finish (void)
|
|
|
|
{
|
2001-04-16 04:12:16 +08:00
|
|
|
if (! no_interface)
|
|
|
|
{
|
2001-07-07 20:17:23 +08:00
|
|
|
gui_shutdown (the_gimp);
|
2001-04-16 04:12:16 +08:00
|
|
|
}
|
1999-09-03 01:27:28 +08:00
|
|
|
|
2002-03-21 01:46:13 +08:00
|
|
|
plug_ins_exit (the_gimp);
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2001-04-16 04:12:16 +08:00
|
|
|
if (! no_interface)
|
1997-11-25 06:05:25 +08:00
|
|
|
{
|
2001-11-18 00:32:34 +08:00
|
|
|
tool_manager_exit (the_gimp);
|
|
|
|
|
2001-07-07 20:17:23 +08:00
|
|
|
gui_exit (the_gimp);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
1998-06-23 01:30:40 +08:00
|
|
|
|
2001-07-05 06:59:25 +08:00
|
|
|
gimp_shutdown (the_gimp);
|
|
|
|
|
2001-07-25 09:03:43 +08:00
|
|
|
g_object_unref (G_OBJECT (the_gimp));
|
2001-07-05 03:31:35 +08:00
|
|
|
the_gimp = NULL;
|
|
|
|
|
2001-05-21 02:37:07 +08:00
|
|
|
base_exit ();
|
|
|
|
|
2001-11-18 00:32:34 +08:00
|
|
|
/* There used to be foo_main_quit() here, but there's a chance
|
|
|
|
* that foo_main() was never called before we reach this point. --Sven
|
2000-03-26 02:49:05 +08:00
|
|
|
*/
|
2001-11-18 00:32:34 +08:00
|
|
|
exit (0);
|
1997-11-25 06:05:25 +08:00
|
|
|
}
|
2002-11-19 04:50:31 +08:00
|
|
|
|
2002-11-19 05:08:34 +08:00
|
|
|
|
|
|
|
/****************************************
|
|
|
|
* gimprc debugging code, to be removed *
|
|
|
|
****************************************/
|
|
|
|
|
|
|
|
#include "config/gimpconfig-serialize.h"
|
|
|
|
|
2002-11-19 04:50:31 +08:00
|
|
|
static void
|
|
|
|
gimprc_notify_callback (GObject *object,
|
|
|
|
GParamSpec *pspec)
|
|
|
|
{
|
|
|
|
GString *str;
|
|
|
|
GValue value = { 0, };
|
|
|
|
|
|
|
|
g_return_if_fail (G_IS_OBJECT (object));
|
|
|
|
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
|
|
|
|
|
|
|
|
g_value_init (&value, pspec->value_type);
|
|
|
|
g_object_get_property (object, pspec->name, &value);
|
|
|
|
|
|
|
|
str = g_string_new (NULL);
|
|
|
|
|
|
|
|
if (gimp_config_serialize_value (&value, str, TRUE))
|
|
|
|
{
|
|
|
|
g_print (" %s -> %s\n", pspec->name, str->str);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
g_print (" %s changed but we failed to serialize its value!\n",
|
|
|
|
pspec->name);
|
|
|
|
}
|
|
|
|
|
|
|
|
g_string_free (str, TRUE);
|
|
|
|
g_value_unset (&value);
|
|
|
|
}
|