1999-05-03 19:22:58 +00:00
|
|
|
# The GIMP -- an image manipulation program
|
|
|
|
# Copyright (C) 1998-1999 Manish Singh
|
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
|
|
|
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
|
|
|
|
|
|
|
|
sub message {
|
|
|
|
$blurb = 'Displays a dialog box with a message.';
|
|
|
|
|
|
|
|
$help = <<'HELP';
|
|
|
|
Displays a dialog box with a message. Useful for status or error reporting.
|
2003-06-06 13:12:44 +00:00
|
|
|
The message must be in UTF-8 encoding.
|
1999-05-03 19:22:58 +00:00
|
|
|
HELP
|
|
|
|
|
2006-03-14 21:35:50 +00:00
|
|
|
&yosh_pdb_misc('1998');
|
1999-05-03 19:22:58 +00:00
|
|
|
|
|
|
|
@inargs = (
|
1999-12-26 07:54:39 +00:00
|
|
|
{ name => 'message', type => 'string', const => 1,
|
2003-08-19 19:08:11 +00:00
|
|
|
desc => 'Message to display in the dialog' }
|
1999-05-03 19:22:58 +00:00
|
|
|
);
|
|
|
|
|
2003-08-18 18:09:26 +00:00
|
|
|
%invoke = (
|
|
|
|
code => <<CODE
|
2003-06-06 13:12:44 +00:00
|
|
|
{
|
2003-08-18 18:09:26 +00:00
|
|
|
if (gimp->current_plug_in)
|
2004-10-14 15:15:03 +00:00
|
|
|
plug_in_progress_message (gimp->current_plug_in, message);
|
|
|
|
else
|
|
|
|
gimp_message (gimp, NULL, message);
|
2003-06-06 13:12:44 +00:00
|
|
|
}
|
|
|
|
CODE
|
|
|
|
);
|
1999-05-03 19:22:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub message_get_handler {
|
|
|
|
$blurb = <<'BLURB';
|
|
|
|
Returns the current state of where warning messages are displayed.
|
|
|
|
BLURB
|
|
|
|
|
|
|
|
$help = <<'HELP';
|
|
|
|
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.
|
|
|
|
HELP
|
|
|
|
|
2006-03-14 21:35:50 +00:00
|
|
|
&yosh_pdb_misc('1998');
|
1999-05-03 19:22:58 +00:00
|
|
|
|
|
|
|
@outargs = (
|
2001-12-01 00:14:14 +00:00
|
|
|
{ name => 'handler', type => 'enum GimpMessageHandlerType',
|
1999-05-03 19:22:58 +00:00
|
|
|
desc => 'The current handler type: { %%desc%% }',
|
2001-12-01 21:02:34 +00:00
|
|
|
alias => 'gimp->message_handler', no_declare => 1 }
|
1999-05-03 19:22:58 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub message_set_handler {
|
|
|
|
$blurb = 'Controls where warning messages are displayed.';
|
|
|
|
|
|
|
|
$help = <<'HELP';
|
|
|
|
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.
|
|
|
|
HELP
|
|
|
|
|
2006-03-14 21:35:50 +00:00
|
|
|
&yosh_pdb_misc('1998');
|
1999-05-03 19:22:58 +00:00
|
|
|
|
|
|
|
@inargs = (
|
2001-12-01 00:14:14 +00:00
|
|
|
{ name => 'handler', type => 'enum GimpMessageHandlerType',
|
1999-05-03 19:22:58 +00:00
|
|
|
desc => 'The new handler type: { %%desc%% }' }
|
|
|
|
);
|
|
|
|
|
2001-12-01 21:02:34 +00:00
|
|
|
%invoke = ( code => 'gimp->message_handler = handler;' );
|
1999-05-03 19:22:58 +00:00
|
|
|
}
|
|
|
|
|
2006-03-14 21:35:50 +00:00
|
|
|
@headers = qw(<string.h> "core/gimp.h" "plug-in/plug-in.h"
|
|
|
|
"plug-in/plug-in-progress.h" "gimp-intl.h");
|
removed the gimp_busy boolean, check whether user_installation is needed
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
user_installation is needed here, not in user_install.c, parse
gtkrc an friends only if(!no_interface), create the Gimp object
before parsing gimp's rc files an pas it to the parse functions,
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
* app/errors.[ch]: added the fatal message func here (from main.c),
removed the StackTraceMode enum.
* app/gimprc.[ch]: renamed functions to gimprc_*(), pass a Gimp
pointer to some functions.
* app/gimpunit.c
* app/unitrc.h: ok, this is ugly: renamed all functions to
_gimp_unit_*() and made them public. The unit list is part
of the Gimp object now, so pass a Gimp* to all functions.
* app/libgimp_glue.[ch]: added EEKy wrappers for all gimp_unit_*()
functions which are used by widgets.
* app/main.c: cleaned up the global variables, removed the fatal
message handler, call app_init() directly, not via the
user_install stuff, misc. cleanups.
* app/user_install.[ch]: removed the check if user_installation is
needed (done by app_procs.c now).
* app/core/gimp.[ch]: added the user_unit list and the "busy"
boolean. Moved gimp_[set|unset]_busy() here. Added
gimp_initialize() which is called after unitrc and gimprc are
parsed.
* app/batch.c
* app/colormaps.c
* app/devices.c
* app/disp_callbacks.c
* app/gdisplay_ops.c
* app/gimphelp.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/core/gimpcontext.c
* app/core/gimpdatafiles.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage.c
* app/core/gimpparasite.c
* app/core/gimpparasitelist.h
* app/gui/file-open-dialog.c
* app/gui/gui.[ch]
* app/gui/info-dialog.c
* app/gui/info-window.c
* app/gui/preferences-dialog.c
* app/gui/session.c
* app/gui/tips-dialog.c
* app/gui/toolbox.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimptransformtool.c
* app/tools/tool_manager.c
* app/widgets/gimpcolorpanel.c
* app/widgets/gimpcursor.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/Makefile.am
* tools/pdbgen/app.pl
* tools/pdbgen/enums.pl
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/unit.pdb
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/unit_cmds.c: changed accordingly, minor cleanups.
2001-07-10 19:16:16 +00:00
|
|
|
|
1999-05-03 19:22:58 +00:00
|
|
|
@procs = qw(message message_get_handler message_set_handler);
|
1999-12-26 07:54:39 +00:00
|
|
|
%exports = (app => [@procs], lib => [@procs]);
|
1999-05-03 19:22:58 +00:00
|
|
|
|
2002-12-03 23:00:42 +00:00
|
|
|
$desc = 'Message procedures';
|
1999-05-03 19:22:58 +00:00
|
|
|
|
|
|
|
1;
|