mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-19 14:23:33 +00:00
780710188d
2003-08-18 Manish Singh <yosh@gimp.org> * tools/pdbgen/app.pl: Default all strings to validate UTF-8, use no_validate to disable. Also added a null_ok parameter which does validate UTF-8, but allows NULL. * tools/pdbgen/pdb/brush_select.pdb * tools/pdbgen/pdb/brushes.pdb * tools/pdbgen/pdb/channel.pdb * tools/pdbgen/pdb/convert.pdb * tools/pdbgen/pdb/fileops.pdb * tools/pdbgen/pdb/font_select.pdb * tools/pdbgen/pdb/gimprc.pdb * tools/pdbgen/pdb/gradient_select.pdb * tools/pdbgen/pdb/gradients.pdb * tools/pdbgen/pdb/help.pdb * tools/pdbgen/pdb/image.pdb * tools/pdbgen/pdb/layer.pdb * tools/pdbgen/pdb/message.pdb * tools/pdbgen/pdb/palette_select.pdb * tools/pdbgen/pdb/palettes.pdb * tools/pdbgen/pdb/parasite.pdb * tools/pdbgen/pdb/paths.pdb * tools/pdbgen/pdb/pattern_select.pdb * tools/pdbgen/pdb/patterns.pdb * tools/pdbgen/pdb/plug_in.pdb * tools/pdbgen/pdb/procedural_db.pdb * tools/pdbgen/pdb/text_tool.pdb * tools/pdbgen/pdb/unit.pdb: removed utf8, added no_validate and null_ok where appropriate. * app/pdb/brush_select_cmds.c * app/pdb/font_select_cmds.c * app/pdb/gradient_select_cmds.c * app/pdb/layer_cmds.c * app/pdb/palette_select_cmds.c * app/pdb/pattern_select_cmds.c * app/pdb/plug_in_cmds.c: regenerated.
101 lines
2.7 KiB
Plaintext
101 lines
2.7 KiB
Plaintext
# 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 pdb_misc {
|
|
$author = $copyright = 'Manish Singh';
|
|
$date = '1998';
|
|
}
|
|
|
|
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.
|
|
The message must be in UTF-8 encoding.
|
|
HELP
|
|
|
|
&pdb_misc;
|
|
|
|
@inargs = (
|
|
{ name => 'message', type => 'string', const => 1,
|
|
desc => 'Message to display in the dialog' }
|
|
);
|
|
|
|
%invoke = (
|
|
code => <<CODE
|
|
{
|
|
gchar *domain = NULL;
|
|
|
|
if (gimp->current_plug_in)
|
|
domain = plug_in_get_undo_desc (gimp->current_plug_in);
|
|
|
|
gimp_message (gimp, domain, message);
|
|
|
|
g_free (domain);
|
|
}
|
|
CODE
|
|
);
|
|
}
|
|
|
|
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
|
|
|
|
&pdb_misc;
|
|
|
|
@outargs = (
|
|
{ name => 'handler', type => 'enum GimpMessageHandlerType',
|
|
desc => 'The current handler type: { %%desc%% }',
|
|
alias => 'gimp->message_handler', no_declare => 1 }
|
|
);
|
|
}
|
|
|
|
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
|
|
|
|
&pdb_misc;
|
|
|
|
@inargs = (
|
|
{ name => 'handler', type => 'enum GimpMessageHandlerType',
|
|
desc => 'The new handler type: { %%desc%% }' }
|
|
);
|
|
|
|
%invoke = ( code => 'gimp->message_handler = handler;' );
|
|
}
|
|
|
|
@headers = qw(<string.h> "core/gimp.h" "plug-in/plug-in.h" "gimp-intl.h");
|
|
|
|
@procs = qw(message message_get_handler message_set_handler);
|
|
%exports = (app => [@procs], lib => [@procs]);
|
|
|
|
$desc = 'Message procedures';
|
|
|
|
1;
|