pike.git / src / post_modules / GTK2 / source / gtktoolbutton.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gtktoolbutton.pre:28:    if (Pike_sp[-args].type==PIKE_T_STRING) {    char *icon;    get_all_args("create",args,"%s",&icon);    gt=gtk_tool_button_new_from_stock(icon);    THIS->obj=G_OBJECT(gt);    } else if (Pike_sp[-args].type==PIKE_T_OBJECT) {    struct pike_string *t;    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);    } else {    INIT_WITH_PROPS(GTK_TYPE_TOOL_BUTTON);    }    my_pop_n_elems(args);    }    pgtk__init_this_object();   }