implemented PDB interface for changing the g_message handler

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

-Yosh
This commit is contained in:
Manish Singh 1998-06-19 23:45:54 +00:00
parent ced712746d
commit 757044c137
33 changed files with 1560 additions and 25 deletions

View File

@ -1,3 +1,14 @@
Fri Jun 19 16:37:40 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
Fri Jun 19 16:12:51 EDT 1998 Adrian Likins <adrain@gimp.org>
* TODO: more updates

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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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

@ -518,8 +518,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 ();
@ -556,7 +555,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

@ -479,7 +479,7 @@ gdisplay_origin_button_press (GtkWidget *widget,
/* Stop the signal emission so the button doesn't grab the
* pointer away from us
*/
gtk_signal_emit_stop_by_name (widget, "button_press_event");
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "button_press_event");
}
return FALSE;

View File

@ -479,7 +479,7 @@ gdisplay_origin_button_press (GtkWidget *widget,
/* Stop the signal emission so the button doesn't grab the
* pointer away from us
*/
gtk_signal_emit_stop_by_name (widget, "button_press_event");
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "button_press_event");
}
return FALSE;

View File

@ -479,7 +479,7 @@ gdisplay_origin_button_press (GtkWidget *widget,
/* Stop the signal emission so the button doesn't grab the
* pointer away from us
*/
gtk_signal_emit_stop_by_name (widget, "button_press_event");
gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "button_press_event");
}
return FALSE;

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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -109,6 +112,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;
@ -207,8 +213,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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;
@ -213,6 +216,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 ()
{
@ -229,6 +279,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.
@ -3063,3 +3115,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

@ -60,9 +60,7 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_CPP
dnl Check for our required libraries
AM_PATH_GLIB(1.1.0,,
AC_MSG_ERROR(Test for GLIB failed. See the file 'INSTALL' for help.))
dnl Check for GTK+
AM_PATH_GTK(1.1.0,,
AC_MSG_ERROR(Test for GTK failed. See the file 'INSTALL' for help.))
@ -93,7 +91,6 @@ gimp_save_LDFLAGS="$LDFLAGS"
gimp_save_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
LDFLAGS="$LDFLAGS `echo $GLIB_LIBS | sed 's/\(.*\)\(-lglib.*\)/\1/'`"
LDFLAGS="$LDFLAGS `echo $GTK_LIBS | sed 's/\(.*\)\(-lgtk.*\)/\1/'`"
LIBS="$LIBS $GTK_LIBS"

View File

@ -49,7 +49,7 @@ CPPFLAGS = \
INCLUDES = \
-I$(top_srcdir) \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
-I$(includedir)
libgimpui_1_1_la_INCLUDES = \

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;
}