ui/gtk/text.c

changeset 45
ab71409644b0
parent 44
473954dc6b74
equal deleted inserted replaced
44:473954dc6b74 45:ab71409644b0
540 540
541 541
542 542
543 static UIWIDGET create_textfield(UiObject *obj, UiBool frameless, UiBool password, UiTextFieldArgs args) { 543 static UIWIDGET create_textfield(UiObject *obj, UiBool frameless, UiBool password, UiTextFieldArgs args) {
544 GtkWidget *textfield = gtk_entry_new(); 544 GtkWidget *textfield = gtk_entry_new();
545 ui_set_name_and_style(textfield, args.name, args.style_class);
545 546
546 UiObject* current = uic_current_obj(obj); 547 UiObject* current = uic_current_obj(obj);
547 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.value, args.varname, UI_VAR_STRING); 548 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.value, args.varname, UI_VAR_STRING);
548 549
549 UiTextField *uitext = malloc(sizeof(UiTextField)); 550 UiTextField *uitext = malloc(sizeof(UiTextField));
698 } 699 }
699 free(elms); 700 free(elms);
700 } 701 }
701 702
702 static void ui_path_textfield_destroy(GtkWidget *object, UiPathTextField *pathtf) { 703 static void ui_path_textfield_destroy(GtkWidget *object, UiPathTextField *pathtf) {
703 free(pathtf->hbox);
704 g_object_unref(pathtf->entry); 704 g_object_unref(pathtf->entry);
705 free(pathtf); 705 free(pathtf);
706 } 706 }
707 707
708 void ui_path_button_clicked(GtkWidget *widget, UiEventData *event) { 708 void ui_path_button_clicked(GtkWidget *widget, UiEventData *event) {

mercurial