Commit db2db08f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

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.
parent 58311491
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
......@@ -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;
......
......@@ -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)
......
......@@ -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)
......
......@@ -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)
......
......@@ -20,7 +20,6 @@
#include "config.h"
#include <string.h>
#include <glib-object.h>
......
......@@ -172,12 +172,12 @@ file_save_invoker (Gimp *gimp,
memset (new_args, 0, sizeof (Argument) * proc->num_args);
memcpy (new_args, args, sizeof (Argument) * 5);
for (i=5; i<proc->num_args; i++)
{
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");
}
for (i = 5; i < proc->num_args; i++)
{
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 ("");
}
return_vals = procedural_db_execute (gimp, proc->name, new_args);
g_free (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;
......
......@@ -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)
......
......@@ -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;
......
......@@ -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)
......
......@@ -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;
......
......@@ -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)
......
......@@ -53,27 +53,19 @@ 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;
gchar *domain = NULL;
if (gimp->current_plug_in)
domain = plug_in_get_undo_desc (gimp->current_plug_in);
if (gimp->current_plug_in)
domain = plug_in_get_undo_desc (gimp->current_plug_in);
gimp_message (gimp, domain, message);
gimp_message (gimp, domain, message);
g_free (domain);
}
g_free (domain);
}
return procedural_db_return_args (&message_proc, success);
......
......@@ -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)
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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)
......
......@@ -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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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)
......
......@@ -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
);
......
......@@ -20,7 +20,8 @@
sub brush_arg () {{
name => 'name',
type => 'string',
desc => 'The brush name'
desc => 'The brush name',
utf8 => 1
}}
sub dim_args () {
......
......@@ -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);";