122 UIWIDGET ui_progressbar_create(UiObject *obj, UiProgressbarArgs args) { |
122 UIWIDGET ui_progressbar_create(UiObject *obj, UiProgressbarArgs args) { |
123 UiObject* current = uic_current_obj(obj); |
123 UiObject* current = uic_current_obj(obj); |
124 |
124 |
125 GtkWidget *progressbar = gtk_progress_bar_new(); |
125 GtkWidget *progressbar = gtk_progress_bar_new(); |
126 |
126 |
127 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.value, args.varname, UI_VAR_STRING); |
127 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.value, args.varname, UI_VAR_DOUBLE); |
128 if(var && var->value) { |
128 if(var && var->value) { |
129 UiDouble *value = var->value; |
129 UiDouble *value = var->value; |
130 value->get = ui_progressbar_get; |
130 value->get = ui_progressbar_get; |
131 value->set = ui_progressbar_set; |
131 value->set = ui_progressbar_set; |
132 value->obj = progressbar; |
132 value->obj = progressbar; |