implemented PDB interface for changing the g_message handler

plug-ins/gif/gif.c: g_printized "no comment" warning

Bunch o' build stuff fixes

-Yosh
This commit is contained in:
Manish Singh 1998-06-19 23:37:11 +00:00
parent 4b55a6b82c
commit a2b03b0eb6
31 changed files with 1699 additions and 155 deletions

View File

@ -1,3 +1,16 @@
Fri Jun 19 16:32:21 PDT 1998 Manish Singh <yosh@gimp.org>
* app/appenv.h
* app/app_procs.c
* app/errors.[ch]
* app/main.c
* app/plug_in.c: implemented PDB interface for changing
the g_message handler
* plug-ins/gif/gif.c: g_printized "no comment" warning
* Bunch o' build stuff fixes
Sun Jun 14 22:11:19 EDT 1998 Matthew Wilson <msw@gimp.org>
* app/tools.c: fix the initialization for by color select

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -516,8 +516,7 @@ app_init (void)
render_setup (transparency_type, transparency_size);
tools_options_dialog_new ();
tools_select (RECT_SELECT);
if (console_messages == FALSE)
g_set_message_handler (&message_box_func);
message_handler = MESSAGE_BOX;
}
color_transfer_init ();
@ -540,7 +539,7 @@ app_exit_finish (void)
return;
is_app_exit_finish_done = TRUE;
g_set_message_handler (&message_console_func);
message_handler = CONSOLE;
lc_dialog_free ();
gdisplays_delete ();

View File

@ -28,6 +28,11 @@
#define MINIMUM(x,y) ((x < y) ? x : y)
#define MAXIMUM(x,y) ((x > y) ? x : y)
typedef enum {
MESSAGE_BOX,
CONSOLE
} MessageHandlerType;
extern int no_interface;
extern int no_splash;
extern int no_splash_image;
@ -36,4 +41,6 @@ extern int be_verbose;
extern int use_debug_handler;
extern int console_messages;
extern MessageHandlerType message_handler;
#endif /* APPENV_H */

View File

@ -33,15 +33,12 @@
extern char *prog_name;
void
message_console_func (char *str)
message_func (char *str)
{
fprintf (stderr, "%s: %s\n", prog_name, str);
}
void
message_box_func (char *str)
{
message_box (str, NULL, NULL);
if ((console_messages == FALSE) && (message_handler == MESSAGE_BOX))
message_box (str, NULL, NULL);
else
fprintf (stderr, "%s: %s\n", prog_name, str);
}
void

View File

@ -18,8 +18,7 @@
#ifndef __ERRORS_H__
#define __ERRORS_H__
void message_console_func (char *);
void message_box_func (char *);
void message_func (char *);
void fatal_error (char *, ...);
void terminate (char *, ...);

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -48,6 +48,9 @@ int be_verbose;
int use_shm;
int use_debug_handler;
int console_messages;
MessageHandlerType message_handler;
char *prog_name; /* The path name we are invoked with */
char **batch_cmds;
@ -108,6 +111,9 @@ main (int argc, char **argv)
use_shm = TRUE;
use_debug_handler = FALSE;
console_messages = FALSE;
message_handler = CONSOLE;
batch_cmds = g_new (char*, argc);
batch_cmds[0] = NULL;
@ -206,8 +212,7 @@ main (int argc, char **argv)
if (show_version || show_help)
exit (0);
/* Print to console at first */
g_set_message_handler (&message_console_func);
g_set_message_handler (&message_func);
/* Handle some signals */
signal (SIGHUP, on_signal);

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -116,6 +116,9 @@ static Argument* progress_update_invoker (Argument *args);
static Argument* message_invoker (Argument *args);
static Argument* message_handler_get_invoker (Argument *args);
static Argument* message_handler_set_invoker (Argument *args);
static GSList *plug_in_defs = NULL;
static GSList *gimprc_proc_defs = NULL;
@ -210,6 +213,53 @@ static ProcRecord message_proc =
};
static ProcArg message_handler_get_out_args[] =
{
{ PDB_INT32,
"handler",
"the current handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_get_proc =
{
"gimp_message_handler_get",
"Returns the current state of where warning messages are displayed.",
"This procedure returns the way g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
0,
NULL,
1,
message_handler_get_out_args,
{ { message_handler_get_invoker } },
};
static ProcArg message_handler_set_args[] =
{
{ PDB_INT32,
"handler",
"the new handler type: { MESSAGE_BOX (0), CONSOLE (1) }" }
};
static ProcRecord message_handler_set_proc =
{
"gimp_message_handler_set",
"Controls where warning messages are displayed.",
"This procedure controls how g_message warnings are displayed. They can be shown in a dialog box or printed on the console where gimp was started.",
"Manish Singh",
"Manish Singh",
"1998",
PDB_INTERNAL,
1,
message_handler_set_args,
0,
NULL,
{ { message_handler_set_invoker } },
};
void
plug_in_init ()
{
@ -226,6 +276,8 @@ plug_in_init ()
/* initialize the message box procedural db calls */
procedural_db_register (&message_proc);
procedural_db_register (&message_handler_get_proc);
procedural_db_register (&message_handler_set_proc);
/* initialize the gimp protocol library and set the read and
* write handlers.
@ -3009,3 +3061,27 @@ message_invoker (Argument *args)
g_message (args[0].value.pdb_pointer, NULL, NULL);
return procedural_db_return_args (&message_proc, TRUE);
}
static Argument*
message_handler_get_invoker (Argument *args)
{
Argument *return_args;
return_args = procedural_db_return_args (&message_handler_get_proc, TRUE);
return_args[1].value.pdb_int = message_handler;
return return_args;
}
static Argument*
message_handler_set_invoker (Argument *args)
{
int success = TRUE;
if ((args[0].value.pdb_int >= MESSAGE_BOX) &&
(args[0].value.pdb_int <= CONSOLE))
message_handler = args[0].value.pdb_int;
else
success = FALSE;
return procedural_db_return_args (&message_handler_set_proc, success);
}

View File

@ -88,9 +88,11 @@ if eval "test x$GCC = xyes"; then
fi
gimp_save_CPPFLAGS="$CPPFLAGS"
gimp_save_LDFLAGS="$LDFLAGS"
gimp_save_LIBS="$LIBS"
CPPFLAGS="$GTK_CFLAGS $CPPFLAGS"
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
LDFLAGS="$LDFLAGS `echo $GTK_LIBS | sed 's/\(.*\)\(-lgtk.*\)/\1/'`"
LIBS="$LIBS $GTK_LIBS"
dnl Test for Xmu
@ -139,7 +141,7 @@ dnl Test for libjpeg
jpeg_ok=no
AC_MSG_WARN(*** JPEG plug-in will not be built (JPEG library not found) ***))
if test "$jpeg_ok" = yes; then
AC_MSG_CHECKING([for jpeg.h])
AC_MSG_CHECKING([for jpeglib.h])
AC_TRY_CPP(
[#include <stdio.h>
#undef PACKAGE
@ -303,6 +305,7 @@ dnl check for difftime
AC_CHECK_FUNC(difftime, , AC_DEFINE(NO_DIFFTIME))
CPPFLAGS="$gimp_save_CPPFLAGS"
LDFLAGS="$gimp_save_LDFLAGS"
LIBS="$gimp_save_LIBS"
gimpdatadir=$datadir/gimp
@ -395,10 +398,10 @@ AC_SUBST(GIMP_VERSION)
AC_SUBST(gimpdir)
AC_SUBST(gimpdatadir)
AC_SUBST(gimpplugindir)
AC_SUBST(brushdata)
AC_SUBST(gradientdata)
AC_SUBST(palettedata)
AC_SUBST(patterndata)
AC_SUBST(brushdata)
AC_SUBST(gradientdata)
AC_SUBST(palettedata)
AC_SUBST(patterndata)
AC_SUBST(WEBBROWSER)
AC_SUBST(LIBXMU_LIB)
AC_SUBST(TIFF)
@ -431,137 +434,136 @@ gimprc_user
gimptool
libgimp/Makefile
plug-ins/Makefile
plug-ins/build
plug-ins/dbbrowser/Makefile
plug-ins/CML_explorer/Makefile
plug-ins/convmatrix/Makefile
plug-ins/diffraction/Makefile
plug-ins/pix/Makefile
plug-ins/oilify/Makefile
plug-ins/nova/Makefile
plug-ins/normalize/Makefile
plug-ins/noisify/Makefile
plug-ins/nlfilt/Makefile
plug-ins/mosaic/Makefile
plug-ins/mblur/Makefile
plug-ins/maze/Makefile
plug-ins/max_rgb/Makefile
plug-ins/mail/Makefile
plug-ins/laplace/Makefile
plug-ins/ifscompose/Makefile
plug-ins/iwarp/Makefile
plug-ins/hrz/Makefile
plug-ins/hot/Makefile
plug-ins/gz/Makefile
plug-ins/header/Makefile
plug-ins/grid/Makefile
plug-ins/gee/Makefile
plug-ins/gradmap/Makefile
plug-ins/gqbist/Makefile
plug-ins/gif/Makefile
plug-ins/gicon/Makefile
plug-ins/gfli/Makefile
plug-ins/gbr/Makefile
plug-ins/gauss_iir/Makefile
plug-ins/gauss_rle/Makefile
plug-ins/fits/Makefile
plug-ins/film/Makefile
plug-ins/faxg3/Makefile
plug-ins/exchange/Makefile
plug-ins/engrave/Makefile
plug-ins/emboss/Makefile
plug-ins/edge/Makefile
plug-ins/displace/Makefile
plug-ins/destripe/Makefile
plug-ins/despeckle/Makefile
plug-ins/depthmerge/Makefile
plug-ins/deinterlace/Makefile
plug-ins/decompose/Makefile
plug-ins/cubism/Makefile
plug-ins/compose/Makefile
plug-ins/checkerboard/Makefile
plug-ins/bz2/Makefile
plug-ins/xpm/Makefile
plug-ins/AlienMap/Makefile
plug-ins/c_astretch/Makefile
plug-ins/bumpmap/Makefile
plug-ins/script-fu/Makefile
plug-ins/script-fu/scripts/Makefile
plug-ins/jpeg/Makefile
plug-ins/mpeg/Makefile
plug-ins/aa/Makefile
plug-ins/png/Makefile
plug-ins/tiff/Makefile
plug-ins/xd/Makefile
plug-ins/bmp/Makefile
plug-ins/megawidget/Makefile
plug-ins/blur/Makefile
plug-ins/flame/Makefile
plug-ins/struc/Makefile
plug-ins/zealouscrop/Makefile
plug-ins/xwd/Makefile
plug-ins/whirlpinch/Makefile
plug-ins/waves/Makefile
plug-ins/vpropagate/Makefile
plug-ins/vinvert/Makefile
plug-ins/video/Makefile
plug-ins/url/Makefile
plug-ins/tiler/Makefile
plug-ins/tile/Makefile
plug-ins/tileit/Makefile
plug-ins/threshold_alpha/Makefile
plug-ins/tga/Makefile
plug-ins/sunras/Makefile
plug-ins/spread/Makefile
plug-ins/sparkle/Makefile
plug-ins/sobel/Makefile
plug-ins/snp/Makefile
plug-ins/snoise/Makefile
plug-ins/smooth_palette/Makefile
plug-ins/sinus/Makefile
plug-ins/shift/Makefile
plug-ins/sgi/Makefile
plug-ins/semiflatten/Makefile
plug-ins/scatter_hsv/Makefile
plug-ins/rotators/Makefile
plug-ins/rotate/Makefile
plug-ins/ripple/Makefile
plug-ins/randomize/Makefile
plug-ins/palette/Makefile
plug-ins/ps/Makefile
plug-ins/print/Makefile
plug-ins/polar/Makefile
plug-ins/pnm/Makefile
plug-ins/plasma/Makefile
plug-ins/pixelize/Makefile
plug-ins/pcx/Makefile
plug-ins/pagecurl/Makefile
plug-ins/pat/Makefile
plug-ins/blinds/Makefile
plug-ins/autostretch_hsv/Makefile
plug-ins/autocrop/Makefile
plug-ins/apply_lens/Makefile
plug-ins/animationplay/Makefile
plug-ins/align_layers/Makefile
plug-ins/CEL/Makefile
plug-ins/glasstile/Makefile
plug-ins/gtm/Makefile
plug-ins/colorify/Makefile
plug-ins/papertile/Makefile
plug-ins/illusion/Makefile
plug-ins/fractaltrace/Makefile
plug-ins/flarefx/Makefile
plug-ins/webbrowser/Makefile
plug-ins/animoptimize/Makefile
plug-ins/libgck/Makefile
plug-ins/libgck/gck/Makefile
plug-ins/megawidget/Makefile
plug-ins/gpc/Makefile
plug-ins/dbbrowser/Makefile
plug-ins/script-fu/Makefile
plug-ins/script-fu/scripts/Makefile
plug-ins/aa/Makefile
plug-ins/jpeg/Makefile
plug-ins/mpeg/Makefile
plug-ins/png/Makefile
plug-ins/tiff/Makefile
plug-ins/webbrowser/Makefile
plug-ins/xd/Makefile
plug-ins/xpm/Makefile
plug-ins/AlienMap/Makefile
plug-ins/CEL/Makefile
plug-ins/CML_explorer/Makefile
plug-ins/MapObject/Makefile
plug-ins/align_layers/Makefile
plug-ins/animationplay/Makefile
plug-ins/animoptimize/Makefile
plug-ins/apply_lens/Makefile
plug-ins/autocrop/Makefile
plug-ins/autostretch_hsv/Makefile
plug-ins/blinds/Makefile
plug-ins/blur/Makefile
plug-ins/bmp/Makefile
plug-ins/bumpmap/Makefile
plug-ins/bz2/Makefile
plug-ins/c_astretch/Makefile
plug-ins/checkerboard/Makefile
plug-ins/colorify/Makefile
plug-ins/compose/Makefile
plug-ins/convmatrix/Makefile
plug-ins/cubism/Makefile
plug-ins/decompose/Makefile
plug-ins/deinterlace/Makefile
plug-ins/depthmerge/Makefile
plug-ins/despeckle/Makefile
plug-ins/destripe/Makefile
plug-ins/diffraction/Makefile
plug-ins/displace/Makefile
plug-ins/edge/Makefile
plug-ins/emboss/Makefile
plug-ins/engrave/Makefile
plug-ins/exchange/Makefile
plug-ins/faxg3/Makefile
plug-ins/film/Makefile
plug-ins/fits/Makefile
plug-ins/flame/Makefile
plug-ins/flarefx/Makefile
plug-ins/fractaltrace/Makefile
plug-ins/gauss_iir/Makefile
plug-ins/gauss_rle/Makefile
plug-ins/gbr/Makefile
plug-ins/gee/Makefile
plug-ins/gfig/Makefile
plug-ins/gfig/gfig-examples/Makefile
plug-ins/screenshot/Makefile
plug-ins/sharpen/Makefile
plug-ins/gfli/Makefile
plug-ins/gicon/Makefile
plug-ins/gif/Makefile
plug-ins/glasstile/Makefile
plug-ins/gqbist/Makefile
plug-ins/gradmap/Makefile
plug-ins/grid/Makefile
plug-ins/gtm/Makefile
plug-ins/gz/Makefile
plug-ins/header/Makefile
plug-ins/hot/Makefile
plug-ins/hrz/Makefile
plug-ins/ifscompose/Makefile
plug-ins/illusion/Makefile
plug-ins/iwarp/Makefile
plug-ins/laplace/Makefile
plug-ins/mail/Makefile
plug-ins/max_rgb/Makefile
plug-ins/maze/Makefile
plug-ins/mblur/Makefile
plug-ins/mosaic/Makefile
plug-ins/nlfilt/Makefile
plug-ins/noisify/Makefile
plug-ins/normalize/Makefile
plug-ins/nova/Makefile
plug-ins/oilify/Makefile
plug-ins/pagecurl/Makefile
plug-ins/palette/Makefile
plug-ins/papertile/Makefile
plug-ins/pat/Makefile
plug-ins/pcx/Makefile
plug-ins/pix/Makefile
plug-ins/pixelize/Makefile
plug-ins/plasma/Makefile
plug-ins/pnm/Makefile
plug-ins/polar/Makefile
plug-ins/print/Makefile
plug-ins/ps/Makefile
plug-ins/psd/Makefile
plug-ins/gpc/Makefile
plug-ins/randomize/Makefile
plug-ins/ripple/Makefile
plug-ins/rotate/Makefile
plug-ins/rotators/Makefile
plug-ins/scatter_hsv/Makefile
plug-ins/screenshot/Makefile
plug-ins/semiflatten/Makefile
plug-ins/sgi/Makefile
plug-ins/sharpen/Makefile
plug-ins/shift/Makefile
plug-ins/sinus/Makefile
plug-ins/smooth_palette/Makefile
plug-ins/snoise/Makefile
plug-ins/snp/Makefile
plug-ins/sobel/Makefile
plug-ins/sparkle/Makefile
plug-ins/spread/Makefile
plug-ins/struc/Makefile
plug-ins/sunras/Makefile
plug-ins/tga/Makefile
plug-ins/threshold_alpha/Makefile
plug-ins/tile/Makefile
plug-ins/tileit/Makefile
plug-ins/tiler/Makefile
plug-ins/url/Makefile
plug-ins/video/Makefile
plug-ins/vinvert/Makefile
plug-ins/vpropagate/Makefile
plug-ins/waves/Makefile
plug-ins/whirlpinch/Makefile
plug-ins/xwd/Makefile
plug-ins/zealouscrop/Makefile
app/Makefile
docs/Makefile
data/Makefile

View File

@ -12,6 +12,8 @@ libgimpi_a_SOURCES = gimpprotocol.c \
gimpwire.c \
gimpwire.h
libgimpi_a_DEPENDENCIES = libgimp.la
libgimp_la_SOURCES = gimp.c \
gimpchannel.c \
gimpdisplay.c \

View File

@ -4,20 +4,20 @@ SUBDIRS = \
libgck \
megawidget \
gpc \
MapObject \
AlienMap \
dbbrowser \
script-fu \
struc \
@WEBBROWSER@ \
@AA@ \
@TIFF@ \
@JPEG@ \
@PNG@ \
@MPEG@ \
@PNG@ \
@TIFF@ \
@WEBBROWSER@ \
@XD@ \
@XPM@ \
AlienMap \
CEL \
CML_explorer \
MapObject \
align_layers \
animoptimize \
apply_lens \
@ -30,7 +30,6 @@ SUBDIRS = \
bumpmap \
bz2 \
c_astretch \
CEL \
checkerboard \
colorify \
compose \
@ -114,6 +113,7 @@ SUBDIRS = \
sobel \
sparkle \
spread \
struc \
sunras \
tga \
threshold_alpha \

View File

@ -2689,7 +2689,7 @@ static void GIFEncodeCommentExt (FILE *fp, char *comment)
{
if (comment==NULL||strlen(comment)<1)
{
g_message ("GIF: warning: no comment given - comment block not written.\n");
g_print ("GIF: warning: no comment given - comment block not written.\n");
return;
}

View File

@ -2689,7 +2689,7 @@ static void GIFEncodeCommentExt (FILE *fp, char *comment)
{
if (comment==NULL||strlen(comment)<1)
{
g_message ("GIF: warning: no comment given - comment block not written.\n");
g_print ("GIF: warning: no comment given - comment block not written.\n");
return;
}