Commit 77863d88 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

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.
parent 57157b40
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-11-30 Michael Natterer <mitch@gimp.org>
* app/display/Makefile.am
......
......@@ -57,13 +57,6 @@ config_sources = \
gimprc.c \
gimprc.h
##
## stuff for plug-in/
##
plug_in_sources = \
plug_in.c \
plug_in.h
##
## stuff which is about to be replaced by new subsystems
##
......@@ -101,7 +94,6 @@ gimp_1_3_SOURCES = @STRIP_BEGIN@ \
$(core_ui_sources) \
$(core_sources) \
$(config_sources) \
$(plug_in_sources) \
$(bye_sources) \
$(stuff_sources) \
@STRIP_END@
......
......@@ -24,9 +24,9 @@
#include "core/core-types.h"
#include "commands.h"
#include "plug-in/plug-in.h"
#include "plug_in.h"
#include "commands.h"
/***** Filters *****/
......
......@@ -84,7 +84,7 @@
#include "libgimpbase/gimpprotocol.h"
#include "libgimpbase/gimpwire.h"
#include "display/display-types.h"
#include "plug-in-types.h"
#include "base/tile.h"
#include "base/tile-manager.h"
......@@ -96,6 +96,8 @@
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "widgets/widgets-types.h"
#include "widgets/gimpitemfactory.h"
#include "display/gimpdisplay.h"
......@@ -104,12 +106,11 @@
#include "gui/gradient-select.h"
#include "gui/pattern-select.h"
#include "plug-in.h"
#include "app_procs.h"
#include "appenv.h"
#include "errors.h"
#include "gimpprogress.h"
#include "gimprc.h"
#include "plug_in.h"
#include "libgimp/gimpintl.h"
......@@ -382,7 +383,7 @@ plug_in_init (Gimp *gimp,
{
write_pluginrc = TRUE;
if (be_verbose)
if (gimp->be_verbose)
g_print (_("query plug-in: \"%s\"\n"), plug_in_def->prog);
plug_in_query (plug_in_def);
......@@ -422,7 +423,7 @@ plug_in_init (Gimp *gimp,
/* write the pluginrc file if necessary */
if (write_pluginrc)
{
if (be_verbose)
if (gimp->be_verbose)
g_print (_("writing \"%s\"\n"), filename);
plug_in_write_rc (filename);
......@@ -440,7 +441,7 @@ plug_in_init (Gimp *gimp,
}
/* run the available extensions */
if (be_verbose)
if (gimp->be_verbose)
g_print (_("Starting extensions: "));
(* status_callback) (_("Extensions"), "", 0);
......@@ -457,7 +458,7 @@ plug_in_init (Gimp *gimp,
(proc_def->db_info.num_args == 0) &&
(proc_def->db_info.proc_type == GIMP_EXTENSION))
{
if (be_verbose)
if (gimp->be_verbose)
g_print ("%s ", proc_def->db_info.name);
(* status_callback) (NULL, proc_def->db_info.name, nth / nplugins);
......@@ -466,7 +467,7 @@ plug_in_init (Gimp *gimp,
}
}
if (be_verbose)
if (gimp->be_verbose)
g_print ("\n");
/* create help path list and free up stuff */
......@@ -1087,7 +1088,7 @@ plug_in_open (PlugIn *plug_in)
plug_in->args[4] = g_strdup ("-run");
}
plug_in->args[5] = g_strdup_printf ("%d", (gint) stack_trace_mode);
plug_in->args[5] = g_strdup_printf ("%d", the_gimp->stack_trace_mode);
/* Fork another process. We'll remember the process id
* so that we can later use it to kill the filter if
......
......@@ -41,6 +41,8 @@
#include "core/gimpdatafactory.h"
#include "core/gimpunit.h"
#include "plug-in/plug-in.h"
#include "file/file-open.h"
#include "display/gimpdisplay-foreach.h"
......@@ -54,15 +56,9 @@
#include "appenv.h"
#include "app_procs.h"
#include "batch.h"
#include "errors.h"
#include "gimprc.h"
#include "plug_in.h"
#include "undo.h"
#ifdef DISPLAY_FILTERS
#include "gdisplay_color.h"
#endif /* DISPLAY_FILTERS */
#include "libgimp/gimpintl.h"
......@@ -91,7 +87,10 @@ app_init (gint gimp_argc,
/* Create an instance of the "Gimp" object which is the root of the
* core object system
*/
the_gimp = gimp_new (be_verbose, no_data, no_interface);
the_gimp = gimp_new (be_verbose,
no_data,
no_interface,
stack_trace_mode);
/* Check if the user's gimp_directory exists
*/
......@@ -124,7 +123,7 @@ app_init (gint gimp_argc,
gimp_unitrc_load (the_gimp);
/* parse the local GIMP configuration file */
gimprc_parse (the_gimp);
gimprc_parse (the_gimp, alternate_system_gimprc, alternate_gimprc);
}
/* initialize lowlevel stuff */
......@@ -167,7 +166,7 @@ app_init (gint gimp_argc,
splash_destroy ();
/* FIXME: This needs to go in preferences */
message_handler = MESSAGE_BOX;
message_handler = GIMP_MESSAGE_BOX;
gui_restore (the_gimp, restore_session);
}
......@@ -187,7 +186,7 @@ app_init (gint gimp_argc,
}
}
batch_init (the_gimp);
batch_init (the_gimp, batch_cmds);
if (! no_interface)
{
......@@ -224,7 +223,7 @@ app_init_update_status (const gchar *text1,
static void
app_exit_finish (void)
{
message_handler = CONSOLE;
message_handler = GIMP_CONSOLE;
if (! no_interface)
{
......
......@@ -20,38 +20,23 @@
#define __APPENV_H__
typedef enum
{
MESSAGE_BOX,
CONSOLE,
ERROR_CONSOLE
} MessageHandlerType;
typedef enum
{
STACK_TRACE_NEVER,
STACK_TRACE_QUERY,
STACK_TRACE_ALWAYS
} StackTraceMode;
/* command line options */
extern gboolean no_interface;
extern gboolean no_splash;
extern gboolean no_splash_image;
extern gboolean no_data;
extern gboolean be_verbose;
extern gboolean use_debug_handler;
extern gboolean console_messages;
extern gboolean restore_session;
extern StackTraceMode stack_trace_mode;
extern gchar *alternate_gimprc;
extern gchar *alternate_system_gimprc;
extern gchar **batch_cmds;
extern gboolean no_interface;
extern gboolean no_splash;
extern gboolean no_splash_image;
extern gboolean no_data;
extern gboolean be_verbose;
extern gboolean use_debug_handler;
extern gboolean console_messages;
extern gboolean restore_session;
extern GimpStackTraceMode stack_trace_mode;
extern gchar *alternate_gimprc;
extern gchar *alternate_system_gimprc;
extern gchar **batch_cmds;
/* other global variables */
extern gchar *prog_name;
extern MessageHandlerType message_handler;
extern gchar *prog_name;
extern GimpMessageHandlerType message_handler;
#endif /* __APPENV_H__ */
......@@ -31,7 +31,6 @@
#include "core/core-types.h"
#include "appenv.h"
#include "app_procs.h"
#include "batch.h"
......@@ -50,7 +49,8 @@ static ProcRecord *eval_proc;
void
batch_init (Gimp *gimp)
batch_init (Gimp *gimp,
gchar **batch_cmds)
{
gboolean read_from_stdin = FALSE;
gboolean perl_server_already_running = FALSE;
......
......@@ -20,7 +20,8 @@
#define __BATCH_H__
void batch_init (Gimp *gimp);
void batch_init (Gimp *gimp,
gchar **batch_cmds);
#endif /* __BATCH_H__ */
......@@ -24,6 +24,7 @@
#include "libgimpmath/gimpmath.h"
#include "base/base-types.h"
#include "pdb/pdb-types.h"
#include "plug-in/plug-in-types.h"
#include "undo_types.h" /* EEK */
......
......@@ -120,6 +120,7 @@ gimp_init (Gimp *gimp)
gimp->be_verbose = FALSE;
gimp->no_data = FALSE;
gimp->no_interface = FALSE;
gimp->stack_trace_mode = GIMP_STACK_TRACE_NEVER;
gimp->main_loops = NULL;
......@@ -320,17 +321,19 @@ gimp_finalize (GObject *object)
}
Gimp *
gimp_new (gboolean be_verbose,
gboolean no_data,
gboolean no_interface)
gimp_new (gboolean be_verbose,
gboolean no_data,
gboolean no_interface,
GimpStackTraceMode stack_trace_mode)
{
Gimp *gimp;
gimp = g_object_new (GIMP_TYPE_GIMP, NULL);
gimp->be_verbose = be_verbose ? TRUE : FALSE;
gimp->no_data = no_data ? TRUE : FALSE;
gimp->no_interface = no_interface ? TRUE : FALSE;
gimp->be_verbose = be_verbose ? TRUE : FALSE;
gimp->no_data = no_data ? TRUE : FALSE;
gimp->no_interface = no_interface ? TRUE : FALSE;
gimp->stack_trace_mode = stack_trace_mode;
return gimp;
}
......
......@@ -49,6 +49,7 @@ struct _Gimp
gboolean be_verbose;
gboolean no_data;
gboolean no_interface;
GimpStackTraceMode stack_trace_mode;
GList *main_loops;
......@@ -128,7 +129,8 @@ GType gimp_get_type (void) G_GNUC_CONST;
Gimp * gimp_new (gboolean be_verbose,
gboolean no_data,
gboolean no_interface);
gboolean no_interface,
GimpStackTraceMode stack_trace_mode);
void gimp_initialize (Gimp *gimp,
GimpInitStatusFunc status_callback);
......
......@@ -36,8 +36,6 @@
#include "gimpimage.h"
#include "gimpgradient.h"
#include "errors.h"
#include "libgimp/gimpintl.h"
......
......@@ -44,7 +44,6 @@
#include "gimprc.h"
#include "nav_window.h"
#include "plug_in.h"
#include "libgimp/gimpintl.h"
......
......@@ -41,7 +41,6 @@
#include "widgets/gimpdnd.h"
#include "widgets/gimppreview.h"
#include "appenv.h"
#include "app_procs.h"
#include "devices.h"
#include "gimprc.h"
......@@ -464,7 +463,7 @@ devices_rc_update (gchar *name,
{
gimp_context_set_brush (device_info->context, brush);
}
else if (no_data)
else if (the_gimp->no_data)
{
g_free (device_info->context->brush_name);
device_info->context->brush_name = g_strdup (brush_name);
......@@ -483,7 +482,7 @@ devices_rc_update (gchar *name,
{
gimp_context_set_pattern (device_info->context, pattern);
}
else if (no_data)
else if (the_gimp->no_data)
{
g_free (device_info->context->pattern_name);
device_info->context->pattern_name = g_strdup (pattern_name);
......@@ -502,7 +501,7 @@ devices_rc_update (gchar *name,
{
gimp_context_set_gradient (device_info->context, gradient);
}
else if (no_data)
else if (the_gimp->no_data)
{
g_free (device_info->context->gradient_name);
device_info->context->gradient_name = g_strdup (gradient_name);
......
......@@ -25,9 +25,11 @@
#include "gui-types.h"
#include "plug-in/plug-in.h"
#include "widgets/gimpitemfactory.h"
#include "plug_in.h"
#include "file-dialog-utils.h"
void
......
......@@ -48,6 +48,8 @@
#include "core/gimpdocuments.h"
#include "core/gimpimage.h"
#include "plug-in/plug-in.h"
#include "file/file-open.h"
#include "file/file-utils.h"
......@@ -56,7 +58,6 @@
#include "file-dialog-utils.h"
#include "file-open-dialog.h"
#include "plug_in.h"
#include "undo.h"
#include "libgimp/gimpintl.h"
......
......@@ -38,6 +38,8 @@
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "plug-in/plug-in.h"
#include "file/file-save.h"
#include "file/file-utils.h"
......@@ -47,7 +49,6 @@
#include "file-save-dialog.h"
#include "gimprc.h"
#include "plug_in.h"
#include "undo.h"
#include "libgimp/gimpintl.h"
......
......@@ -352,7 +352,7 @@ user_install_continue_callback (GtkWidget *widget,
#endif
gimprc_init (gimp);
gimp_unitrc_load (gimp);
gimprc_parse (gimp);
gimprc_parse (gimp, alternate_system_gimprc, alternate_gimprc);
user_install_tuning ();
break;
......
......@@ -44,7 +44,6 @@
#include "gimprc.h"
#include "nav_window.h"
#include "plug_in.h"
#include "libgimp/gimpintl.h"
......
......@@ -25,7 +25,6 @@
#include "libgimpwidgets/gimpwidgets.h"
#include "display-types.h"
#include "gui/gui-types.h" /* FIXME */
#include "base/temp-buf.h"
......@@ -40,12 +39,16 @@
#include "core/gimplayermask.h"
#include "core/gimppattern.h"
#include "plug-in/plug-in.h"
#include "widgets/gimpcolorpanel.h"
#include "widgets/gimpcursor.h"
#include "widgets/gimpdnd.h"
#include "widgets/gimpitemfactory.h"
#include "widgets/gimpwidgets-utils.h"
#include "gui/gui-types.h" /* FIXME */
#include "gui/info-window.h"
#include "tools/tools-types.h"
......@@ -63,7 +66,6 @@
#include "gimprc.h"
#include "nav_window.h"
#include "plug_in.h"
#include "undo.h"
#ifdef DISPLAY_FILTERS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment