gimp/app/app_procs.c

269 lines
5.9 KiB
C
Raw Normal View History

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
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1997-11-25 06:05:25 +08:00
*/
app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h 2000-12-29 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/channel_pvt.h * app/drawable_pvt.h * app/gdisplayF.h * app/gimpdrawableP.h * app/gimpimageP.h * app/layer_pvt.h * app/toolsF.h: removed these files. * app/apptypes.h * tools/pdbgen/enums.pl: added tons of opaque typedefs and enums. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/tools.pdb * app/*: chainsaw #include cleanup: - Never (never!!) include stuff in header files except where we need access to structures' contents (like derived objects). - Added prototypes and proper formating in many files. - The #include order in *all* *.c files is as follows: #include "config.h" #include <system stuff> #include <gtk/gtk.h> #include "apptypes.h" #include "gimp stuff" #include "libgimp stuff" #include "libgimp/gimpintl.h" By following this scheme we can easily see a file's dependencies from it's #include's and can grep for the inclusion to find out where a file is used. * tools/pdbgen/app.pl: changed to follow the include scheme above. * libgimp/Makefile.am * libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h and from app/apptypes.h. * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimpprotocol.c * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimptypes.h * libgimp/gimpui.h * libgimp/gimpunit.h * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gdyntext/message_window.c * plug-ins/imagemap/imap_default_dialog.c * plug-ins/imagemap/imap_file.c: these files used to include "libgimp/gimpui.h" without including "libgimp/gimp.h". This is no longer possible because the libgimpui headers don't inlcude "libgimp/gimpunit.h" any more.
2000-12-29 23:22:01 +08:00
#include "config.h"
app/Makefile.am app/gimphelp.[ch] new files 1999-09-27 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/gimphelp.[ch] * app/gimpui.[ch]: new files * app/interface.[ch] * app/preferences_dialog.[ch] The GIMP Help System part 1: Press "F1" in any dialog to pop up the help page for this dialog. Moved the widget constructors from preferences_dialog.[ch] and the query boxes from interface.[ch] to gimpui.[ch]. The dialog constructors take a help_func and a help_data parameter and install the "F1" accelerator which emits the new "help" signal. The "help" signal callback calls help_func(help_data) which finally has to call gimp_help() which in turn invokes the help browser. Still have to find a proper way to (1) prevent "F1" being assigned to some menu item and (2) to catch "F1" while browsing the menu trees in order to pop up the help for the selected item. * app/menus.c: a <Toolbox>/File/Help... menu item. * app/commands.[ch]: a command callback for the "Help..." menu item. * app/gimprc.[ch]: new boolean gimprc variable "use_help". * app/info_dialog.[ch]: pass a help function and data to the info dialog constructor. * app/tools.[ch]: store the tools help page names in the tool info structure. Export a special tools_help_func() which shows the help page for the active tool. * app/[all files calling a dialog constructor]: pass the dialog's help page to the constructor. Most dialogs are now created by gimp_dialog_new() which also sets up the action_area and the WM delete event callback, so I removed the resp. code from these files. Fixed some minor bugs and did some other stuff but didn't change any logic except dialog creation. * plug-ins/helpbrowser/helpbrowser.c: don't try to call a running help browser and don't install any menu path (all done in app/gimphelp.[ch] now).
1999-09-28 01:58:10 +08:00
1997-11-25 06:05:25 +08:00
#include <stdio.h>
#include <string.h>
Convert ugly comments into named structure fields. Much cleaner and less 2001-12-02 Daniel Egger <degger@fhm.edu> * app/gimprc.c: Convert ugly comments into named structure fields. Much cleaner and less errorprone though may cause troubles on older compilers and then needs to be reverted. Please report! * app/base/base-types.h: Add FIXME reminder. * app/base/gimplut.c: Use CLAMP macro instead of if-cascade. * app/base/temp-buf.c: Remove duplicated calculations and simplify checks. * app/base/tile-manager.c: - (tile_manager_get_tile_num): Return success and take an additional pointer for the tilenumber. - Simplify logic in the rest of the file as a result. - Remove rotten debugging cruft. * app/core/gimpbrushgenerated.c: Fix two stylistic nits. * app/app_procs.c: Include <stdlib.h> for exit () prototype. * app/core/gimpdrawable-blend.c: Include <stdlib.h> for abs () prototype. * app/display/gimpdisplay.c: Include <string.h> for memcpy () prototype. * app/core/gimpimage-convert.c: (HIST_RGB): First parameter is not const. Fixes a gcc warning for a wrong return value. * libgimpwidgets/gimpunitmenu.c * app/core/gimpunit.c: Add suggested (by gcc 3.1 cvs) parentheses to group correct logic tests together. * app/paint-funcs/paint-funcs-generic.h: Fix my HAS_ALPHA macro to avoid gcc 3.1 cvs warning. * app/gimprc.h * pathP.h * base-config.h * app/base/boundary.h * app/base/gimplut.[ch] * app/base/pixel-region.h * app/base/pixel-surround.[ch] * app/base/temp-buf.[ch] * app/base/tile-manager-private.h * app/base/tile-manager.c * app/base/tile-private.h * app/base/tile.[ch] * app/core/gimp.h * app/core/gimpbrushgenerated.h * app/core/gimpbrushpipe.h * app/core/gimpchannel.[ch] * app/core/gimpcontainer.h * app/core/gimpcoreconfig.h * app/core/gimpdata.h * app/core/gimpdatafactory.[ch] * app/core/gimpdrawable-blend.c * app/core/gimpdrawable.[ch] * app/core/gimpimage.h * app/core/gimpimagefile.h * app/core/gimplayer.h * app/core/gimplayermask.h * app/core/gimpmoduleinfo.h * app/core/gimppalette.h * app/core/gimpundo.h * app/display/gimpdisplay.h * app/display/gimpdisplayshell-selection.h * app/display/gimpdisplayshell.h * app/gui/brush-select.h * app/gui/gradient-editor.h * app/gui/gradient-select.h * app/gui/info-dialog.h * app/gui/resize-dialog.h * app/tools/gimpbezierselecttool.h * app/tools/gimpcolorbalancetool.h * app/tools/gimpcolorpickertool.h * app/tools/gimpcurvestool.h * app/tools/gimpdodgeburntool.c * app/tools/gimpfreeselecttool.h * app/tools/gimpfuzzyselecttool.h * app/tools/gimphuesaturationtool.h * app/tools/gimpinktool-blob.h * app/tools/gimpinktool.h * app/tools/gimpiscissorstool.h * app/tools/gimpmagnifytool.h * app/tools/gimpmeasuretool.h * app/tools/gimppainttool.h * app/tools/gimppathtool.h * app/tools/gimprectselecttool.h * app/tools/gimpthresholdtool.h * app/tools/gimptool.h * app/tools/gimptransformtool.h * app/tools/path_toolP.h * app/widgets/gimpbrushfactoryview.h * app/widgets/gimpconstrainedhwrapbox.h * app/widgets/gimpcontainermenu.h * app/widgets/gimpcontainerview.h * app/widgets/gimpdialogfactory.h * app/widgets/gimpimagedock.h * app/widgets/gimplistitem.h * app/widgets/gimpmenuitem.h * app/widgets/gimpnavigationpreview.h * app/widgets/gimppreview.h: Unsignify lots of variables and parameters and use bitfields in structs where possible. First part of a huge cleanup all over the code...
2001-12-02 22:59:30 +08:00
#include <stdlib.h>
#ifdef HAVE_SYS_PARAM_H
1997-11-25 06:05:25 +08:00
#include <sys/param.h>
#endif
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
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
Makefile.am configure.in added the new library below. 2001-01-24 Michael Natterer <mitch@gimp.org> * Makefile.am * configure.in * gimptool.in: added the new library below. * libgimpwidgets/Makefile.am * libgimpwidgets/gimpchainbutton.[ch] * libgimpwidgets/gimpcolorarea.[ch] * libgimpwidgets/gimpcolorbutton.[ch] * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpfileselection.[ch] * libgimpwidgets/gimphelpui.[ch] * libgimpwidgets/gimppatheditor.[ch] * libgimpwidgets/gimppixmap.[ch] * libgimpwidgets/gimpquerybox.[ch] * libgimpwidgets/gimpsizeentry.[ch] * libgimpwidgets/gimpunitmenu.[ch] * libgimpwidgets/gimpwidgets.[ch] * libgimpwidgets/gimpwidgets.def * libgimpwidgets/gimpwidgetstypes.h: new shared library. Currently there are some ugly dependencies into libgimp. These will be removed and go to a "libgimpglue" library which will be a library for functions which share a common interface between plug-ins and the app but have different implementations. Include "libgimp/gimpunit.h" from "libgimpwidgets/gimpwidgetstypes.h" to simulate this upcoming separation. * libgimp/Makefile.am * libgimp/gimpchainbutton.[ch] * libgimp/gimpcolorarea.[ch] * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimpfileselection.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimppixmap.[ch] * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: removed from here. * libgimp/gimpui.h * libgimp/gimpuitypes.h * libgimp/makefile.mingw.in * libgimp/makefile.msc: changed accordingly. * app/[all ui files] * app/pdb/palette_cmds.c * app/pdb/tools_cmds.c * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/tools.pdb: #include "libgimpwidgets/gimpwidgets.h" and removed useless includes. * app/apptypes.h: #include "libgimpwidgets/gimpwidgetstypes.h" * app/Makefile.am * plug-ins/[all makefiles which link against libgimpui]: link against libgimpwidgets.la * po-libgimp/POTFILES.in: changed file locations.
2001-01-25 06:36:18 +08:00
removed some forgotten tools types. 2001-05-13 Michael Natterer <mitch@gimp.org> * app/apptypes.h: removed some forgotten tools types. * app/tools/tools-types.h: and added them here. * app/interface.c * app/disp_callbacks.[ch]: ported dropping of drawables to the new DND system. * app/app_procs.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimptoolinfo.h * app/gui/gui.c * app/tools/tool_options.c * app/widgets/gimpchannellistview.c * app/widgets/gimplayerlistview.c: removed/fixed includes. * app/gui/brush-select.[ch] * app/gui/pattern-select.[ch]: removed the display of the current name (done by the grid view now). * app/gui/palette-select.c: fixed palette preview size. * app/gui/dialogs-constructors.c: added get_name() functions for brushes, patterns, images and palettes. * app/widgets/gimpcontainergridview.[ch]: added a label for the name of the active item. * app/widgets/gimpdnd.[ch]: removed the old drawable DND preview icon code. * tools/pdbgen/app.pl: braino: the $tool_eek hack has to be initialized to 0 at the beginning of each file, otherwise we end up including "tools/tools-types.h" everywhere. * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/text_tool.pdb * tools/pdbgen/pdb/tools.pdb: add "tools/tools-types.h" where needed. * app/pdb/color_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db_cmds.c * app/pdb/selection_cmds.c * app/pdb/undo_cmds.c * app/pdb/unit_cmds.c: regenerated.
2001-05-13 19:35:20 +08:00
#include "tools/tools-types.h"
#include "base/base.h"
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
2001-07-05 03:31:35 +08:00
#include "core/gimp.h"
#include "core/gimpdatafactory.h"
#include "core/gimpunits.h"
badly chopped into the new files below. Pass around much more "PlugIn" and 2002-03-20 Michael Natterer <mitch@gimp.org> * app/plug-in/plug-in.[ch]: badly chopped into the new files below. Pass around much more "PlugIn" and "Gimp" pointers instead of using "current_plug_in" and "the_gimp". Needs much more hacking though... :( * app/plug-in/Makefile.am * app/plug-in/plug-in-def.[ch] * app/plug-in/plug-in-params.[ch] * app/plug-in/plug-in-progress.[ch] * app/plug-in/plug-ins.[ch]: new files. * app/gui/Makefile.am * app/gui/plug-in-commands.[ch] * app/gui/plug-in-menus.[ch]: ditto. * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-types.h: changed accordingly. * app/pdb/procedural_db.c: changed procedural_db_destroy_args() so it can be used from plug_in_args_destroy(). Fixed a parasite memory leak (or introduced a new SEGV, we'll see...). * app/display/Makefile.am: another "truly ugly hack" until the plug-in menu stuff is chopped even more... * app/gui/commands.[ch]: removed filters_repeat_cmd_callback() here, it is now in plug-in-commands.[ch]. * app/widgets/gimpitemfactory.[ch]: removed all gimp_menu_item_*() hacks. We have a GimpItemFactory available in most cases we used to call this functions, and can use gimp_item_factors_from_path() in all other cases. The item factory stuff needs more work anyway... * app/app_procs.c * app/gimphelp.c * app/display/gimpdisplayshell.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/menus.c * app/gui/paths-dialog.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly (includes, renamed functions and gimp_menu_item_*() removal). * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2002-03-21 01:46:13 +08:00
#include "plug-in/plug-ins.h"
app/Makefile.am removed... 2001-11-30 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/plug_in.[ch]: removed... * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in.[ch]: ...and added here. * app/appenv.h: removed StackTraceMode and MessageHandlerType... * libgimpbase/gimpbasetypes.h: ...and added them here. * tools/pdbgen/Makefile.am: don't scan "app/apptypes.h" for enums. * tools/pdbgen/enumcode.pl: added a general check to prevent enums which are defined in libgimp* from being written to "libgimp/gimpenums.c". * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/core/core-types.h: include "pdb/pdb-types.h" so including "core/core-types.h" gets the whole core type space. * app/core/gimp.[ch]: added a "stack_trace_mode" parameter to the constructor and store it in the Gimp struct because the value is also passed to plug-ins and nobody should include "appenv.h". * app/gimprc.[ch]: pass the alternate_system_gimprc and alternate_gimprc filenames from the command line to gimprc_prase() so we don't need to include "appenv.h". * app/batch.[ch]: pass the "batch_cmds" as parameter, don't include "append.h". * app/app_procs.c: pass more parameters around. * app/devices.c * app/errors.c * app/gimphelp.c * app/main.c * app/core/gimpgradient.c * app/display/gimpdisplay.c * app/display/gimpdisplayshell.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/commands.c * app/gui/error-console-dialog.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/paths-dialog.c * app/gui/user-install-dialog.c * app/tools/gimpbezierselecttool.c * app/tools/xinput_airbrush.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly: - changed "plug-in.h" include where needed. - don't call gimp_fatal_error() directly, it's called via the log handler when calling g_error(). - don't incude "errors.h" except from main.c. - changed stack_trace and message_handler enum names. - get "stack_trace_mode" from Gimp. - removed many inclusions of "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db.c: regenerated.
2001-12-01 08:14:14 +08:00
#include "file/file-open.h"
Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. 2002-04-14 Michael Natterer <mitch@gimp.org> Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: port everything to using URIs, removed file_open_absolute_filename() and added file_utils_filename_to_uri() instead. * app/core/gimpimage.[ch]: added gimp_image_[get|set]_uri() which works like the old gimp_image_[get|set]_filename(). Changed gimp_image_[get|set]_filename() to call uri conversion functions. * app/app_procs.c: removed lots of code and use the new uri functions to open images passed on the command line. * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c: changed accordingly. * app/nav_window.c * app/undo_history.c * app/display/gimpdisplayshell.c * app/gui/info-window.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c: s/gimp_image_get_filename()/gimp_image_get_uri()/g. Need to add a utility function which returns the basename in unescaped UTF-8. * app/gui/file-commands.c * app/widgets/gimpdocumentview.c: use "uri", not "filename" as variable name where appropriate. * app/gui/menus.c: some broken code for the "Open Recent" items, will be fixed soon... * app/widgets/gimpdnd.c: evil (!!!) hackery to convert dropped filenames to uris. * tools/pdbgen/pdb/fileops.pdb: changed accordingly. Clarified the meaning of the "raw_filename" parameter. * tools/pdbgen/pdb/message.pdb: use g_message("%s", message), *not* g_message(message). * app/pdb/fileops_cmds.c * app/pdb/message_cmds.c * libgimp/gimpfileops_pdb.c: regenerated.
2002-04-14 22:38:55 +08:00
#include "file/file-utils.h"
gdk_pixbuf_new_from_stream -> _from_inline 2001-10-13 Michael Natterer <mitch@gimp.org> * RELEASE-TO-CVS.patch: gdk_pixbuf_new_from_stream -> _from_inline * app/display/Makefile.am * app/display/gimpdisplay-foreach.[ch]: new files for functions operating on all displays (will go away as soon as the display behaves like a proper view which doesn't need to be updated explicitly). * app/display/gimpdisplay-callbacks.c * app/display/gimpdisplay-scale.[ch] * app/display/gimpdisplay-scroll.[ch] * app/display/gimpdisplay.[ch]: "scale" and "scroll" namespace cleanup, moved bounds_checking() to gimpdisplay-scroll.[ch], lots of unfinished, intermediate stuff. * app/display/gimpdisplayshell.[ch]: added some GObject framework for the GimpDisplayShell object (not used yet). * app/app_procs.c * app/docindex.c * app/image_map.c * app/nav_window.c * app/path.c * app/qmask.c * app/undo.c * app/gui/channels-commands.c * app/gui/convert-dialog.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/layer-select.c * app/gui/layers-commands.c * app/gui/offset-dialog.c * app/gui/paths-dialog.c * app/gui/preferences-dialog.c * app/gui/select-commands.c * app/gui/view-commands.c * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/gimptransformtool.c * app/widgets/gimpbufferview.c * app/widgets/gimpchannellistview.c * app/widgets/gimpcomponentlistitem.c * app/widgets/gimpdrawablelistitem.c * app/widgets/gimpdrawablelistview.c * app/widgets/gimplayerlistitem.c * app/widgets/gimplayerlistview.c * app/widgets/gimplistitem.c * tools/pdbgen/pdb/display.pdb * app/pdb/display_cmds.c: changed accordingly (mostly including "gimpdisplay-foreach.h" instead of "gimpdisplay.h")
2001-10-13 20:52:30 +08:00
#include "display/gimpdisplay-foreach.h"
app/Makefile.am removed. 2001-07-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/context_manager.[ch]: removed. * app/app_procs.c: call tool_mananger instead of context_manager functions, pass "the_gimp" to some more functions. * app/drawable.[ch]: pass a GimpContext to drawable_fill(). * app/errors.c: behave according to "stack_trace_mode" when using the debugging signal handler. * app/gimprc.[ch]: removed the core/ config variables. * app/selection.c: set the selection's state to INVISIBLE in selection_pause(). * app/core/Makefile.am * app/core/gimpcoreconfig.[ch]: new files (the configuration variables used by core/). * app/core/gimpcontext.[ch]: removed the global contexts (user, default, ...) and their functions. It's no longer possible to pass NULL to the context functions to manipulate the current context (gimpcontext.c doesn't know the current context any more). * app/core/gimp.[ch]: added them here. The functions are now called gimp_[set|get]_*_context(). Added gimp_create_context() which is the only function to create contexts now. * app/gui/dialogs.[ch] * app/gui/gui.[ch]: pass "gimp" to all functions. * app/tools/tool_manager.[ch] * app/tools/tools.[ch]: pass "gimp" to lots of functions. Added the "global_tool_context" logic and the global/non-global paint options switching from the context_manager. Pass "gimp" to all tools' "register" functions. * app/tools/*: changed accordingly. * app/devices.c * app/disp_callbacks.c * app/file-open.[ch] * app/file-save.c * app/gdisplay.c * app/gimage.c * app/libgimp_glue.c * app/module_db.c * app/nav_window.c * app/plug_in.c * app/qmask.c * app/undo.c * app/base/base-config.c * app/core/gimpbrushpipe.c * app/core/gimpdrawable-offset.c * app/core/gimpgradient.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimppalette.c * app/core/gimptoolinfo.[ch] * app/core/gimpundo.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-area.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.c * app/gui/test-commands.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/widgets/gimpchannellistview.c * app/widgets/gimpdnd.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimpimagedock.c * app/widgets/gimplayerlistview.c * app/pdb/brushes_cmds.c * app/pdb/drawable_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/palette_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db.c * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly: remove usage of gimp_context_[get|set]_*(NULL), create contexts with gimp_create_context(). Get the user/current context with gimp_get_[user|current]_context(). Added/removed access to the global "the_gimp" variable in some places. Get the core's config variables from "core_config".
2001-07-07 20:17:23 +08:00
#include "tools/tool_manager.h"
app/Makefile.am app/gui/Makefile.am app/about_dialog.[ch] 2001-04-17 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/gui/Makefile.am * app/about_dialog.[ch] * app/brush_edit.[ch] * app/brush_select.[ch] * app/channels_dialog.[ch] * app/color_area.[ch] * app/color_notebook.[ch] * app/color_select.[ch] * app/colormap_dialog.[ch] * app/commands.[ch] * app/file_new_dialog.[ch] * app/gradient_editor.[ch] * app/gradient_select.[ch] * app/indicator_area.[ch] * app/info_dialog.[ch] * app/info_window.[ch] * app/layer_select.[ch] * app/layers_dialog.[ch] * app/menus.[ch] * app/palette.[ch] * app/palette_import.[ch] * app/palette_select.[ch] * app/paths_dialog.[ch] * app/pattern_select.[ch] * app/preferences_dialog.[ch] * app/session.[ch] * app/test_commands.[ch] * app/tips_dialog.[ch] * app/toolbox.[ch]: moved to gui/ (s/_/-/ and some more useful filenames on the way). * app/app_procs.c * app/context_manager.c * app/convert.c * app/disp_callbacks.c * app/errorconsole.c * app/file-open.c * app/file-save.c * app/file-utils.c * app/gdisplay.c * app/gimage.c * app/gimprc.c * app/image_new.c * app/interface.c * app/nav_window.c * app/path.c * app/plug_in.c * app/gui/dialogs-constructors.c * app/pdb/brush_select_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpscaletool.c * app/tools/gimptransformtool.c * app/widgets/gimpcolorpanel.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * po/POTFILES.in: changed accordingly.
2001-04-18 05:43:29 +08:00
#include "gui/gui.h"
#include "gui/splash.h"
#include "gui/user-install-dialog.h"
app/Makefile.am app/gui/Makefile.am app/about_dialog.[ch] 2001-04-17 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/gui/Makefile.am * app/about_dialog.[ch] * app/brush_edit.[ch] * app/brush_select.[ch] * app/channels_dialog.[ch] * app/color_area.[ch] * app/color_notebook.[ch] * app/color_select.[ch] * app/colormap_dialog.[ch] * app/commands.[ch] * app/file_new_dialog.[ch] * app/gradient_editor.[ch] * app/gradient_select.[ch] * app/indicator_area.[ch] * app/info_dialog.[ch] * app/info_window.[ch] * app/layer_select.[ch] * app/layers_dialog.[ch] * app/menus.[ch] * app/palette.[ch] * app/palette_import.[ch] * app/palette_select.[ch] * app/paths_dialog.[ch] * app/pattern_select.[ch] * app/preferences_dialog.[ch] * app/session.[ch] * app/test_commands.[ch] * app/tips_dialog.[ch] * app/toolbox.[ch]: moved to gui/ (s/_/-/ and some more useful filenames on the way). * app/app_procs.c * app/context_manager.c * app/convert.c * app/disp_callbacks.c * app/errorconsole.c * app/file-open.c * app/file-save.c * app/file-utils.c * app/gdisplay.c * app/gimage.c * app/gimprc.c * app/image_new.c * app/interface.c * app/nav_window.c * app/path.c * app/plug_in.c * app/gui/dialogs-constructors.c * app/pdb/brush_select_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c * app/tools/gimpcolorpickertool.c * app/tools/gimpcroptool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpscaletool.c * app/tools/gimptransformtool.c * app/widgets/gimpcolorpanel.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb * po/POTFILES.in: changed accordingly.
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 "gimprc.h"
#include "undo.h"
#include "libgimp/gimpintl.h"
app/Makefile.am app/channel_pvt.h app/drawable_pvt.h app/gdisplayF.h 2000-12-29 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/channel_pvt.h * app/drawable_pvt.h * app/gdisplayF.h * app/gimpdrawableP.h * app/gimpimageP.h * app/layer_pvt.h * app/toolsF.h: removed these files. * app/apptypes.h * tools/pdbgen/enums.pl: added tons of opaque typedefs and enums. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/color.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/selection.pdb * tools/pdbgen/pdb/tools.pdb * app/*: chainsaw #include cleanup: - Never (never!!) include stuff in header files except where we need access to structures' contents (like derived objects). - Added prototypes and proper formating in many files. - The #include order in *all* *.c files is as follows: #include "config.h" #include <system stuff> #include <gtk/gtk.h> #include "apptypes.h" #include "gimp stuff" #include "libgimp stuff" #include "libgimp/gimpintl.h" By following this scheme we can easily see a file's dependencies from it's #include's and can grep for the inclusion to find out where a file is used. * tools/pdbgen/app.pl: changed to follow the include scheme above. * libgimp/Makefile.am * libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h and from app/apptypes.h. * libgimp/gimpcolorbutton.[ch] * libgimp/gimpdialog.[ch] * libgimp/gimphelpui.[ch] * libgimp/gimpparasite.[ch] * libgimp/gimppatheditor.[ch] * libgimp/gimpprotocol.c * libgimp/gimpquerybox.[ch] * libgimp/gimpsizeentry.[ch] * libgimp/gimptypes.h * libgimp/gimpui.h * libgimp/gimpunit.h * libgimp/gimpunitmenu.[ch] * libgimp/gimpwidgets.[ch]: changed accordingly. * plug-ins/FractalExplorer/Dialogs.c * plug-ins/gdyntext/message_window.c * plug-ins/imagemap/imap_default_dialog.c * plug-ins/imagemap/imap_file.c: these files used to include "libgimp/gimpui.h" without including "libgimp/gimp.h". This is no longer possible because the libgimpui headers don't inlcude "libgimp/gimpunit.h" any more.
2000-12-29 23:22:01 +08:00
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
/* local prototypes */
1997-11-25 06:05:25 +08:00
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
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
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
/* global variables */
1997-11-25 06:05:25 +08:00
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
Gimp *the_gimp = NULL;
/* public functions */
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
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;
/* Create an instance of the "Gimp" object which is the root of the
* core object system
*/
app/Makefile.am removed... 2001-11-30 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/plug_in.[ch]: removed... * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in.[ch]: ...and added here. * app/appenv.h: removed StackTraceMode and MessageHandlerType... * libgimpbase/gimpbasetypes.h: ...and added them here. * tools/pdbgen/Makefile.am: don't scan "app/apptypes.h" for enums. * tools/pdbgen/enumcode.pl: added a general check to prevent enums which are defined in libgimp* from being written to "libgimp/gimpenums.c". * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/core/core-types.h: include "pdb/pdb-types.h" so including "core/core-types.h" gets the whole core type space. * app/core/gimp.[ch]: added a "stack_trace_mode" parameter to the constructor and store it in the Gimp struct because the value is also passed to plug-ins and nobody should include "appenv.h". * app/gimprc.[ch]: pass the alternate_system_gimprc and alternate_gimprc filenames from the command line to gimprc_prase() so we don't need to include "appenv.h". * app/batch.[ch]: pass the "batch_cmds" as parameter, don't include "append.h". * app/app_procs.c: pass more parameters around. * app/devices.c * app/errors.c * app/gimphelp.c * app/main.c * app/core/gimpgradient.c * app/display/gimpdisplay.c * app/display/gimpdisplayshell.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/commands.c * app/gui/error-console-dialog.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/paths-dialog.c * app/gui/user-install-dialog.c * app/tools/gimpbezierselecttool.c * app/tools/xinput_airbrush.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly: - changed "plug-in.h" include where needed. - don't call gimp_fatal_error() directly, it's called via the log handler when calling g_error(). - don't incude "errors.h" except from main.c. - changed stack_trace and message_handler enum names. - get "stack_trace_mode" from Gimp. - removed many inclusions of "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db.c: regenerated.
2001-12-01 08:14:14 +08:00
the_gimp = gimp_new (be_verbose,
no_data,
no_interface,
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
gimp_object_set_name (GIMP_OBJECT (the_gimp), prog_name);
/* 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
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
{
user_install_dialog_create (the_gimp);
gtk_main ();
}
}
1998-04-30 13:30:28 +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
/* The user_install dialog may have parsed unitrc and gimprc, so
* check gimprc_init()'s return value
*/
if (gimprc_init (the_gimp))
gimprc.in replaced "color-cube" by "min-colors". 2000-04-30 Michael Natterer <mitch@gimp.org> * gimprc.in * app/gimprc.[ch]: replaced "color-cube" by "min-colors". * app/app_procs.c: read unitrc/gimprc before displaying the splash. * app/colormaps.c: set min_colors and install_cmap before initializing GdkRGB. * app/gimprc.[ch] * app/gimpunit.c: don't call the splash's progress_update function. * app/plug_in.c: pass min_colors instead of color_cube to plugins. * app/preferences_dialog.c: widget for min_colors. * libgimp/gimp.[ch]: s/color_cube/min_colors/ but left gimp_color_cube() there for source level compatibility. * libgimp/gimpprotocol.[ch]: changed the GPConfig message accordinly and increased the gimp protocol version number because the change breaks binary compatibility. Also actually pass the use_xshm variable over the wire (was only in the GPConfig struct before). Was it the right thing to do to increase the version number?? * libgimp/gimpui.c (gimp_ui_init): use the same code as the app for initializing GdkRGB. Never explicitly activate Gdk's SHM usage (only switch it off). * app/main.c * libgimp/gimp.c: reverted the handling of all signals except SIGCHLD back to plain old signal() because those signals are fatal anyway and sigaction() as used by gimp_signal_*() made debugging (stacktrace) impossible. * plug-ins/AlienMap/AlienMap.c * plug-ins/AlienMap2/AlienMap2.c * plug-ins/FractalExplorer/Dialogs.c * plug-ins/bmp/bmp.c * plug-ins/borderaverage/borderaverage.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/faxg3/faxg3.c * plug-ins/fits/fits.c * plug-ins/flame/flame.c * plug-ins/fp/fp.c * plug-ins/fp/fp_gtk.c * plug-ins/gdyntext/Makefile.am * plug-ins/gdyntext/gdyntext_ui.c * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c * plug-ins/gfli/gfli.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/Makefile.am * plug-ins/imagemap/imap_main.c * plug-ins/maze/maze_face.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/print/print.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu-server.c * plug-ins/sel2path/Makefile.am * plug-ins/sel2path/sel2path.c * plug-ins/sgi/sgi.c * plug-ins/sinus/sinus.c * plug-ins/struc/struc.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c * plug-ins/xjt/xjt.c: use gimp_ui_init(). * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_ui.c: only switch Gdk SHM usage off, never on. Don't use gimp_ui_init() here because of libgck.
2000-05-01 02:17:55 +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
/* this needs to be done before gimprc loading */
gimp_unitrc_load (the_gimp);
/* parse the local GIMP configuration file */
app/Makefile.am removed... 2001-11-30 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/plug_in.[ch]: removed... * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in.[ch]: ...and added here. * app/appenv.h: removed StackTraceMode and MessageHandlerType... * libgimpbase/gimpbasetypes.h: ...and added them here. * tools/pdbgen/Makefile.am: don't scan "app/apptypes.h" for enums. * tools/pdbgen/enumcode.pl: added a general check to prevent enums which are defined in libgimp* from being written to "libgimp/gimpenums.c". * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/core/core-types.h: include "pdb/pdb-types.h" so including "core/core-types.h" gets the whole core type space. * app/core/gimp.[ch]: added a "stack_trace_mode" parameter to the constructor and store it in the Gimp struct because the value is also passed to plug-ins and nobody should include "appenv.h". * app/gimprc.[ch]: pass the alternate_system_gimprc and alternate_gimprc filenames from the command line to gimprc_prase() so we don't need to include "appenv.h". * app/batch.[ch]: pass the "batch_cmds" as parameter, don't include "append.h". * app/app_procs.c: pass more parameters around. * app/devices.c * app/errors.c * app/gimphelp.c * app/main.c * app/core/gimpgradient.c * app/display/gimpdisplay.c * app/display/gimpdisplayshell.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/commands.c * app/gui/error-console-dialog.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/paths-dialog.c * app/gui/user-install-dialog.c * app/tools/gimpbezierselecttool.c * app/tools/xinput_airbrush.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly: - changed "plug-in.h" include where needed. - don't call gimp_fatal_error() directly, it's called via the log handler when calling g_error(). - don't incude "errors.h" except from main.c. - changed stack_trace and message_handler enum names. - get "stack_trace_mode" from Gimp. - removed many inclusions of "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db.c: regenerated.
2001-12-01 08:14:14 +08:00
gimprc_parse (the_gimp, alternate_system_gimprc, alternate_gimprc);
gimprc.in replaced "color-cube" by "min-colors". 2000-04-30 Michael Natterer <mitch@gimp.org> * gimprc.in * app/gimprc.[ch]: replaced "color-cube" by "min-colors". * app/app_procs.c: read unitrc/gimprc before displaying the splash. * app/colormaps.c: set min_colors and install_cmap before initializing GdkRGB. * app/gimprc.[ch] * app/gimpunit.c: don't call the splash's progress_update function. * app/plug_in.c: pass min_colors instead of color_cube to plugins. * app/preferences_dialog.c: widget for min_colors. * libgimp/gimp.[ch]: s/color_cube/min_colors/ but left gimp_color_cube() there for source level compatibility. * libgimp/gimpprotocol.[ch]: changed the GPConfig message accordinly and increased the gimp protocol version number because the change breaks binary compatibility. Also actually pass the use_xshm variable over the wire (was only in the GPConfig struct before). Was it the right thing to do to increase the version number?? * libgimp/gimpui.c (gimp_ui_init): use the same code as the app for initializing GdkRGB. Never explicitly activate Gdk's SHM usage (only switch it off). * app/main.c * libgimp/gimp.c: reverted the handling of all signals except SIGCHLD back to plain old signal() because those signals are fatal anyway and sigaction() as used by gimp_signal_*() made debugging (stacktrace) impossible. * plug-ins/AlienMap/AlienMap.c * plug-ins/AlienMap2/AlienMap2.c * plug-ins/FractalExplorer/Dialogs.c * plug-ins/bmp/bmp.c * plug-ins/borderaverage/borderaverage.c * plug-ins/dbbrowser/dbbrowser.c * plug-ins/faxg3/faxg3.c * plug-ins/fits/fits.c * plug-ins/flame/flame.c * plug-ins/fp/fp.c * plug-ins/fp/fp_gtk.c * plug-ins/gdyntext/Makefile.am * plug-ins/gdyntext/gdyntext_ui.c * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c * plug-ins/gfli/gfli.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/helpbrowser/helpbrowser.c * plug-ins/ifscompose/ifscompose.c * plug-ins/imagemap/Makefile.am * plug-ins/imagemap/imap_main.c * plug-ins/maze/maze_face.c * plug-ins/mosaic/mosaic.c * plug-ins/pagecurl/pagecurl.c * plug-ins/print/print.c * plug-ins/rcm/rcm_dialog.c * plug-ins/script-fu/script-fu-console.c * plug-ins/script-fu/script-fu-scripts.c * plug-ins/script-fu/script-fu-server.c * plug-ins/sel2path/Makefile.am * plug-ins/sel2path/sel2path.c * plug-ins/sgi/sgi.c * plug-ins/sinus/sinus.c * plug-ins/struc/struc.c * plug-ins/webbrowser/webbrowser.c * plug-ins/winsnap/winsnap.c * plug-ins/xjt/xjt.c: use gimp_ui_init(). * plug-ins/Lighting/lighting_ui.c * plug-ins/MapObject/mapobject_ui.c: only switch Gdk SHM usage off, never on. Don't use gimp_ui_init() here because of libgck.
2000-05-01 02:17:55 +08:00
}
bumped version number to 1.3.1. Require Glib/GTK+-1.3.11 and Pango-0.22. 2001-11-23 Sven Neumann <sven@gimp.org> * configure.in: bumped version number to 1.3.1. Require Glib/GTK+-1.3.11 and Pango-0.22. Removed GDK_DISABLE_COMPAT_H and GTK_DISABLE_COMPAT_H from our default CFLAGS since they don't exist any longer. * RELEASE-TO-CVS.patch: removed since the glib/gtk+ API is supposed to be frozen now. * HACKING: removed reference to RELEASE-TO-CVS.patch * app/gui/menus.c * app/tools/gimptexttool.c: applied RELEASE-TO-CVS.patch to conform to the new GTK+/Pango API. * app/core/Makefile.am: generate marshallers with gimp_marshal prefix. * app/core/gimpmarshal.list: added all marshallers we use. * app/core/gimpmarshal.[ch]: regenerated. * app/[lots of .c files]: use gimp_marshal_* for all marshallers. * data/images/ * app/app_procs.c * app/gui/splash.c: * libgimpbase/Makefile.am * libgimpbase/gimpbase.h * libgimpbase/gimputils.[ch]: removed since they are no longer needed. * app/gimprc.c * plug-ins/common/ps.c * plug-ins/gdyntext/gdyntext.c * plug-ins/gdyntext/gdyntextcompat.c * plug-ins/gfig/gfig.c * plug-ins/gflare/gflare.c * plug-ins/script-fu/script-fu-scripts.c: use glib functions instead of gimp_strescape() and gimpstrcompress(). * cleaned up all header files: use G_BEGIN_DECLS/G_END_DECLS, declared all _get_type function as G_GNUC_CONST. * tools/pdbgen/enumcode.pl * tools/pdbgen/lib.pl: make them generate header files using G_BEGIN_DECLS/G_END_DECLS. * pixmaps/Makefile.am * pixmaps/wilber3.xpm: removed ... * data/images/tips_wilber.png: ... and added here as PNG * app/gui/tips-dialog.c: load the Wilber on demand using GdkPixbuf. * data/images/gimp_splash.ppm: removed ... * data/images/gimp_splash.png: ... and added as PNG * app/app_procs.c * app/gui/splash.[ch]: load the splash image using GdkPixbuf. * app/gui/about-dialog.c: sink the GtkPreview.
2001-11-23 07:46:13 +08:00
/* initialize lowlevel stuff */
base_init ();
if (! no_interface)
{
gui_themes_init (the_gimp);
if (! no_splash)
General cleanup of the selection tools and their PDB wrappers: 2001-10-22 Michael Natterer <mitch@gimp.org> General cleanup of the selection tools and their PDB wrappers: * app/core/Makefile.am * app/core/gimpimage-contiguous-region.[ch] * app/core/gimpimage-mask-select.[ch]: new files providing a clean, uniform API for the selection functionalities. Changed order of parameters to be consistent, removed code duplication. The region returned by the "by_color" function is not really contiguous but the API is so similar to "by_seed" and it's used in the same context so it's fair enough to put them together. Also, I'm not sure if the two is_pixel_sufficiently_different() I've optimized away were meant to do *exactly* the same. Added a comment there to remember the former difference. * app/core/gimpchannel.[ch] (gimp_channel_feather): removed the "output" channel parameter and made it optionally push an undo (like the other channel operations do). * app/core/gimpimage-mask.c: call gimp_channel_feather() with "push_undo == TRUE", removed some useless comments. * app/tools/gimpbycolorselecttool.[ch] * app/tools/gimpellipseselecttool.[ch] * app/tools/gimpfreeselecttool.[ch] * app/tools/gimpfuzzyselecttool.[ch] * app/tools/gimprectselecttool.[ch]: removed all the actual selection functionality and call the new gimp_image_mask_select_*() and gimp_image_contiguous_region_*() functions instead. * app/tools/gimpbezierselecttool.c * app/tools/gimpiscissorstool.c: use new function gimp_image_mask_select_channel() instead of doing the same manually. * app/tools/gimpbucketfilltool.c: find_contiguous_region() -> gimp_image_contiguous_region_by_seed(). * tools/pdbgen/Makefile.am * tools/pdbgen/groups.pl * tools/pdbgen/pdb/selection_tools.pdb: added new group "Selection Tools" which depends only on "core/" stuff (not on "tools/" any more, brrrr). * tools/pdbgen/pdb/text_tool.pdb: don't include "appenv.h" * tools/pdbgen/pdb/tools.pdb: removed the selection tools. * app/pdb/Makefile.am * app/pdb/selection_tools_cmds.c: new file. * app/pdb/internal_procs.c * app/pdb/text_tool_cmds.c * app/pdb/tools_cmds.c: regenerated. * libgimp/Makefile.am * libgimp/gimp_pdb.h * libgimp/gimpselectiontools_pdb.[ch]: new files. * libgimp/gimptools_pdb.[ch]: regenerated Misc cleanups: * app/app_procs.c: call splash_create() with "no_splash_image" as parameter. * app/display/gimpdisplay-render.c * app/display/gximage.c: don't include "appenv.h". * app/gui/gui.c: call session_restore() only if "restore_session" is TRUE. * app/gui/session.c: don't "if(restore_session)" here and don't include "appenv.h" * app/gui/splash.[ch]: added "gboolean show_image" parameter to splash_create(), don't include "appenv.h" * app/tools/gimppainttool.[ch]: added a "GimpGradient" parameter to gimp_paint_tool_get_color_from_gradient(). * app/tools/gimppaintbrushtool.c: pass the gradient. * app/tools/gimpselectiontool.c * app/tools/gimptransformtool.c * app/tools/tool_manager.c: s/GDisplay/GimpDisplay/. * app/widgets/gimpcontainergridview.[ch]: removed the "white_style" class variable and don't fiddle around with colors and styles... * themes/Default/gtkrc: ...do the same here with a simple rc style.
2001-10-22 20:13:44 +08:00
splash_create (! no_splash_image);
}
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
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
2001-07-05 03:31:35 +08:00
*/
link the app in a different order as some init functions are called from 2001-10-19 Michael Natterer <mitch@gimp.org> * app/Makefile.am: link the app in a different order as some init functions are called from core/gimp.c instead of app_procs.c now. * app/app_procs.[ch]: made app_init_update_status() private and pass it as callback to various init functions. * app/plug_in.[ch]: plug_in_init() take "gimp" and "status_callback" parameters. * app/undo.c: use "gimage->gimp" instead of "the_gimp", don't include "app_procs.h". * app/core/core-types.h: added "GimpInitStatusFunc" typedef. * app/core/gimp.[ch]: gimp_initialize() and gimp_restore() now take a "status_callback" as parameter. Don't include "app_procs.h". * app/core/gimpmodules.c: putting the modules in a strong container was a bad idea because it may be impossible to finalize a GimpModuleInfo object belonging to a stalled module. * app/gui/color-area.c: use G_N_ELEMENTS(). * app/gui/session.c: don't call app_init_update_status() and don't include "app_procs.h" because this happens after the splash is hidden. * tools/pdbgen/app.pl * app/pdb/internal_procs.[ch]: pass a "status_callback" to internal_procs_init(), don't include "app_procs.h". * plug-ins/Makefile.am: build gfig, gimpressionist and imagemap again. * plug-ins/MapObject/mapobject_preview.c * plug-ins/MapObject/mapobject_ui.c: s/gdk_image_unref/g_object_unref/ * plug-ins/gfig/gfig.c * plug-ins/gimpressionist/brush.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/gimpressionist/ppmtool.[ch] * plug-ins/gimpressionist/presets.c * plug-ins/imagemap/imap_browse.[ch] * plug-ins/imagemap/imap_csim.y * plug-ins/imagemap/imap_edit_area_info.c * plug-ins/imagemap/imap_file.c * plug-ins/imagemap/imap_main.c * plug-ins/imagemap/imap_menu.c * plug-ins/imagemap/imap_polygon.c * plug-ins/imagemap/imap_popup.c * plug-ins/imagemap/imap_preferences.c * plug-ins/imagemap/imap_taglist.c * plug-ins/imagemap/imap_tools.c: ported to current GLib/Gtk+. * plug-ins/gap/gap_arr_dialog.c * plug-ins/gap/gap_decode_xanim.c * plug-ins/gap/gap_filter_foreach.c * plug-ins/gap/gap_filter_main.c * plug-ins/gap/gap_frontends_main.c * plug-ins/gap/gap_lib.c * plug-ins/gap/gap_main.c * plug-ins/gap/gap_mod_layer.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gap/gap_navigator_dialog.c * plug-ins/gap/resize.c: half-way fixed this one too but I'm not willing to fix tons of duplicated and deprecated app/ code...
2001-10-20 00:41:09 +08:00
gimp_initialize (the_gimp, app_init_update_status);
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
2001-07-05 03:31:35 +08:00
if (! no_interface)
{
tool_manager_init (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
/* Load all data files
*/
link the app in a different order as some init functions are called from 2001-10-19 Michael Natterer <mitch@gimp.org> * app/Makefile.am: link the app in a different order as some init functions are called from core/gimp.c instead of app_procs.c now. * app/app_procs.[ch]: made app_init_update_status() private and pass it as callback to various init functions. * app/plug_in.[ch]: plug_in_init() take "gimp" and "status_callback" parameters. * app/undo.c: use "gimage->gimp" instead of "the_gimp", don't include "app_procs.h". * app/core/core-types.h: added "GimpInitStatusFunc" typedef. * app/core/gimp.[ch]: gimp_initialize() and gimp_restore() now take a "status_callback" as parameter. Don't include "app_procs.h". * app/core/gimpmodules.c: putting the modules in a strong container was a bad idea because it may be impossible to finalize a GimpModuleInfo object belonging to a stalled module. * app/gui/color-area.c: use G_N_ELEMENTS(). * app/gui/session.c: don't call app_init_update_status() and don't include "app_procs.h" because this happens after the splash is hidden. * tools/pdbgen/app.pl * app/pdb/internal_procs.[ch]: pass a "status_callback" to internal_procs_init(), don't include "app_procs.h". * plug-ins/Makefile.am: build gfig, gimpressionist and imagemap again. * plug-ins/MapObject/mapobject_preview.c * plug-ins/MapObject/mapobject_ui.c: s/gdk_image_unref/g_object_unref/ * plug-ins/gfig/gfig.c * plug-ins/gimpressionist/brush.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/gimpressionist/ppmtool.[ch] * plug-ins/gimpressionist/presets.c * plug-ins/imagemap/imap_browse.[ch] * plug-ins/imagemap/imap_csim.y * plug-ins/imagemap/imap_edit_area_info.c * plug-ins/imagemap/imap_file.c * plug-ins/imagemap/imap_main.c * plug-ins/imagemap/imap_menu.c * plug-ins/imagemap/imap_polygon.c * plug-ins/imagemap/imap_popup.c * plug-ins/imagemap/imap_preferences.c * plug-ins/imagemap/imap_taglist.c * plug-ins/imagemap/imap_tools.c: ported to current GLib/Gtk+. * plug-ins/gap/gap_arr_dialog.c * plug-ins/gap/gap_decode_xanim.c * plug-ins/gap/gap_filter_foreach.c * plug-ins/gap/gap_filter_main.c * plug-ins/gap/gap_frontends_main.c * plug-ins/gap/gap_lib.c * plug-ins/gap/gap_main.c * plug-ins/gap/gap_mod_layer.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gap/gap_navigator_dialog.c * plug-ins/gap/resize.c: half-way fixed this one too but I'm not willing to fix tons of duplicated and deprecated app/ code...
2001-10-20 00:41:09 +08:00
gimp_restore (the_gimp, app_init_update_status, no_data);
if (! no_interface)
{
gui_init (the_gimp);
}
link the app in a different order as some init functions are called from 2001-10-19 Michael Natterer <mitch@gimp.org> * app/Makefile.am: link the app in a different order as some init functions are called from core/gimp.c instead of app_procs.c now. * app/app_procs.[ch]: made app_init_update_status() private and pass it as callback to various init functions. * app/plug_in.[ch]: plug_in_init() take "gimp" and "status_callback" parameters. * app/undo.c: use "gimage->gimp" instead of "the_gimp", don't include "app_procs.h". * app/core/core-types.h: added "GimpInitStatusFunc" typedef. * app/core/gimp.[ch]: gimp_initialize() and gimp_restore() now take a "status_callback" as parameter. Don't include "app_procs.h". * app/core/gimpmodules.c: putting the modules in a strong container was a bad idea because it may be impossible to finalize a GimpModuleInfo object belonging to a stalled module. * app/gui/color-area.c: use G_N_ELEMENTS(). * app/gui/session.c: don't call app_init_update_status() and don't include "app_procs.h" because this happens after the splash is hidden. * tools/pdbgen/app.pl * app/pdb/internal_procs.[ch]: pass a "status_callback" to internal_procs_init(), don't include "app_procs.h". * plug-ins/Makefile.am: build gfig, gimpressionist and imagemap again. * plug-ins/MapObject/mapobject_preview.c * plug-ins/MapObject/mapobject_ui.c: s/gdk_image_unref/g_object_unref/ * plug-ins/gfig/gfig.c * plug-ins/gimpressionist/brush.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/gimpressionist/ppmtool.[ch] * plug-ins/gimpressionist/presets.c * plug-ins/imagemap/imap_browse.[ch] * plug-ins/imagemap/imap_csim.y * plug-ins/imagemap/imap_edit_area_info.c * plug-ins/imagemap/imap_file.c * plug-ins/imagemap/imap_main.c * plug-ins/imagemap/imap_menu.c * plug-ins/imagemap/imap_polygon.c * plug-ins/imagemap/imap_popup.c * plug-ins/imagemap/imap_preferences.c * plug-ins/imagemap/imap_taglist.c * plug-ins/imagemap/imap_tools.c: ported to current GLib/Gtk+. * plug-ins/gap/gap_arr_dialog.c * plug-ins/gap/gap_decode_xanim.c * plug-ins/gap/gap_filter_foreach.c * plug-ins/gap/gap_filter_main.c * plug-ins/gap/gap_frontends_main.c * plug-ins/gap/gap_lib.c * plug-ins/gap/gap_main.c * plug-ins/gap/gap_mod_layer.c * plug-ins/gap/gap_mov_dialog.c * plug-ins/gap/gap_navigator_dialog.c * plug-ins/gap/resize.c: half-way fixed this one too but I'm not willing to fix tons of duplicated and deprecated app/ code...
2001-10-20 00:41:09 +08:00
/* Initialize the plug-in structures
*/
badly chopped into the new files below. Pass around much more "PlugIn" and 2002-03-20 Michael Natterer <mitch@gimp.org> * app/plug-in/plug-in.[ch]: badly chopped into the new files below. Pass around much more "PlugIn" and "Gimp" pointers instead of using "current_plug_in" and "the_gimp". Needs much more hacking though... :( * app/plug-in/Makefile.am * app/plug-in/plug-in-def.[ch] * app/plug-in/plug-in-params.[ch] * app/plug-in/plug-in-progress.[ch] * app/plug-in/plug-ins.[ch]: new files. * app/gui/Makefile.am * app/gui/plug-in-commands.[ch] * app/gui/plug-in-menus.[ch]: ditto. * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-types.h: changed accordingly. * app/pdb/procedural_db.c: changed procedural_db_destroy_args() so it can be used from plug_in_args_destroy(). Fixed a parasite memory leak (or introduced a new SEGV, we'll see...). * app/display/Makefile.am: another "truly ugly hack" until the plug-in menu stuff is chopped even more... * app/gui/commands.[ch]: removed filters_repeat_cmd_callback() here, it is now in plug-in-commands.[ch]. * app/widgets/gimpitemfactory.[ch]: removed all gimp_menu_item_*() hacks. We have a GimpItemFactory available in most cases we used to call this functions, and can use gimp_item_factors_from_path() in all other cases. The item factory stuff needs more work anyway... * app/app_procs.c * app/gimphelp.c * app/display/gimpdisplayshell.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/menus.c * app/gui/paths-dialog.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly (includes, renamed functions and gimp_menu_item_*() removal). * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2002-03-21 01:46:13 +08:00
plug_ins_init (the_gimp, app_init_update_status);
if (! no_interface)
1997-11-25 06:05:25 +08:00
{
if (! no_splash)
splash_destroy ();
took gimpcontextpreview.[ch] out of the build but still left the sources 2001-02-12 Michael Natterer <mitch@gimp.org> * app/Makefile.am: took gimpcontextpreview.[ch] out of the build but still left the sources there as reference. * app/app_procs.c: initialize the render stuff before creating the toolbox (needed for the previews). * app/devices.c * app/indicator_area.c: use GimpPreviews instead of GimpContextPreviews. * app/context_manager.[ch]: create the global data lists here because they now must exist before any context is created. * app/brushes.[ch] * app/gradients.[ch] * app/palettes.[ch] * app/patterns.[ch]: removed them here. * app/gimpcontainer.[ch]: added a "freeze_count" and emit the "freeze" and "thaw" signals accordingly. * app/gimpcontext.[ch]: greatly simplified the way how the contexts connect to the data lists (simply keep them connected all the time). Also removed all those ugly explicit update functions because "thaw" callbacks do this job now. * app/gimpdata.c: a GimpData object now becomes dirty on "name_changed"; "dirty" now triggers "invalidate_preview" because the context does not dispatch these signals any more soon. * app/brush_select.c * app/convert.c * app/gimpdnd.c * app/gradient_editor.c * app/gradient_select.c * app/pattern_select.c * app/gradient_editor.c * app/gradient_select.c * app/gradients.[ch] * app/pdb/brush_select_cmds.c * app/pdb/brushes_cmds.c * app/pdb/convert_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/patterns_cmds.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly.
2001-02-12 11:27:28 +08:00
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
gui_restore (the_gimp, restore_session);
1998-08-13 23:25:41 +08:00
}
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
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
*/
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
2001-07-05 03:31:35 +08:00
if (gimp_argc > 0)
Cleanup weekend... 2001-10-29 Michael Natterer <mitch@gimp.org> Cleanup weekend... * app/app_procs.c: pass "no_interface" to gimp_new(). * app/core/gimp.[ch]: added "gboolean no_interface" and the load_procs and save_procs GSLists. * app/core/gimptoolinfo.[ch]: added a "Gimp" pointer to the GimpToolInfo object so more functions find their context without accessing the global "the_gimp" variable. * app/display/display-types.h: removed the GDisplay -> GimpDisplay typedef. * app/display/gimpdisplay.c: look at gimp->no_interface, don't include "appenv.h". * app/file/file-open.[ch] * app/file/file-save.[ch]: don't use "the_gimp" any more. Instead, pass around lots of "Gimp" pointers. Removed the global load_procs and save_procs variables here. Use access() to find out whether a file is readable/writable, removed the manual voodoo and it's Win32 wrappers. Added an optional (can be NULL) "PlunInProcDef" parameter to file_save(), removed file_save_with_proc(). * app/gui/menus.c: Use the unused "gpointer data" parameter of the GtkItemFactory callbacks to pass a "Gimp" pointer to all of them. This reduces the usage of the global "the_gimp" hack to zero in app/gui/... yeah. * app/gui/channels-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/select-commands.c * app/gui/test-commands.c * app/gui/tools-commands.c * app/gui/view-commands.c: use the passed "Gimp" pointer. * app/gui/color-area.[ch] * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/palette-editor.c * app/gui/palette-import-dialog.[ch] * app/gui/paths-dialog.c * app/gui/preferences-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/tool-options-dialog.[ch] * app/gui/toolbox.c: pass around lots more "Gimp" and "GimpContext" pointers and don't use "the_gimp" any more. * app/tools/gimptool.h: added a pointer to the corresponding GimpToolInfo object (which in turn has a pointer to a Gimp). * app/tools/tool_manager.[ch]: set the pointer after creating the tool object. Removed tool_manager_get_info_by_tool() as there is a tool->tool_info pointer now. * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/path_tool.c * app/tools/xinput_airbrush.c: s/GDisplay/GimpDisplay/g. Use tool->tool_info and tool_info->gimp in some places to get rid of using "the_gimp". Removing the remaining ones involves changing the tool options system and is scheduled next... * app/widgets/gimpdnd.c * app/widgets/gimpdocumentview.c: pass a "Gimp" pointer to all file_open_*() functions. * app/gdisplay_color.[ch] * app/gdisplay_color_ui.[ch] * app/image_map.[ch] * app/nav_window.[ch] * app/path.c * app/path_bezier.c * app/path_transform.h * app/qmask.[ch]: s/GDisplay/GimpDisplay/g * tools/pdbgen/pdb/fileops.pdb: load_procs and save_procs are members of the "Gimp" object now. * tools/pdbgen/pdb/plug_in.pdb: use gimp->no_interface, don't include "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2001-10-29 19:47:11 +08:00
{
Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. 2002-04-14 Michael Natterer <mitch@gimp.org> Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: port everything to using URIs, removed file_open_absolute_filename() and added file_utils_filename_to_uri() instead. * app/core/gimpimage.[ch]: added gimp_image_[get|set]_uri() which works like the old gimp_image_[get|set]_filename(). Changed gimp_image_[get|set]_filename() to call uri conversion functions. * app/app_procs.c: removed lots of code and use the new uri functions to open images passed on the command line. * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c: changed accordingly. * app/nav_window.c * app/undo_history.c * app/display/gimpdisplayshell.c * app/gui/info-window.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c: s/gimp_image_get_filename()/gimp_image_get_uri()/g. Need to add a utility function which returns the basename in unescaped UTF-8. * app/gui/file-commands.c * app/widgets/gimpdocumentview.c: use "uri", not "filename" as variable name where appropriate. * app/gui/menus.c: some broken code for the "Open Recent" items, will be fixed soon... * app/widgets/gimpdnd.c: evil (!!!) hackery to convert dropped filenames to uris. * tools/pdbgen/pdb/fileops.pdb: changed accordingly. Clarified the meaning of the "raw_filename" parameter. * tools/pdbgen/pdb/message.pdb: use g_message("%s", message), *not* g_message(message). * app/pdb/fileops_cmds.c * app/pdb/message_cmds.c * libgimp/gimpfileops_pdb.c: regenerated.
2002-04-14 22:38:55 +08:00
gint i;
Cleanup weekend... 2001-10-29 Michael Natterer <mitch@gimp.org> Cleanup weekend... * app/app_procs.c: pass "no_interface" to gimp_new(). * app/core/gimp.[ch]: added "gboolean no_interface" and the load_procs and save_procs GSLists. * app/core/gimptoolinfo.[ch]: added a "Gimp" pointer to the GimpToolInfo object so more functions find their context without accessing the global "the_gimp" variable. * app/display/display-types.h: removed the GDisplay -> GimpDisplay typedef. * app/display/gimpdisplay.c: look at gimp->no_interface, don't include "appenv.h". * app/file/file-open.[ch] * app/file/file-save.[ch]: don't use "the_gimp" any more. Instead, pass around lots of "Gimp" pointers. Removed the global load_procs and save_procs variables here. Use access() to find out whether a file is readable/writable, removed the manual voodoo and it's Win32 wrappers. Added an optional (can be NULL) "PlunInProcDef" parameter to file_save(), removed file_save_with_proc(). * app/gui/menus.c: Use the unused "gpointer data" parameter of the GtkItemFactory callbacks to pass a "Gimp" pointer to all of them. This reduces the usage of the global "the_gimp" hack to zero in app/gui/... yeah. * app/gui/channels-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/select-commands.c * app/gui/test-commands.c * app/gui/tools-commands.c * app/gui/view-commands.c: use the passed "Gimp" pointer. * app/gui/color-area.[ch] * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/palette-editor.c * app/gui/palette-import-dialog.[ch] * app/gui/paths-dialog.c * app/gui/preferences-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/tool-options-dialog.[ch] * app/gui/toolbox.c: pass around lots more "Gimp" and "GimpContext" pointers and don't use "the_gimp" any more. * app/tools/gimptool.h: added a pointer to the corresponding GimpToolInfo object (which in turn has a pointer to a Gimp). * app/tools/tool_manager.[ch]: set the pointer after creating the tool object. Removed tool_manager_get_info_by_tool() as there is a tool->tool_info pointer now. * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/path_tool.c * app/tools/xinput_airbrush.c: s/GDisplay/GimpDisplay/g. Use tool->tool_info and tool_info->gimp in some places to get rid of using "the_gimp". Removing the remaining ones involves changing the tool options system and is scheduled next... * app/widgets/gimpdnd.c * app/widgets/gimpdocumentview.c: pass a "Gimp" pointer to all file_open_*() functions. * app/gdisplay_color.[ch] * app/gdisplay_color_ui.[ch] * app/image_map.[ch] * app/nav_window.[ch] * app/path.c * app/path_bezier.c * app/path_transform.h * app/qmask.[ch]: s/GDisplay/GimpDisplay/g * tools/pdbgen/pdb/fileops.pdb: load_procs and save_procs are members of the "Gimp" object now. * tools/pdbgen/pdb/plug_in.pdb: use gimp->no_interface, don't include "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2001-10-29 19:47:11 +08:00
for (i = 0; i < gimp_argc; i++)
{
if (gimp_argv[i])
{
Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. 2002-04-14 Michael Natterer <mitch@gimp.org> Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: port everything to using URIs, removed file_open_absolute_filename() and added file_utils_filename_to_uri() instead. * app/core/gimpimage.[ch]: added gimp_image_[get|set]_uri() which works like the old gimp_image_[get|set]_filename(). Changed gimp_image_[get|set]_filename() to call uri conversion functions. * app/app_procs.c: removed lots of code and use the new uri functions to open images passed on the command line. * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c: changed accordingly. * app/nav_window.c * app/undo_history.c * app/display/gimpdisplayshell.c * app/gui/info-window.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c: s/gimp_image_get_filename()/gimp_image_get_uri()/g. Need to add a utility function which returns the basename in unescaped UTF-8. * app/gui/file-commands.c * app/widgets/gimpdocumentview.c: use "uri", not "filename" as variable name where appropriate. * app/gui/menus.c: some broken code for the "Open Recent" items, will be fixed soon... * app/widgets/gimpdnd.c: evil (!!!) hackery to convert dropped filenames to uris. * tools/pdbgen/pdb/fileops.pdb: changed accordingly. Clarified the meaning of the "raw_filename" parameter. * tools/pdbgen/pdb/message.pdb: use g_message("%s", message), *not* g_message(message). * app/pdb/fileops_cmds.c * app/pdb/message_cmds.c * libgimp/gimpfileops_pdb.c: regenerated.
2002-04-14 22:38:55 +08:00
GError *error = NULL;
gchar *uri;
uri = file_utils_filename_to_uri (the_gimp->load_procs,
gimp_argv[i], &error);
Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. 2002-04-14 Michael Natterer <mitch@gimp.org> Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: port everything to using URIs, removed file_open_absolute_filename() and added file_utils_filename_to_uri() instead. * app/core/gimpimage.[ch]: added gimp_image_[get|set]_uri() which works like the old gimp_image_[get|set]_filename(). Changed gimp_image_[get|set]_filename() to call uri conversion functions. * app/app_procs.c: removed lots of code and use the new uri functions to open images passed on the command line. * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c: changed accordingly. * app/nav_window.c * app/undo_history.c * app/display/gimpdisplayshell.c * app/gui/info-window.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c: s/gimp_image_get_filename()/gimp_image_get_uri()/g. Need to add a utility function which returns the basename in unescaped UTF-8. * app/gui/file-commands.c * app/widgets/gimpdocumentview.c: use "uri", not "filename" as variable name where appropriate. * app/gui/menus.c: some broken code for the "Open Recent" items, will be fixed soon... * app/widgets/gimpdnd.c: evil (!!!) hackery to convert dropped filenames to uris. * tools/pdbgen/pdb/fileops.pdb: changed accordingly. Clarified the meaning of the "raw_filename" parameter. * tools/pdbgen/pdb/message.pdb: use g_message("%s", message), *not* g_message(message). * app/pdb/fileops_cmds.c * app/pdb/message_cmds.c * libgimp/gimpfileops_pdb.c: regenerated.
2002-04-14 22:38:55 +08:00
if (! uri)
{
Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. 2002-04-14 Michael Natterer <mitch@gimp.org> Use UTF-8 encoded escaped URIs for GimpImage and GimpImageFile. * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: port everything to using URIs, removed file_open_absolute_filename() and added file_utils_filename_to_uri() instead. * app/core/gimpimage.[ch]: added gimp_image_[get|set]_uri() which works like the old gimp_image_[get|set]_filename(). Changed gimp_image_[get|set]_filename() to call uri conversion functions. * app/app_procs.c: removed lots of code and use the new uri functions to open images passed on the command line. * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c: changed accordingly. * app/nav_window.c * app/undo_history.c * app/display/gimpdisplayshell.c * app/gui/info-window.c * app/gui/palette-import-dialog.c * app/tools/gimpbycolorselecttool.c * app/widgets/gimpcontainerview-utils.c: s/gimp_image_get_filename()/gimp_image_get_uri()/g. Need to add a utility function which returns the basename in unescaped UTF-8. * app/gui/file-commands.c * app/widgets/gimpdocumentview.c: use "uri", not "filename" as variable name where appropriate. * app/gui/menus.c: some broken code for the "Open Recent" items, will be fixed soon... * app/widgets/gimpdnd.c: evil (!!!) hackery to convert dropped filenames to uris. * tools/pdbgen/pdb/fileops.pdb: changed accordingly. Clarified the meaning of the "raw_filename" parameter. * tools/pdbgen/pdb/message.pdb: use g_message("%s", message), *not* g_message(message). * app/pdb/fileops_cmds.c * app/pdb/message_cmds.c * libgimp/gimpfileops_pdb.c: regenerated.
2002-04-14 22:38:55 +08:00
g_printerr ("conversion filename -> uri failed: %s\n",
error->message);
g_error_free (error);
}
else
{
file_open_with_display (the_gimp, uri);
g_free (uri);
}
Cleanup weekend... 2001-10-29 Michael Natterer <mitch@gimp.org> Cleanup weekend... * app/app_procs.c: pass "no_interface" to gimp_new(). * app/core/gimp.[ch]: added "gboolean no_interface" and the load_procs and save_procs GSLists. * app/core/gimptoolinfo.[ch]: added a "Gimp" pointer to the GimpToolInfo object so more functions find their context without accessing the global "the_gimp" variable. * app/display/display-types.h: removed the GDisplay -> GimpDisplay typedef. * app/display/gimpdisplay.c: look at gimp->no_interface, don't include "appenv.h". * app/file/file-open.[ch] * app/file/file-save.[ch]: don't use "the_gimp" any more. Instead, pass around lots of "Gimp" pointers. Removed the global load_procs and save_procs variables here. Use access() to find out whether a file is readable/writable, removed the manual voodoo and it's Win32 wrappers. Added an optional (can be NULL) "PlunInProcDef" parameter to file_save(), removed file_save_with_proc(). * app/gui/menus.c: Use the unused "gpointer data" parameter of the GtkItemFactory callbacks to pass a "Gimp" pointer to all of them. This reduces the usage of the global "the_gimp" hack to zero in app/gui/... yeah. * app/gui/channels-commands.c * app/gui/edit-commands.c * app/gui/file-commands.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/palettes-commands.c * app/gui/select-commands.c * app/gui/test-commands.c * app/gui/tools-commands.c * app/gui/view-commands.c: use the passed "Gimp" pointer. * app/gui/color-area.[ch] * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.[ch] * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/info-window.[ch] * app/gui/module-browser.[ch] * app/gui/palette-editor.c * app/gui/palette-import-dialog.[ch] * app/gui/paths-dialog.c * app/gui/preferences-dialog.[ch] * app/gui/resize-dialog.[ch] * app/gui/tool-options-dialog.[ch] * app/gui/toolbox.c: pass around lots more "Gimp" and "GimpContext" pointers and don't use "the_gimp" any more. * app/tools/gimptool.h: added a pointer to the corresponding GimpToolInfo object (which in turn has a pointer to a Gimp). * app/tools/tool_manager.[ch]: set the pointer after creating the tool object. Removed tool_manager_get_info_by_tool() as there is a tool->tool_info pointer now. * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/path_tool.c * app/tools/xinput_airbrush.c: s/GDisplay/GimpDisplay/g. Use tool->tool_info and tool_info->gimp in some places to get rid of using "the_gimp". Removing the remaining ones involves changing the tool options system and is scheduled next... * app/widgets/gimpdnd.c * app/widgets/gimpdocumentview.c: pass a "Gimp" pointer to all file_open_*() functions. * app/gdisplay_color.[ch] * app/gdisplay_color_ui.[ch] * app/image_map.[ch] * app/nav_window.[ch] * app/path.c * app/path_bezier.c * app/path_transform.h * app/qmask.[ch]: s/GDisplay/GimpDisplay/g * tools/pdbgen/pdb/fileops.pdb: load_procs and save_procs are members of the "Gimp" object now. * tools/pdbgen/pdb/plug_in.pdb: use gimp->no_interface, don't include "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2001-10-29 19:47:11 +08:00
}
}
}
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
2001-07-05 03:31:35 +08:00
app/Makefile.am removed... 2001-11-30 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/plug_in.[ch]: removed... * app/plug-in/Makefile.am * app/plug-in/plug-in-types.h * app/plug-in/plug-in.[ch]: ...and added here. * app/appenv.h: removed StackTraceMode and MessageHandlerType... * libgimpbase/gimpbasetypes.h: ...and added them here. * tools/pdbgen/Makefile.am: don't scan "app/apptypes.h" for enums. * tools/pdbgen/enumcode.pl: added a general check to prevent enums which are defined in libgimp* from being written to "libgimp/gimpenums.c". * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated. * app/core/core-types.h: include "pdb/pdb-types.h" so including "core/core-types.h" gets the whole core type space. * app/core/gimp.[ch]: added a "stack_trace_mode" parameter to the constructor and store it in the Gimp struct because the value is also passed to plug-ins and nobody should include "appenv.h". * app/gimprc.[ch]: pass the alternate_system_gimprc and alternate_gimprc filenames from the command line to gimprc_prase() so we don't need to include "appenv.h". * app/batch.[ch]: pass the "batch_cmds" as parameter, don't include "append.h". * app/app_procs.c: pass more parameters around. * app/devices.c * app/errors.c * app/gimphelp.c * app/main.c * app/core/gimpgradient.c * app/display/gimpdisplay.c * app/display/gimpdisplayshell.c * app/file/file-open.c * app/file/file-save.c * app/file/file-utils.c * app/gui/commands.c * app/gui/error-console-dialog.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/paths-dialog.c * app/gui/user-install-dialog.c * app/tools/gimpbezierselecttool.c * app/tools/xinput_airbrush.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly: - changed "plug-in.h" include where needed. - don't call gimp_fatal_error() directly, it's called via the log handler when calling g_error(). - don't incude "errors.h" except from main.c. - changed stack_trace and message_handler enum names. - get "stack_trace_mode" from Gimp. - removed many inclusions of "appenv.h". * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/message_cmds.c * app/pdb/plug_in_cmds.c * app/pdb/procedural_db.c: regenerated.
2001-12-01 08:14:14 +08:00
batch_init (the_gimp, batch_cmds);
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
2001-07-05 03:31:35 +08:00
if (! no_interface)
{
app/Makefile.am removed. 2001-07-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/context_manager.[ch]: removed. * app/app_procs.c: call tool_mananger instead of context_manager functions, pass "the_gimp" to some more functions. * app/drawable.[ch]: pass a GimpContext to drawable_fill(). * app/errors.c: behave according to "stack_trace_mode" when using the debugging signal handler. * app/gimprc.[ch]: removed the core/ config variables. * app/selection.c: set the selection's state to INVISIBLE in selection_pause(). * app/core/Makefile.am * app/core/gimpcoreconfig.[ch]: new files (the configuration variables used by core/). * app/core/gimpcontext.[ch]: removed the global contexts (user, default, ...) and their functions. It's no longer possible to pass NULL to the context functions to manipulate the current context (gimpcontext.c doesn't know the current context any more). * app/core/gimp.[ch]: added them here. The functions are now called gimp_[set|get]_*_context(). Added gimp_create_context() which is the only function to create contexts now. * app/gui/dialogs.[ch] * app/gui/gui.[ch]: pass "gimp" to all functions. * app/tools/tool_manager.[ch] * app/tools/tools.[ch]: pass "gimp" to lots of functions. Added the "global_tool_context" logic and the global/non-global paint options switching from the context_manager. Pass "gimp" to all tools' "register" functions. * app/tools/*: changed accordingly. * app/devices.c * app/disp_callbacks.c * app/file-open.[ch] * app/file-save.c * app/gdisplay.c * app/gimage.c * app/libgimp_glue.c * app/module_db.c * app/nav_window.c * app/plug_in.c * app/qmask.c * app/undo.c * app/base/base-config.c * app/core/gimpbrushpipe.c * app/core/gimpdrawable-offset.c * app/core/gimpgradient.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimppalette.c * app/core/gimptoolinfo.[ch] * app/core/gimpundo.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-area.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.c * app/gui/test-commands.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/widgets/gimpchannellistview.c * app/widgets/gimpdnd.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimpimagedock.c * app/widgets/gimplayerlistview.c * app/pdb/brushes_cmds.c * app/pdb/drawable_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/palette_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db.c * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly: remove usage of gimp_context_[get|set]_*(NULL), create contexts with gimp_create_context(). Get the user/current context with gimp_get_[user|current]_context(). Added/removed access to the global "the_gimp" variable in some places. Get the core's config variables from "core_config".
2001-07-07 20:17:23 +08:00
gui_post_init (the_gimp);
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
2001-07-05 03:31:35 +08:00
}
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
gimp_main_loop (the_gimp);
1997-11-25 06:05:25 +08:00
}
void
app_exit (gboolean kill_it)
1998-02-05 13:41:05 +08:00
{
/* If it's the user's perogative, and there are dirty images */
if (! kill_it && gdisplays_dirty () && ! no_interface)
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
gui_really_quit_dialog (G_CALLBACK (app_exit_finish));
else
app_exit_finish ();
1998-02-05 13:41:05 +08:00
}
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
2001-10-25 21:30:01 +08:00
/* private functions */
generate app/file/Makefile 2001-10-25 Michael Natterer <mitch@gimp.org> * configure.in: generate app/file/Makefile * app/Makefile.am * app/file-open.[ch] * app/file-save.[ch] * app/file-utils.[ch]: removed... * app/file/Makefile.am * app/file/file-open.[ch] * app/file/file-save.[ch] * app/file/file-utils.[ch]: ...and added here. * app/gui/file-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * tools/pdbgen/pdb/fileops.pdb: changed includes accordingly. * app/app_procs.[ch]: removed app_exit_finish() and app_exit_finish_done() from the public API, call gtk_main() here, pass "no_data" to gimp_new() and "restore_session" to gui_restore(). * app/main.c: removed global variable "double_speed", don't call gtk_main() in main.c. Added some missing log domains. * app/appenv.h: removed "double_speed". * app/core/gimp.[ch]: added "gboolean no_data" property which must be passed to gimp_new(). * app/display/gimpdisplay-foreach.[ch]: added gdisplays_set_busy() and gdisplays_unset_busy(). * app/gui/about-dialog.c: don't include "appenv.h", declare "double_speed" extern. * app/gui/brush-select.[ch] * app/gui/gradient-select.[ch] * app/gui/palette-select.[ch] * app/gui/pattern-select.[ch]: made the list of dialogs and the global selection dialogs private. Added functions which get a dialog by PDB callback_name. Pass a "Gimp" and the callback_name to the constructors. Don't include "app_procs.h" for "the_gimp" and "appenv.h" for "no_data" any more. Use the passed "Gimp" instead and look at gimp->no_data. * app/gui/toolbox.[ch]: pass a "Gimp" to the constructor. * app/gui/gui.[ch]: use the new gdisplays_[un]set_busy() functions, use the passed "Gimp" all over the place, don't include "appenv.h" and "app_procs.h". gui_really_quit_dialog() takes a "quit_func" callback now and calls it instead of calling app_exit_finish() (which is now private) directly. * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/palette-import-dialog.c * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/pattern_select.pdb: changed accordingly. * app/pdb/brush_select_cmds.c * app/pdb/fileops_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/pattern_select_cmds.c: regenerated. 2001-10-25 Michael Natterer <mitch@gimp.org> * POTFILES.in: app/file-*.c -> app/file/file-*.c
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)
{
if (! no_interface)
{
app/Makefile.am removed. 2001-07-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/context_manager.[ch]: removed. * app/app_procs.c: call tool_mananger instead of context_manager functions, pass "the_gimp" to some more functions. * app/drawable.[ch]: pass a GimpContext to drawable_fill(). * app/errors.c: behave according to "stack_trace_mode" when using the debugging signal handler. * app/gimprc.[ch]: removed the core/ config variables. * app/selection.c: set the selection's state to INVISIBLE in selection_pause(). * app/core/Makefile.am * app/core/gimpcoreconfig.[ch]: new files (the configuration variables used by core/). * app/core/gimpcontext.[ch]: removed the global contexts (user, default, ...) and their functions. It's no longer possible to pass NULL to the context functions to manipulate the current context (gimpcontext.c doesn't know the current context any more). * app/core/gimp.[ch]: added them here. The functions are now called gimp_[set|get]_*_context(). Added gimp_create_context() which is the only function to create contexts now. * app/gui/dialogs.[ch] * app/gui/gui.[ch]: pass "gimp" to all functions. * app/tools/tool_manager.[ch] * app/tools/tools.[ch]: pass "gimp" to lots of functions. Added the "global_tool_context" logic and the global/non-global paint options switching from the context_manager. Pass "gimp" to all tools' "register" functions. * app/tools/*: changed accordingly. * app/devices.c * app/disp_callbacks.c * app/file-open.[ch] * app/file-save.c * app/gdisplay.c * app/gimage.c * app/libgimp_glue.c * app/module_db.c * app/nav_window.c * app/plug_in.c * app/qmask.c * app/undo.c * app/base/base-config.c * app/core/gimpbrushpipe.c * app/core/gimpdrawable-offset.c * app/core/gimpgradient.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimppalette.c * app/core/gimptoolinfo.[ch] * app/core/gimpundo.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-area.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.c * app/gui/test-commands.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/widgets/gimpchannellistview.c * app/widgets/gimpdnd.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimpimagedock.c * app/widgets/gimplayerlistview.c * app/pdb/brushes_cmds.c * app/pdb/drawable_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/palette_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db.c * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly: remove usage of gimp_context_[get|set]_*(NULL), create contexts with gimp_create_context(). Get the user/current context with gimp_get_[user|current]_context(). Added/removed access to the global "the_gimp" variable in some places. Get the core's config variables from "core_config".
2001-07-07 20:17:23 +08:00
gui_shutdown (the_gimp);
}
badly chopped into the new files below. Pass around much more "PlugIn" and 2002-03-20 Michael Natterer <mitch@gimp.org> * app/plug-in/plug-in.[ch]: badly chopped into the new files below. Pass around much more "PlugIn" and "Gimp" pointers instead of using "current_plug_in" and "the_gimp". Needs much more hacking though... :( * app/plug-in/Makefile.am * app/plug-in/plug-in-def.[ch] * app/plug-in/plug-in-params.[ch] * app/plug-in/plug-in-progress.[ch] * app/plug-in/plug-ins.[ch]: new files. * app/gui/Makefile.am * app/gui/plug-in-commands.[ch] * app/gui/plug-in-menus.[ch]: ditto. * app/plug-in/plug-in-rc.c * app/plug-in/plug-in-types.h: changed accordingly. * app/pdb/procedural_db.c: changed procedural_db_destroy_args() so it can be used from plug_in_args_destroy(). Fixed a parasite memory leak (or introduced a new SEGV, we'll see...). * app/display/Makefile.am: another "truly ugly hack" until the plug-in menu stuff is chopped even more... * app/gui/commands.[ch]: removed filters_repeat_cmd_callback() here, it is now in plug-in-commands.[ch]. * app/widgets/gimpitemfactory.[ch]: removed all gimp_menu_item_*() hacks. We have a GimpItemFactory available in most cases we used to call this functions, and can use gimp_item_factors_from_path() in all other cases. The item factory stuff needs more work anyway... * app/app_procs.c * app/gimphelp.c * app/display/gimpdisplayshell.c * app/gui/file-dialog-utils.c * app/gui/file-open-dialog.[ch] * app/gui/file-save-dialog.[ch] * app/gui/gui.c * app/gui/menus.c * app/gui/paths-dialog.c * app/xcf/xcf.c * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/plug_in.pdb: changed accordingly (includes, renamed functions and gimp_menu_item_*() removal). * app/pdb/fileops_cmds.c * app/pdb/help_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
2002-03-21 01:46:13 +08:00
plug_ins_exit (the_gimp);
1997-11-25 06:05:25 +08:00
if (! no_interface)
1997-11-25 06:05:25 +08:00
{
tool_manager_exit (the_gimp);
app/Makefile.am removed. 2001-07-07 Michael Natterer <mitch@gimp.org> * app/Makefile.am * app/context_manager.[ch]: removed. * app/app_procs.c: call tool_mananger instead of context_manager functions, pass "the_gimp" to some more functions. * app/drawable.[ch]: pass a GimpContext to drawable_fill(). * app/errors.c: behave according to "stack_trace_mode" when using the debugging signal handler. * app/gimprc.[ch]: removed the core/ config variables. * app/selection.c: set the selection's state to INVISIBLE in selection_pause(). * app/core/Makefile.am * app/core/gimpcoreconfig.[ch]: new files (the configuration variables used by core/). * app/core/gimpcontext.[ch]: removed the global contexts (user, default, ...) and their functions. It's no longer possible to pass NULL to the context functions to manipulate the current context (gimpcontext.c doesn't know the current context any more). * app/core/gimp.[ch]: added them here. The functions are now called gimp_[set|get]_*_context(). Added gimp_create_context() which is the only function to create contexts now. * app/gui/dialogs.[ch] * app/gui/gui.[ch]: pass "gimp" to all functions. * app/tools/tool_manager.[ch] * app/tools/tools.[ch]: pass "gimp" to lots of functions. Added the "global_tool_context" logic and the global/non-global paint options switching from the context_manager. Pass "gimp" to all tools' "register" functions. * app/tools/*: changed accordingly. * app/devices.c * app/disp_callbacks.c * app/file-open.[ch] * app/file-save.c * app/gdisplay.c * app/gimage.c * app/libgimp_glue.c * app/module_db.c * app/nav_window.c * app/plug_in.c * app/qmask.c * app/undo.c * app/base/base-config.c * app/core/gimpbrushpipe.c * app/core/gimpdrawable-offset.c * app/core/gimpgradient.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimpimage-new.c * app/core/gimpimage.c * app/core/gimppalette.c * app/core/gimptoolinfo.[ch] * app/core/gimpundo.c * app/gui/brush-select.c * app/gui/channels-commands.c * app/gui/color-area.c * app/gui/dialogs-constructors.c * app/gui/file-new-dialog.c * app/gui/file-open-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/info-window.c * app/gui/layers-commands.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.c * app/gui/test-commands.c * app/gui/tool-options-dialog.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/xcf/xcf-load.c * app/xcf/xcf-save.c * app/widgets/gimpchannellistview.c * app/widgets/gimpdnd.c * app/widgets/gimpdrawablelistview.[ch] * app/widgets/gimpimagedock.c * app/widgets/gimplayerlistview.c * app/pdb/brushes_cmds.c * app/pdb/drawable_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/gradients_cmds.c * app/pdb/palette_cmds.c * app/pdb/patterns_cmds.c * app/pdb/procedural_db.c * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/drawable.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/patterns.pdb: changed accordingly: remove usage of gimp_context_[get|set]_*(NULL), create contexts with gimp_create_context(). Get the user/current context with gimp_get_[user|current]_context(). Added/removed access to the global "the_gimp" variable in some places. Get the core's config variables from "core_config".
2001-07-07 20:17:23 +08:00
gui_exit (the_gimp);
1997-11-25 06:05:25 +08:00
}
gimp_shutdown (the_gimp);
g_object_unref (G_OBJECT (the_gimp));
app/core/Makefile.am app/core/core-types.h added an "application object" 2001-07-04 Michael Natterer <mitch@gimp.org> * app/core/Makefile.am * app/core/core-types.h * app/core/gimp.[ch]: added an "application object" called Gimp. Currently, it contains the image list, the clipboard, the data factories, the procedural hashtable and the tool info list. It's the toplevel object of the core object system. Finally, creating a Gimp object will return a standalone gimp core engine instance with no other global states/variables involved. * app/app_procs.[ch]: allocate a "Gimp" instance called "the_gimp" :) Removed stuff which is now done by the "Gimp" object. Merged gimp_init() into app_init() because gimp_init() is taken now. * app/context_manager.[ch]: removed stuff done by "Gimp". * app/batch.[ch] * app/gimage.[ch] * app/xcf/xcf-load.[ch] * app/xcf/xcf.[ch] * app/core/gimpedit.[ch] * app/tools/tool_manager.[ch]: pass around an additional "Gimp" argument. * app/pdb/procedural_db.[ch]: pass a "Gimp" pointer as first parameter to all internal procedures and to all procedural_db_* functions. * app/core/gimpcontext.[ch] * app/core/gimpimage.[ch]: added a "Gimp" pointer to the structs. * app/devices.c * app/errors.c * app/file-open.c * app/file-save.c * app/gimphelp.c * app/gimpunit.c * app/image_new.c * app/main.c * app/nav_window.c * app/plug_in.c * app/base/base.c * app/core/gimpdatafactory.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-mask.c * app/core/gimptoolinfo.[ch] * app/gui/brush-select.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/edit-commands.c * app/gui/file-open-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gradient-select.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/info-window.c * app/gui/menus.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/palette-select.c * app/gui/paths-dialog.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c * app/gui/test-commands.c * app/gui/toolbox.c * app/gui/tools-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimppainttool.h * app/tools/gimptexttool.c * app/tools/gimptransformtool.h * app/widgets/gimpbufferview.c * app/widgets/gimpcontainerview-utils.c * app/widgets/gimpcursor.c * app/widgets/gimpdnd.c * app/widgets/gimpimagedock.c: changed accordingly. Cleaned up lots of includes. Many files still access the global "the_gimp" variable exported by app_procs.h. * tools/pdbgen/app.pl * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/edit.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/palette.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/procedural_db.pdb: changed accordingly. Don't use "the_gimp" here because all procedures get passed a "Gimp" pointer now. * app/pdb/*: regenerated.
2001-07-05 03:31:35 +08:00
the_gimp = NULL;
base_exit ();
/* 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
*/
exit (0);
1997-11-25 06:05:25 +08:00
}