tools/pdbgen/pdb/brush_select.pdb tools/pdbgen/pdb/brushes.pdb

2003-08-18  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/channel.pdb
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/drawable.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/layer.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/palettes.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: UTF-8 validate all strings except
	filenames. Does not work yet for string params which may be NULL.
	They currently don't get checked because I still don't understand
	pdbgen enough :)

	* app/pdb/brush_select_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/channel_cmds.c
	* app/pdb/convert_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/fileops_cmds.c
	* app/pdb/font_select_cmds.c
	* app/pdb/gimprc_cmds.c
	* app/pdb/gradient_select_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/message_cmds.c
	* app/pdb/palette_select_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/pattern_select_cmds.c
	* app/pdb/patterns_cmds.c
	* app/pdb/plug_in_cmds.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/text_tool_cmds.c
	* app/pdb/unit_cmds.c: regenerated.
This commit is contained in:
Michael Natterer 2003-08-18 18:09:26 +00:00 committed by Michael Natterer
parent 58311491e4
commit db2db08fb4
44 changed files with 248 additions and 191 deletions

View File

@ -1,3 +1,52 @@
2003-08-18 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/drawable.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/layer.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/palette.pdb
* tools/pdbgen/pdb/palette_select.pdb
* tools/pdbgen/pdb/palettes.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: UTF-8 validate all strings except
filenames. Does not work yet for string params which may be NULL.
They currently don't get checked because I still don't understand
pdbgen enough :)
* app/pdb/brush_select_cmds.c
* app/pdb/brushes_cmds.c
* app/pdb/channel_cmds.c
* app/pdb/convert_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/fileops_cmds.c
* app/pdb/font_select_cmds.c
* app/pdb/gimprc_cmds.c
* app/pdb/gradient_select_cmds.c
* app/pdb/gradients_cmds.c
* app/pdb/message_cmds.c
* app/pdb/palette_select_cmds.c
* app/pdb/palettes_cmds.c
* app/pdb/paths_cmds.c
* app/pdb/pattern_select_cmds.c
* app/pdb/patterns_cmds.c
* app/pdb/plug_in_cmds.c
* app/pdb/procedural_db_cmds.c
* app/pdb/text_tool_cmds.c
* app/pdb/unit_cmds.c: regenerated.
2003-08-18 Michael Natterer <mitch@gimp.org>
* app/tools/gimpvectortool.c: cleaned up GimpTool, GimpDrawTool

View File

@ -62,11 +62,11 @@ brushes_popup_invoker (Gimp *gimp,
ProcRecord *proc;
brush_callback = (gchar *) args[0].value.pdb_pointer;
if (brush_callback == NULL)
if (brush_callback == NULL || !g_utf8_validate (brush_callback, -1, NULL))
success = FALSE;
popup_title = (gchar *) args[1].value.pdb_pointer;
if (popup_title == NULL)
if (popup_title == NULL || !g_utf8_validate (popup_title, -1, NULL))
success = FALSE;
initial_brush = (gchar *) args[2].value.pdb_pointer;
@ -164,7 +164,7 @@ brushes_close_popup_invoker (Gimp *gimp,
BrushSelect *brush_select;
brush_callback = (gchar *) args[0].value.pdb_pointer;
if (brush_callback == NULL)
if (brush_callback == NULL || !g_utf8_validate (brush_callback, -1, NULL))
success = FALSE;
if (success)
@ -223,11 +223,11 @@ brushes_set_popup_invoker (Gimp *gimp,
BrushSelect *brush_select;
brush_callback = (gchar *) args[0].value.pdb_pointer;
if (brush_callback == NULL)
if (brush_callback == NULL || !g_utf8_validate (brush_callback, -1, NULL))
success = FALSE;
brush_name = (gchar *) args[1].value.pdb_pointer;
if (brush_name == NULL)
if (brush_name == NULL || !g_utf8_validate (brush_name, -1, NULL))
success = FALSE;
opacity = args[2].value.pdb_float;

View File

@ -232,7 +232,7 @@ brushes_set_brush_invoker (Gimp *gimp,
GimpBrush *brush;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
@ -523,7 +523,7 @@ brushes_get_brush_data_invoker (Gimp *gimp,
GimpBrush *brush = NULL;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)

View File

@ -98,7 +98,7 @@ channel_new_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[3].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
opacity = args[4].value.pdb_float;
@ -437,7 +437,7 @@ channel_set_name_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)

View File

@ -163,7 +163,7 @@ convert_indexed_invoker (Gimp *gimp,
remove_unused = args[5].value.pdb_int ? TRUE : FALSE;
palette_name = (gchar *) args[6].value.pdb_pointer;
if (palette_name == NULL)
if (palette_name == NULL || !g_utf8_validate (palette_name, -1, NULL))
success = FALSE;
if (success)

View File

@ -20,7 +20,6 @@
#include "config.h"
#include <string.h>
#include <glib-object.h>

View File

@ -176,7 +176,7 @@ file_save_invoker (Gimp *gimp,
{
new_args[i].arg_type = proc->args[i].arg_type;
if (proc->args[i].arg_type == GIMP_PDB_STRING)
new_args[i].value.pdb_pointer = g_strdup("\0");
new_args[i].value.pdb_pointer = g_strdup ("");
}
return_vals = procedural_db_execute (gimp, proc->name, new_args);
@ -554,7 +554,7 @@ register_magic_load_handler_invoker (Gimp *gimp,
PlugInProcDef *file_proc;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
extensions = (gchar *) args[1].value.pdb_pointer;
@ -704,7 +704,7 @@ register_save_handler_invoker (Gimp *gimp,
PlugInProcDef *file_proc;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
extensions = (gchar *) args[1].value.pdb_pointer;

View File

@ -57,11 +57,11 @@ fonts_popup_invoker (Gimp *gimp,
ProcRecord *proc;
font_callback = (gchar *) args[0].value.pdb_pointer;
if (font_callback == NULL)
if (font_callback == NULL || !g_utf8_validate (font_callback, -1, NULL))
success = FALSE;
popup_title = (gchar *) args[1].value.pdb_pointer;
if (popup_title == NULL)
if (popup_title == NULL || !g_utf8_validate (popup_title, -1, NULL))
success = FALSE;
initial_font = (gchar *) args[2].value.pdb_pointer;
@ -127,7 +127,7 @@ fonts_close_popup_invoker (Gimp *gimp,
FontSelect *font_select;
font_callback = (gchar *) args[0].value.pdb_pointer;
if (font_callback == NULL)
if (font_callback == NULL || !g_utf8_validate (font_callback, -1, NULL))
success = FALSE;
if (success)
@ -183,11 +183,11 @@ fonts_set_popup_invoker (Gimp *gimp,
FontSelect *font_select;
font_callback = (gchar *) args[0].value.pdb_pointer;
if (font_callback == NULL)
if (font_callback == NULL || !g_utf8_validate (font_callback, -1, NULL))
success = FALSE;
font_name = (gchar *) args[1].value.pdb_pointer;
if (font_name == NULL)
if (font_name == NULL || !g_utf8_validate (font_name, -1, NULL))
success = FALSE;
if (success)

View File

@ -58,7 +58,7 @@ gimprc_query_invoker (Gimp *gimp,
gchar *value = NULL;
token = (gchar *) args[0].value.pdb_pointer;
if (token == NULL)
if (token == NULL || !g_utf8_validate (token, -1, NULL))
success = FALSE;
if (success)
@ -120,7 +120,7 @@ gimprc_set_invoker (Gimp *gimp,
gchar *value;
token = (gchar *) args[0].value.pdb_pointer;
if (token == NULL)
if (token == NULL || !g_utf8_validate (token, -1, NULL))
success = FALSE;
value = (gchar *) args[1].value.pdb_pointer;

View File

@ -60,11 +60,11 @@ gradients_popup_invoker (Gimp *gimp,
ProcRecord *proc;
gradient_callback = (gchar *) args[0].value.pdb_pointer;
if (gradient_callback == NULL)
if (gradient_callback == NULL || !g_utf8_validate (gradient_callback, -1, NULL))
success = FALSE;
popup_title = (gchar *) args[1].value.pdb_pointer;
if (popup_title == NULL)
if (popup_title == NULL || !g_utf8_validate (popup_title, -1, NULL))
success = FALSE;
initial_gradient = (gchar *) args[2].value.pdb_pointer;
@ -142,7 +142,7 @@ gradients_close_popup_invoker (Gimp *gimp,
GradientSelect *gradient_select;
gradient_callback = (gchar *) args[0].value.pdb_pointer;
if (gradient_callback == NULL)
if (gradient_callback == NULL || !g_utf8_validate (gradient_callback, -1, NULL))
success = FALSE;
if (success)
@ -198,11 +198,11 @@ gradients_set_popup_invoker (Gimp *gimp,
GradientSelect *gradient_select;
gradient_callback = (gchar *) args[0].value.pdb_pointer;
if (gradient_callback == NULL)
if (gradient_callback == NULL || !g_utf8_validate (gradient_callback, -1, NULL))
success = FALSE;
gradient_name = (gchar *) args[1].value.pdb_pointer;
if (gradient_name == NULL)
if (gradient_name == NULL || !g_utf8_validate (gradient_name, -1, NULL))
success = FALSE;
if (success)

View File

@ -194,7 +194,7 @@ gradients_set_gradient_invoker (Gimp *gimp,
GimpGradient *gradient;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
@ -457,7 +457,7 @@ gradients_get_gradient_data_invoker (Gimp *gimp,
GimpGradient *gradient = NULL;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
sample_size = args[1].value.pdb_int;

View File

@ -1071,7 +1071,7 @@ layer_set_name_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)

View File

@ -53,17 +53,10 @@ message_invoker (Gimp *gimp,
gchar *message;
message = (gchar *) args[0].value.pdb_pointer;
if (message == NULL)
if (message == NULL || !g_utf8_validate (message, -1, NULL))
success = FALSE;
if (success)
{
if (! g_utf8_validate (message, -1, NULL))
{
g_warning ("Strings passed to g_message() must be in UTF-8 encoding.");
success = FALSE;
}
else
{
gchar *domain = NULL;
@ -74,7 +67,6 @@ message_invoker (Gimp *gimp,
g_free (domain);
}
}
return procedural_db_return_args (&message_proc, success);
}

View File

@ -58,11 +58,11 @@ palettes_popup_invoker (Gimp *gimp,
ProcRecord *proc;
palette_callback = (gchar *) args[0].value.pdb_pointer;
if (palette_callback == NULL)
if (palette_callback == NULL || !g_utf8_validate (palette_callback, -1, NULL))
success = FALSE;
popup_title = (gchar *) args[1].value.pdb_pointer;
if (popup_title == NULL)
if (popup_title == NULL || !g_utf8_validate (popup_title, -1, NULL))
success = FALSE;
initial_palette = (gchar *) args[2].value.pdb_pointer;
@ -130,7 +130,7 @@ palettes_close_popup_invoker (Gimp *gimp,
PaletteSelect *psp;
palette_callback = (gchar *) args[0].value.pdb_pointer;
if (palette_callback == NULL)
if (palette_callback == NULL || !g_utf8_validate (palette_callback, -1, NULL))
success = FALSE;
if (success)
@ -186,11 +186,11 @@ palettes_set_popup_invoker (Gimp *gimp,
PaletteSelect *psp;
palette_callback = (gchar *) args[0].value.pdb_pointer;
if (palette_callback == NULL)
if (palette_callback == NULL || !g_utf8_validate (palette_callback, -1, NULL))
success = FALSE;
palette_name = (gchar *) args[1].value.pdb_pointer;
if (palette_name == NULL)
if (palette_name == NULL || !g_utf8_validate (palette_name, -1, NULL))
success = FALSE;
if (success)

View File

@ -209,7 +209,7 @@ palettes_set_palette_invoker (Gimp *gimp,
GimpPalette *palette;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
@ -263,7 +263,7 @@ palettes_get_palette_entry_invoker (Gimp *gimp,
GimpPalette *palette = NULL;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
entry_num = args[1].value.pdb_int;

View File

@ -242,7 +242,7 @@ path_set_current_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
@ -302,7 +302,7 @@ path_delete_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
@ -368,7 +368,7 @@ path_get_points_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
@ -493,7 +493,7 @@ path_set_points_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
ptype = args[2].value.pdb_int;
@ -774,7 +774,7 @@ path_get_tattoo_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
@ -850,7 +850,7 @@ path_set_tattoo_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
tattovalue = args[2].value.pdb_int;
@ -994,7 +994,7 @@ path_get_locked_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
@ -1070,7 +1070,7 @@ path_set_locked_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
lockstatus = args[2].value.pdb_int;
@ -1143,7 +1143,7 @@ path_to_selection_invoker (Gimp *gimp,
success = FALSE;
name = (gchar *) args[1].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
op = args[2].value.pdb_int;

View File

@ -58,11 +58,11 @@ patterns_popup_invoker (Gimp *gimp,
ProcRecord *proc;
pattern_callback = (gchar *) args[0].value.pdb_pointer;
if (pattern_callback == NULL)
if (pattern_callback == NULL || !g_utf8_validate (pattern_callback, -1, NULL))
success = FALSE;
popup_title = (gchar *) args[1].value.pdb_pointer;
if (popup_title == NULL)
if (popup_title == NULL || !g_utf8_validate (popup_title, -1, NULL))
success = FALSE;
initial_pattern = (gchar *) args[2].value.pdb_pointer;
@ -130,7 +130,7 @@ patterns_close_popup_invoker (Gimp *gimp,
PatternSelect *pattern_select;
pattern_callback = (gchar *) args[0].value.pdb_pointer;
if (pattern_callback == NULL)
if (pattern_callback == NULL || !g_utf8_validate (pattern_callback, -1, NULL))
success = FALSE;
if (success)
@ -186,11 +186,11 @@ patterns_set_popup_invoker (Gimp *gimp,
PatternSelect *pattern_select;
pattern_callback = (gchar *) args[0].value.pdb_pointer;
if (pattern_callback == NULL)
if (pattern_callback == NULL || !g_utf8_validate (pattern_callback, -1, NULL))
success = FALSE;
pattern_name = (gchar *) args[1].value.pdb_pointer;
if (pattern_name == NULL)
if (pattern_name == NULL || !g_utf8_validate (pattern_name, -1, NULL))
success = FALSE;
if (success)

View File

@ -205,7 +205,7 @@ patterns_set_pattern_invoker (Gimp *gimp,
GimpPattern *pattern;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)
@ -259,7 +259,7 @@ patterns_get_pattern_data_invoker (Gimp *gimp,
GimpPattern *pattern = NULL;
name = (gchar *) args[0].value.pdb_pointer;
if (name == NULL)
if (name == NULL || !g_utf8_validate (name, -1, NULL))
success = FALSE;
if (success)

View File

@ -416,7 +416,7 @@ plugin_domain_register_invoker (Gimp *gimp,
gchar *domain_path;
domain_name = (gchar *) args[0].value.pdb_pointer;
if (domain_name == NULL)
if (domain_name == NULL || !g_utf8_validate (domain_name, -1, NULL))
success = FALSE;
domain_path = (gchar *) args[1].value.pdb_pointer;

View File

@ -480,7 +480,7 @@ procedural_db_proc_info_invoker (Gimp *gimp,
ProcRecord *proc = NULL;
proc_name = (gchar *) args[0].value.pdb_pointer;
if (proc_name == NULL)
if (proc_name == NULL || !g_utf8_validate (proc_name, -1, NULL))
success = FALSE;
if (success)
@ -584,7 +584,7 @@ procedural_db_proc_arg_invoker (Gimp *gimp,
ProcArg *arg = NULL;
proc_name = (gchar *) args[0].value.pdb_pointer;
if (proc_name == NULL)
if (proc_name == NULL || !g_utf8_validate (proc_name, -1, NULL))
success = FALSE;
arg_num = args[1].value.pdb_int;
@ -671,7 +671,7 @@ procedural_db_proc_val_invoker (Gimp *gimp,
ProcArg *val = NULL;
proc_name = (gchar *) args[0].value.pdb_pointer;
if (proc_name == NULL)
if (proc_name == NULL || !g_utf8_validate (proc_name, -1, NULL))
success = FALSE;
val_num = args[1].value.pdb_int;
@ -758,7 +758,7 @@ procedural_db_get_data_invoker (Gimp *gimp,
const guint8 *data;
identifier = (gchar *) args[0].value.pdb_pointer;
if (identifier == NULL)
if (identifier == NULL || !g_utf8_validate (identifier, -1, NULL))
success = FALSE;
if (success)
@ -831,7 +831,7 @@ procedural_db_get_data_size_invoker (Gimp *gimp,
const guint8 *data;
identifier = (gchar *) args[0].value.pdb_pointer;
if (identifier == NULL)
if (identifier == NULL || !g_utf8_validate (identifier, -1, NULL))
success = FALSE;
if (success)
@ -892,7 +892,7 @@ procedural_db_set_data_invoker (Gimp *gimp,
guint8 *data;
identifier = (gchar *) args[0].value.pdb_pointer;
if (identifier == NULL)
if (identifier == NULL || !g_utf8_validate (identifier, -1, NULL))
success = FALSE;
bytes = args[1].value.pdb_int;

View File

@ -99,7 +99,7 @@ text_fontname_invoker (Gimp *gimp,
success = FALSE;
fontname = (gchar *) args[9].value.pdb_pointer;
if (fontname == NULL)
if (fontname == NULL || !g_utf8_validate (fontname, -1, NULL))
success = FALSE;
if (success)
@ -230,7 +230,7 @@ text_get_extents_fontname_invoker (Gimp *gimp,
success = FALSE;
fontname = (gchar *) args[3].value.pdb_pointer;
if (fontname == NULL)
if (fontname == NULL || !g_utf8_validate (fontname, -1, NULL))
success = FALSE;
if (success)

View File

@ -152,7 +152,7 @@ unit_new_invoker (Gimp *gimp,
GimpUnit unit = 0;
identifier = (gchar *) args[0].value.pdb_pointer;
if (identifier == NULL)
if (identifier == NULL || !g_utf8_validate (identifier, -1, NULL))
success = FALSE;
factor = args[1].value.pdb_float;
@ -160,19 +160,19 @@ unit_new_invoker (Gimp *gimp,
digits = args[2].value.pdb_int;
symbol = (gchar *) args[3].value.pdb_pointer;
if (symbol == NULL)
if (symbol == NULL || !g_utf8_validate (symbol, -1, NULL))
success = FALSE;
abbreviation = (gchar *) args[4].value.pdb_pointer;
if (abbreviation == NULL)
if (abbreviation == NULL || !g_utf8_validate (abbreviation, -1, NULL))
success = FALSE;
singular = (gchar *) args[5].value.pdb_pointer;
if (singular == NULL)
if (singular == NULL || !g_utf8_validate (singular, -1, NULL))
success = FALSE;
plural = (gchar *) args[6].value.pdb_pointer;
if (plural == NULL)
if (plural == NULL || !g_utf8_validate (plural, -1, NULL))
success = FALSE;
if (success)

View File

@ -43,13 +43,13 @@ sub brushes_popup {
@inargs = (
{ name => 'brush_callback', type => 'string',
desc => 'The callback PDB proc to call when brush selection is
made' },
desc => 'The callback PDB proc to call when brush selection is made',
utf8 => 1 },
{ name => 'popup_title', type => 'string',
desc => 'Title to give the brush popup window' },
desc => 'Title to give the brush popup window', utf8 => 1 },
{ name => 'initial_brush', type => 'string',
desc => 'The name of the brush to set as the first selected',
no_success => 1 },
no_success => 1, utf8 => 1 },
&brush_args
);
@ -85,7 +85,8 @@ sub brushes_close_popup {
@inargs = (
{ name => 'brush_callback', type => 'string',
desc => 'The name of the callback registered for this popup' }
desc => 'The name of the callback registered for this popup',
utf8 => 1 }
);
%invoke = (
@ -116,9 +117,10 @@ sub brushes_set_popup {
@inargs = (
{ name => 'brush_callback', type => 'string',
desc => 'The name of the callback registered for this popup' },
desc => 'The name of the callback registered for this popup',
utf8 => 1 },
{ name => 'brush_name', type => 'string',
desc => 'The name of the brush to set as selected' },
desc => 'The name of the brush to set as selected', utf8 => 1 },
&brush_args
);

View File

@ -20,7 +20,8 @@
sub brush_arg () {{
name => 'name',
type => 'string',
desc => 'The brush name'
desc => 'The brush name',
utf8 => 1
}}
sub dim_args () {

View File

@ -88,6 +88,10 @@ sub channel_set_prop_proc {
$inargs[1]->{desc} .= ' (%%desc%%)';
}
if ($type =~ /string/) {
$inargs[1]->{utf8} = 1;
}
$invoke{code} = $undo ? "gimp_${core_type}_set_$prop ($core_var, $prop, TRUE);"
: "gimp_${core_type}_set_$prop ($core_var, $prop);";
@ -152,7 +156,7 @@ HELP
{ name => 'height', type => '0 < int32',
desc => 'The channel height: (%%desc%%)' },
{ name => 'name', type => 'string',
desc => 'The channel name' },
desc => 'The channel name', utf8 => 1 },
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The channel opacity: (%%desc%%)' },
{ name => 'color', type => 'color',

View File

@ -99,7 +99,7 @@ HELP
{ name => 'palette', type => 'string',
desc => 'The name of the custom palette to use, ignored unless
(palette_type == GIMP_CUSTOM_PALETTE)',
alias => 'palette_name' }
alias => 'palette_name', utf8 => 1 }
);
%invoke = (

View File

@ -489,7 +489,6 @@ HELP
$outargs[0]->{void_ret} = 1;
%invoke = (
headers => [ qw(<string.h> "core/gimplayer.h") ],
code => <<'CODE'
{
TempBuf * buf;
@ -562,10 +561,10 @@ CODE
);
}
@headers = qw("core/gimp.h" "core/gimplayermask.h" "core/gimpchannel.h"
"core/gimpdrawable.h" "core/gimpdrawable-offset.h"
"base/tile.h" "base/tile-manager.h" "base/temp-buf.h"
"gimp-intl.h");
@headers = qw("core/gimp.h" "core/gimplayer.h" "core/gimplayermask.h"
"core/gimpchannel.h" "core/gimpdrawable.h"
"core/gimpdrawable-offset.h" "base/tile.h" "base/tile-manager.h"
"base/temp-buf.h" "gimp-intl.h");
@procs = qw(drawable_merge_shadow drawable_fill drawable_update
drawable_mask_bounds drawable_image drawable_type

View File

@ -39,7 +39,7 @@ sub handler_args {
push @inargs, { name => 'procedure_name', type => 'string',
desc => "The name of the procedure to be used for $action",
alias => 'name' };
alias => 'name', utf8 => 1 };
foreach ([ 'extensions', 'jpg,jpeg' ], [ 'prefixes', 'http:,ftp:' ]) {
&list_arg($type, $_->[0], @$_);
@ -160,7 +160,7 @@ HELP
{
new_args[i].arg_type = proc->args[i].arg_type;
if (proc->args[i].arg_type == GIMP_PDB_STRING)
new_args[i].value.pdb_pointer = g_strdup("\0");
new_args[i].value.pdb_pointer = g_strdup ("");
}
return_vals = %%exec%%;

View File

@ -32,13 +32,13 @@ sub fonts_popup {
@inargs = (
{ name => 'font_callback', type => 'string',
desc => 'The callback PDB proc to call when font selection is
made' },
desc => 'The callback PDB proc to call when font selection is made',
utf8 => 1 },
{ name => 'popup_title', type => 'string',
desc => 'Title to give the font popup window' },
desc => 'Title to give the font popup window', utf8 => 1 },
{ name => 'initial_font', type => 'string',
desc => 'The name of the font to set as the first selected',
no_success => 1 }
no_success => 1, utf8 => 1 }
);
%invoke = (
@ -68,7 +68,8 @@ sub fonts_close_popup {
@inargs = (
{ name => 'font_callback', type => 'string',
desc => 'The name of the callback registered for this popup' }
desc => 'The name of the callback registered for this popup',
utf8 => 1 }
);
%invoke = (
@ -99,9 +100,10 @@ sub fonts_set_popup {
@inargs = (
{ name => 'font_callback', type => 'string',
desc => 'The name of the callback registered for this popup' },
desc => 'The name of the callback registered for this popup',
utf8 => 1 },
{ name => 'font_name', type => 'string',
desc => 'The name of the font to set as selected' }
desc => 'The name of the font to set as selected', utf8 => 1 }
);
%invoke = (

View File

@ -42,7 +42,7 @@ HELP
@inargs = (
{ name => 'token', type => 'string',
desc => 'The token to query for' }
desc => 'The token to query for', utf8 => 1 }
);
@outargs = (
@ -82,7 +82,7 @@ HELP
@inargs = (
{ name => 'token', type => 'string',
desc => 'The token to modify' },
desc => 'The token to modify', utf8 => 1 },
{ name => 'value', type => 'string',
desc => 'The value to set the token to' }
);

View File

@ -41,12 +41,12 @@ sub gradients_popup {
@inargs = (
{ name => 'gradient_callback', type => 'string',
desc => 'The callback PDB proc to call when gradient selection is
made' },
made', utf8 => 1 },
{ name => 'popup_title', type => 'string',
desc => 'Title to give the gradient popup window' },
desc => 'Title to give the gradient popup window', utf8 => 1 },
{ name => 'initial_gradient', type => 'string',
desc => 'The name of the pattern to set as the first selected',
no_success => 1 },
no_success => 1, utf8 => 1 },
&sample_size_arg
);
@ -80,7 +80,8 @@ sub gradients_close_popup {
@inargs = (
{ name => 'gradient_callback', type => 'string',
desc => 'The name of the callback registered for this popup' }
desc => 'The name of the callback registered for this popup',
utf8 => 1 }
);
%invoke = (
@ -111,9 +112,10 @@ sub gradients_set_popup {
@inargs = (
{ name => 'gradient_callback', type => 'string',
desc => 'The name of the callback registered for this popup' },
desc => 'The name of the callback registered for this popup',
utf8 => 1 },
{ name => 'gradient_name', type => 'string',
desc => 'The name of the gradient to set as selected' }
desc => 'The name of the gradient to set as selected', utf8 => 1 }
);
%invoke = (

View File

@ -118,7 +118,7 @@ HELP
@inargs = (
{ name => 'name', type => 'string',
desc => 'The name of the gradient to set' }
desc => 'The name of the gradient to set', utf8 => 1 }
);
%invoke = (
@ -284,7 +284,8 @@ HELP
@inargs = (
{ name => 'name', type => 'string',
desc => 'The gradient name ("" means current active gradient)' },
desc => 'The gradient name ("" means current active gradient)',
utf8 => 1 },
&sample_size_arg,
&reverse_arg
);

View File

@ -166,6 +166,10 @@ sub layer_set_prop_proc {
$inargs[1]->{desc} .= ' (%%desc%%)';
}
if ($type =~ /string/) {
$inargs[1]->{utf8} = 1;
}
$invoke{code} = $undo ? "gimp_${core_type}_set_$prop ($core_var, $prop, TRUE);"
: "gimp_${core_type}_set_$prop ($core_var, $prop);";
@ -237,7 +241,7 @@ HELP
{ name => 'type', type => 'enum GimpImageType',
desc => 'The layer type: { %%desc%% }' },
{ name => 'name', type => 'string',
desc => 'The layer name', no_success => 1 },
desc => 'The layer name', no_success => 1, utf8 => 1 },
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The layer opacity: (%%desc%%)' },
{ name => 'mode', type => 'enum GimpLayerModeEffects',

View File

@ -34,17 +34,11 @@ HELP
@inargs = (
{ name => 'message', type => 'string', const => 1,
desc => 'Message to display in the dialog' }
desc => 'Message to display in the dialog', utf8 => 1 }
);
%invoke = ( code => <<CODE
{
if (! g_utf8_validate (message, -1, NULL))
{
g_warning ("Strings passed to g_message() must be in UTF-8 encoding.");
success = FALSE;
}
else
%invoke = (
code => <<CODE
{
gchar *domain = NULL;
@ -55,7 +49,6 @@ HELP
g_free (domain);
}
}
CODE
);
}

View File

@ -21,12 +21,6 @@ sub color_blurb {
$blurb = "@{[shift]} the current GIMP @{[shift]}ground color.";
}
sub palette_arg () {{
name => 'name',
type => 'string',
desc => 'The palette name'
}}
sub color_arg {
my $ground = (shift) . "ground";
{

View File

@ -33,12 +33,12 @@ sub palettes_popup {
@inargs = (
{ name => 'palette_callback', type => 'string',
desc => 'The callback PDB proc to call when palette selection is
made' },
made', utf8 => 1 },
{ name => 'popup_title', type => 'string',
desc => 'Title to give the palette popup window' },
desc => 'Title to give the palette popup window', utf8 => 1 },
{ name => 'initial_palette', type => 'string',
desc => 'The name of the palette to set as the first selected',
no_success => 1 },
no_success => 1, utf8 => 1 },
);
%invoke = (
@ -70,7 +70,8 @@ sub palettes_close_popup {
@inargs = (
{ name => 'palette_callback', type => 'string',
desc => 'The name of the callback registered for this popup' }
desc => 'The name of the callback registered for this popup',
utf8 => 1 }
);
%invoke = (
@ -101,9 +102,10 @@ sub palettes_set_popup {
@inargs = (
{ name => 'palette_callback', type => 'string',
desc => 'The name of the callback registered for this popup' },
desc => 'The name of the callback registered for this popup',
utf8 => 1 },
{ name => 'palette_name', type => 'string',
desc => 'The name of the palette to set as selected' },
desc => 'The name of the palette to set as selected', utf8 => 1 },
);
%invoke = (

View File

@ -32,7 +32,8 @@ sub adrian_pdb_misc {
sub palette_arg () {{
name => 'name',
type => 'string',
desc => 'The palette name'
desc => 'The palette name',
utf8 => 1
}}
sub dim_args () {

View File

@ -80,7 +80,8 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'name', type => 'string',
desc => 'the name of the path whose points should be listed' }
desc => 'the name of the path whose points should be listed',
utf8 => 1 }
);
$inargs[0]->{desc} = 'The ID of the image to list the paths from';
@ -193,7 +194,8 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'name', type => 'string',
desc => 'The name of the path to set the current path to' }
desc => 'The name of the path to set the current path to',
utf8 => 1 }
);
$inargs[0]->{desc} = 'The ID of the image to list set the paths in';
@ -228,7 +230,7 @@ HELP
name will be created - query the list of paths if you want
to make sure that the name of the path you create is
unique. This will be set as the current path.',
init => 1 },
init => 1, utf8 => 1 },
{ name => 'ptype', type => 'int32',
desc => 'The type of the path. Currently only one type (1 = Bezier)
is supported' },
@ -411,7 +413,8 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'name', type => 'string',
desc => 'the name of the path whose tattoo should be obtained' }
desc => 'the name of the path whose tattoo should be obtained',
utf8 => 1 }
);
@outargs = (
@ -447,7 +450,7 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'name', type => 'string',
desc => 'the name of the path whose tattoo should be set' },
desc => 'the name of the path whose tattoo should be set', utf8 => 1 },
{ name => 'tattovalue', type => 'int32',
desc => 'The tattoo associated with the name path. Only values returned from \'path_get_tattoo\' should be used here', init => 1 }
);
@ -516,7 +519,7 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'name', type => 'string',
desc => 'The name of the path to delete' }
desc => 'The name of the path to delete', utf8 => 1 }
);
$inargs[0]->{desc} = 'The ID of the image to list delete the paths from';
@ -548,7 +551,8 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'name', type => 'string',
desc => 'the name of the path whose locked status should be obtained'}
desc => 'the name of the path whose locked status should be obtained',
utf8 => 1 }
);
@outargs = (
@ -584,7 +588,8 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'name', type => 'string',
desc => 'the name of the path whose locked status should be set' },
desc => 'the name of the path whose locked status should be set',
utf8 => 1 },
{ name => 'lockstatus', type => 'int32',
desc => 'The lock status associated with the name path. 0 if the path is not locked. 1 if the path is to be locked', init => 1 }
);
@ -619,7 +624,8 @@ HELP
@inargs = (
&std_image_arg,
{ name => 'name', type => 'string',
desc => 'The name of the path which should be made into selection' },
desc => 'The name of the path which should be made into selection',
utf8 => 1 },
{ name => 'op', type => 'enum GimpChannelOps',
desc => 'The desired operation with current selection' },
{ name => 'antialias', type => 'boolean',

View File

@ -32,12 +32,12 @@ sub patterns_popup {
@inargs = (
{ name => 'pattern_callback', type => 'string',
desc => 'The callback PDB proc to call when pattern selection is
made' },
made', utf8 => 1 },
{ name => 'popup_title', type => 'string',
desc => 'Title to give the pattern popup window' },
desc => 'Title to give the pattern popup window', utf8 => 1 },
{ name => 'initial_pattern', type => 'string',
desc => 'The name of the pattern to set as the first selected',
no_success => 1 },
no_success => 1, utf8 => 1 },
);
%invoke = (
@ -69,7 +69,8 @@ sub patterns_close_popup {
@inargs = (
{ name => 'pattern_callback', type => 'string',
desc => 'The name of the callback registered for this popup' }
desc => 'The name of the callback registered for this popup',
utf8 => 1 }
);
%invoke = (
@ -100,9 +101,10 @@ sub patterns_set_popup {
@inargs = (
{ name => 'pattern_callback', type => 'string',
desc => 'The name of the callback registered for this popup' },
desc => 'The name of the callback registered for this popup',
utf8 => 1 },
{ name => 'pattern_name', type => 'string',
desc => 'The name of the pattern to set as selected' },
desc => 'The name of the pattern to set as selected', utf8 => 1 },
);
%invoke = (

View File

@ -20,7 +20,8 @@
sub pattern_arg () {{
name => 'name',
type => 'string',
desc => 'The pattern name'
desc => 'The pattern name',
utf8 => 1
}}
sub dim_args () {

View File

@ -46,7 +46,7 @@ HELP
@inargs = (
{ name => 'message', type => 'string', no_success => 1,
desc => 'Message to use in the progress dialog' },
desc => 'Message to use in the progress dialog', utf8 => 1 },
{ name => 'gdisplay', type => 'int32',
desc => 'GimpDisplay to update progressbar in, or -1 for a seperate
window',
@ -134,7 +134,7 @@ sub plugins_query {
@inargs = (
{ name => 'search_string', type => 'string',
desc => 'If not an empty string then use this as a search pattern',
alias => 'search_str', no_success => 1 }
alias => 'search_str', no_success => 1, utf8 => 1 }
);
@outargs = (
@ -266,7 +266,7 @@ HELP
@inargs = (
{ name => 'domain_name', type => 'string',
desc => 'The name of the textdomain (must be unique).' },
desc => 'The name of the textdomain (must be unique).', utf8 => 1 },
{ name => 'domain_path', type => 'string',
desc => 'The absolute path to the compiled message catalog (may be NULL).',
no_success => 1 },

View File

@ -21,13 +21,15 @@ sub proc_name_arg () {{
name => 'procedure',
type => 'string',
desc => 'The procedure name',
alias => 'proc_name'
alias => 'proc_name',
utf8 => 1
}}
sub data_ident_arg () {{
name => 'identifier',
type => 'string',
desc => 'The identifier associated with data'
desc => 'The identifier associated with data',
utf8 => 1
}}
sub data_bytes_arg () {{

View File

@ -35,7 +35,8 @@ sub text_arg () {{
sub fontname_arg () {{
name => 'fontname',
type => 'string',
desc => 'The name of the font'
desc => 'The name of the font',
utf8 => 1
}}
sub size_args () {(

View File

@ -96,19 +96,19 @@ HELP
@inargs = (
{ name => 'identifier', type => 'string', wrap => 1,
desc => "The new unit's identifier" },
desc => "The new unit's identifier", utf8 => 1 },
{ name => 'factor', type => 'float',
desc => "The new unit's factor" },
{ name => 'digits', type => 'int32',
desc => "The new unit's digits" },
{ name => 'symbol', type => 'string',
desc => "The new unit's symbol" },
desc => "The new unit's symbol", utf8 => 1 },
{ name => 'abbreviation', type => 'string',
desc => "The new unit's abbreviation" },
desc => "The new unit's abbreviation", utf8 => 1 },
{ name => 'singular', type => 'string',
desc => "The new unit's singular form" },
desc => "The new unit's singular form", utf8 => 1 },
{ name => 'plural', type => 'string',
desc => "The new unit's plural form" }
desc => "The new unit's plural form", utf8 => 1 }
);
@outargs = ( &unit_arg );