2006-12-09 21:33:38 +00:00
|
|
|
# GIMP - The GNU Image Manipulation Program
|
1999-05-03 19:22:58 +00:00
|
|
|
# Copyright (C) 1998-1999 Manish Singh
|
|
|
|
|
2009-01-17 22:28:01 +00:00
|
|
|
# This program is free software: you can redistribute it and/or modify
|
1999-05-03 19:22:58 +00:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2009-01-17 22:28:01 +00:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
1999-05-03 19:22:58 +00:00
|
|
|
# (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
|
2018-07-11 21:27:07 +00:00
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1999-05-03 19:22:58 +00:00
|
|
|
|
|
|
|
# "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 = (
|
2006-03-22 09:58:08 +00:00
|
|
|
{ name => 'message', type => 'string',
|
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 = (
|
2006-03-15 15:00:01 +00:00
|
|
|
code => <<'CODE'
|
2003-06-06 13:12:44 +00:00
|
|
|
{
|
2007-03-12 13:04:32 +00:00
|
|
|
const gchar *domain = NULL;
|
2006-07-19 06:50:34 +00:00
|
|
|
|
2006-04-28 22:26:51 +00:00
|
|
|
if (gimp->plug_in_manager->current_plug_in)
|
2006-07-19 06:50:34 +00:00
|
|
|
domain = gimp_plug_in_get_undo_desc (gimp->plug_in_manager->current_plug_in);
|
2006-10-09 08:17:22 +00:00
|
|
|
gimp_show_message (gimp, G_OBJECT (progress), GIMP_MESSAGE_WARNING,
|
2018-02-12 00:59:08 +00:00
|
|
|
domain, 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 = (
|
2006-03-15 15:32:39 +00:00
|
|
|
{ name => 'handler', type => 'enum GimpMessageHandlerType',
|
2006-05-18 17:25:15 +00:00
|
|
|
desc => 'The current handler type' }
|
2006-03-15 15:00:01 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
%invoke = (
|
|
|
|
code => <<'CODE'
|
|
|
|
{
|
|
|
|
handler = gimp->message_handler;
|
|
|
|
}
|
|
|
|
CODE
|
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',
|
2006-05-18 17:25:15 +00:00
|
|
|
desc => 'The new handler type' }
|
1999-05-03 19:22:58 +00:00
|
|
|
);
|
|
|
|
|
2006-03-15 15:00:01 +00:00
|
|
|
%invoke = (
|
|
|
|
code => <<'CODE'
|
|
|
|
{
|
|
|
|
gimp->message_handler = handler;
|
|
|
|
}
|
|
|
|
CODE
|
|
|
|
);
|
1999-05-03 19:22:58 +00:00
|
|
|
}
|
|
|
|
|
2006-03-23 21:17:16 +00:00
|
|
|
|
2006-05-03 18:05:06 +00:00
|
|
|
@headers = qw(<string.h>
|
|
|
|
"core/gimp.h"
|
|
|
|
"plug-in/gimpplugin.h"
|
|
|
|
"plug-in/gimppluginmanager.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
|
|
|
|
2008-02-07 17:08:54 +00:00
|
|
|
@procs = qw(message
|
|
|
|
message_get_handler
|
|
|
|
message_set_handler);
|
2006-03-23 21:17:16 +00:00
|
|
|
|
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';
|
2010-07-07 09:43:10 +00:00
|
|
|
$doc_title = 'gimpmessage';
|
|
|
|
$doc_short_desc = 'Display a dialog box with a message.';
|
|
|
|
$doc_long_desc = 'Display a dialog box with a message.';
|
1999-05-03 19:22:58 +00:00
|
|
|
|
|
|
|
1;
|