Commit 1bcd3e18 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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".
parent 94dbfa07
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-06 Dave Neary <dneary@eircom.net> 2001-07-06 Dave Neary <dneary@eircom.net>
* app/gimprc.c: Removed some C89 & gcc extention stuff which broke * app/gimprc.c: Removed some C89 & gcc extention stuff which broke
......
...@@ -79,8 +79,6 @@ gimp_SOURCES = @STRIP_BEGIN@ \ ...@@ -79,8 +79,6 @@ gimp_SOURCES = @STRIP_BEGIN@ \
## ##
## stuff for core/ ## stuff for core/
## ##
context_manager.c \
context_manager.h \
datafiles.c \ datafiles.c \
datafiles.h \ datafiles.h \
drawable.c \ drawable.c \
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "core/core-types.h" #include "core/core-types.h"
#include "core/gimp.h"
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-mask.h" #include "core/gimpimage-mask.h"
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
#include "gdisplay.h" #include "gdisplay.h"
#include "menus.h" #include "menus.h"
#include "app_procs.h"
#include "drawable.h" #include "drawable.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -314,7 +316,9 @@ new_channel_query_ok_callback (GtkWidget *widget, ...@@ -314,7 +316,9 @@ new_channel_query_ok_callback (GtkWidget *widget,
channel_name, channel_name,
&channel_color); &channel_color);
drawable_fill (GIMP_DRAWABLE (new_channel), TRANSPARENT_FILL); drawable_fill (GIMP_DRAWABLE (new_channel),
gimp_get_user_context (the_gimp),
TRANSPARENT_FILL);
gimp_image_add_channel (gimage, new_channel, -1); gimp_image_add_channel (gimage, new_channel, -1);
gdisplays_flush (); gdisplays_flush ();
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "paint-funcs/paint-funcs.h" #include "paint-funcs/paint-funcs.h"
#include "core/gimp.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-mask.h" #include "core/gimpimage-mask.h"
#include "core/gimplayer.h" #include "core/gimplayer.h"
...@@ -42,6 +43,7 @@ ...@@ -42,6 +43,7 @@
#include "menus.h" #include "menus.h"
#include "resize-dialog.h" #include "resize-dialog.h"
#include "app_procs.h"
#include "drawable.h" #include "drawable.h"
#include "gdisplay.h" #include "gdisplay.h"
#include "floating_sel.h" #include "floating_sel.h"
...@@ -542,7 +544,9 @@ new_layer_query_ok_callback (GtkWidget *widget, ...@@ -542,7 +544,9 @@ new_layer_query_ok_callback (GtkWidget *widget,
layer_name, OPAQUE_OPACITY, NORMAL_MODE); layer_name, OPAQUE_OPACITY, NORMAL_MODE);
if (layer) if (layer)
{ {
drawable_fill (GIMP_DRAWABLE (layer), fill_type); drawable_fill (GIMP_DRAWABLE (layer),
gimp_get_user_context (the_gimp),
fill_type);
gimp_image_add_layer (gimage, layer, -1); gimp_image_add_layer (gimage, layer, -1);
/* End the group undo */ /* End the group undo */
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
#include "base/tile.h" #include "base/tile.h"
#include "base/tile-manager.h" #include "base/tile-manager.h"
#include "core/gimpcoreconfig.h"
#include "core/gimpdrawable.h" #include "core/gimpdrawable.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
...@@ -322,18 +323,19 @@ plug_in_init (void) ...@@ -322,18 +323,19 @@ plug_in_init (void)
plug_in_init_shm (); plug_in_init_shm ();
/* search for binaries in the plug-in directory path */ /* search for binaries in the plug-in directory path */
gimp_datafiles_read_directories (gimprc.plug_in_path, MODE_EXECUTABLE, gimp_datafiles_read_directories (core_config->plug_in_path, MODE_EXECUTABLE,
plug_in_init_file, NULL); plug_in_init_file, NULL);
/* read the pluginrc file for cached data */ /* read the pluginrc file for cached data */
filename = NULL; filename = NULL;
if (gimprc.pluginrc_path) if (core_config->pluginrc_path)
{ {
if (g_path_is_absolute (gimprc.pluginrc_path)) if (g_path_is_absolute (core_config->pluginrc_path))
filename = g_strdup (gimprc.pluginrc_path); filename = g_strdup (core_config->pluginrc_path);
else else
filename = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", filename = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s",
gimp_directory (), gimprc.pluginrc_path); gimp_directory (),
core_config->pluginrc_path);
} }
else else
filename = gimp_personal_rc_file ("pluginrc"); filename = gimp_personal_rc_file ("pluginrc");
...@@ -853,7 +855,7 @@ plug_in_new (gchar *name) ...@@ -853,7 +855,7 @@ plug_in_new (gchar *name)
if (! g_path_is_absolute (name)) if (! g_path_is_absolute (name))
{ {
path = plug_in_search_in_path (gimprc.plug_in_path, name); path = plug_in_search_in_path (core_config->plug_in_path, name);
if (! path) if (! path)
{ {
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "core/core-types.h" #include "core/core-types.h"
#include "core/gimp.h"
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
#include "widgets/gimpcolorpanel.h" #include "widgets/gimpcolorpanel.h"
#include "app_procs.h"
#include "drawable.h" #include "drawable.h"
#include "floating_sel.h" #include "floating_sel.h"
#include "gdisplay.h" #include "gdisplay.h"
...@@ -238,7 +240,10 @@ qmask_activate (GtkWidget *widget, ...@@ -238,7 +240,10 @@ qmask_activate (GtkWidget *widget,
"Qmask", "Qmask",
&color); &color);
gimp_image_add_channel (gimg, gmask, 0); gimp_image_add_channel (gimg, gmask, 0);
drawable_fill (GIMP_DRAWABLE (gmask), TRANSPARENT_FILL);
drawable_fill (GIMP_DRAWABLE (gmask),
gimp_get_user_context (gimg->gimp),
TRANSPARENT_FILL);
} }
else else
{ {
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "core/core-types.h" #include "core/core-types.h"
#include "core/gimp.h"
#include "core/gimpchannel.h" #include "core/gimpchannel.h"
#include "core/gimpcontext.h" #include "core/gimpcontext.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
...@@ -36,6 +37,7 @@ ...@@ -36,6 +37,7 @@
#include "widgets/gimpcolorpanel.h" #include "widgets/gimpcolorpanel.h"
#include "app_procs.h"
#include "drawable.h" #include "drawable.h"
#include "floating_sel.h" #include "floating_sel.h"
#include "gdisplay.h" #include "gdisplay.h"
...@@ -238,7 +240,10 @@ qmask_activate (GtkWidget *widget, ...@@ -238,7 +240,10 @@ qmask_activate (GtkWidget *widget,
"Qmask", "Qmask",
&color); &color);
gimp_image_add_channel (gimg, gmask, 0); gimp_image_add_channel (gimg, gmask, 0);
drawable_fill (GIMP_DRAWABLE (gmask), TRANSPARENT_FILL);
drawable_fill (GIMP_DRAWABLE (gmask),
gimp_get_user_context (gimg->gimp),
TRANSPARENT_FILL);
} }
else else
{ {
......
...@@ -42,14 +42,14 @@ void ...@@ -42,14 +42,14 @@ void
tools_default_colors_cmd_callback (GtkWidget *widget, tools_default_colors_cmd_callback (GtkWidget *widget,
gpointer data) gpointer data)
{ {
gimp_context_set_default_colors (gimp_context_get_user ()); gimp_context_set_default_colors (gimp_get_user_context (the_gimp));
} }
void void
tools_swap_colors_cmd_callback (GtkWidget *widget, tools_swap_colors_cmd_callback (GtkWidget *widget,
gpointer data) gpointer data)
{ {
gimp_context_swap_colors (gimp_context_get_user ()); gimp_context_swap_colors (gimp_get_user_context (the_gimp));
} }
void void
...@@ -61,19 +61,19 @@ tools_swap_contexts_cmd_callback (GtkWidget *widget, ...@@ -61,19 +61,19 @@ tools_swap_contexts_cmd_callback (GtkWidget *widget,
if (! swap_context) if (! swap_context)
{ {
swap_context = gimp_context_new (the_gimp, swap_context = gimp_create_context (the_gimp,
"Swap Context", "Swap Context",
gimp_context_get_user ()); gimp_get_user_context (the_gimp));
temp_context = gimp_context_new (the_gimp, temp_context = gimp_create_context (the_gimp,
"Temp Context", "Temp Context",
NULL); NULL);
} }
gimp_context_copy_args (gimp_context_get_user (), gimp_context_copy_args (gimp_get_user_context (the_gimp),
temp_context, temp_context,
GIMP_CONTEXT_ALL_ARGS_MASK); GIMP_CONTEXT_ALL_ARGS_MASK);
gimp_context_copy_args (swap_context, gimp_context_copy_args (swap_context,
gimp_context_get_user (), gimp_get_user_context (the_gimp),
GIMP_CONTEXT_ALL_ARGS_MASK); GIMP_CONTEXT_ALL_ARGS_MASK);
gimp_context_copy_args (temp_context, gimp_context_copy_args (temp_context,
swap_context, swap_context,
...@@ -91,10 +91,10 @@ tools_select_cmd_callback (GtkWidget *widget, ...@@ -91,10 +91,10 @@ tools_select_cmd_callback (GtkWidget *widget,
tool_type = (GtkType) action; tool_type = (GtkType) action;
tool_info = tool_manager_get_info_by_type (tool_type); tool_info = tool_manager_get_info_by_type (the_gimp, tool_type);
gdisp = gdisplay_active (); gdisp = gdisplay_active ();
gimp_context_set_tool (gimp_context_get_user (), tool_info); gimp_context_set_tool (gimp_get_user_context (the_gimp), tool_info);
#ifdef __GNUC__ #ifdef __GNUC__
#warning FIXME (let the tool manager to this stuff) #warning FIXME (let the tool manager to this stuff)
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "xcf/xcf.h" #include "xcf/xcf.h"
#include "tools/tools.h" #include "tools/tool_manager.h"
#include "gui/color-notebook.h" #include "gui/color-notebook.h"
#include "gui/file-open-dialog.h" #include "gui/file-open-dialog.h"
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
#include "app_procs.h" #include "app_procs.h"
#include "batch.h" #include "batch.h"
#include "colormaps.h" #include "colormaps.h"
#include "context_manager.h"
#include "gdisplay.h" #include "gdisplay.h"
#include "gdisplay_ops.h" #include "gdisplay_ops.h"
#include "gimprc.h" #include "gimprc.h"
...@@ -143,8 +142,7 @@ app_init (gint gimp_argc, ...@@ -143,8 +142,7 @@ app_init (gint gimp_argc,
gtk_object_ref (GTK_OBJECT (the_gimp)); gtk_object_ref (GTK_OBJECT (the_gimp));
gtk_object_sink (GTK_OBJECT (the_gimp)); gtk_object_sink (GTK_OBJECT (the_gimp));
/* Initialize the context system before loading any data */ tool_manager_init (the_gimp);
context_manager_init ();
/* Initialize the procedural database /* Initialize the procedural database
* We need to do this first because any of the init * We need to do this first because any of the init
...@@ -191,7 +189,7 @@ app_init (gint gimp_argc, ...@@ -191,7 +189,7 @@ app_init (gint gimp_argc,
if (! no_interface) if (! no_interface)
{ {
gui_restore (); gui_restore (the_gimp);
} }
/* Parse the rest of the command line arguments as images to load */ /* Parse the rest of the command line arguments as images to load */
...@@ -207,7 +205,7 @@ app_init (gint gimp_argc, ...@@ -207,7 +205,7 @@ app_init (gint gimp_argc,
if (! no_interface) if (! no_interface)
{ {
gui_post_init (); gui_post_init (the_gimp);
} }
} }
...@@ -233,20 +231,19 @@ app_exit_finish (void) ...@@ -233,20 +231,19 @@ app_exit_finish (void)
if (! no_interface) if (! no_interface)
{ {
gui_shutdown (); gui_shutdown (the_gimp);
} }
module_db_free (); module_db_free ();
gdisplays_delete (); gdisplays_delete ();
context_manager_free ();
plug_in_kill (); plug_in_kill ();
save_unitrc (); save_unitrc ();
tools_exit (); tool_manager_exit (the_gimp);
if (! no_interface)