Branch: Tag:

2005-12-17

2005-12-17 21:21:59 by Marcus Comstedt <marcus@mc.pp.se>

UTF-8 fix.

Rev: src/post_modules/GTK2/source/gtkbutton.pre:1.4
Rev: src/post_modules/GTK2/source/gtkcheckbutton.pre:1.4
Rev: src/post_modules/GTK2/source/gtkframe.pre:1.4
Rev: src/post_modules/GTK2/source/gtklabel.pre:1.4
Rev: src/post_modules/GTK2/source/gtkmenutoolbutton.pre:1.4
Rev: src/post_modules/GTK2/source/gtkradiobutton.pre:1.4
Rev: src/post_modules/GTK2/source/gtktogglebutton.pre:1.4
Rev: src/post_modules/GTK2/source/gtktoolbutton.pre:1.4

35:    struct object *o1;    get_all_args("create",args,"%o%T",&o1,&t);    if (t && o1) { -  if (g_utf8_validate((char *)STR0(t),t->len,NULL)) -  gt=gtk_tool_button_new(GTK_WIDGET(get_gobject(o1)),(char *)STR0(t)); -  else -  Pike_error("Invalid string.\n"); +  ref_push_string(t); +  f_string_to_utf8(1); +  gt=gtk_tool_button_new(GTK_WIDGET(get_gobject(o1)),(char *)STR0(Pike_sp[-1].u.string)); +  pop_stack();    } else    Pike_error("Invalid arguments\n");    THIS->obj=G_OBJECT(gt);