Migrated the GTK+ basic controls back. It doesn't quite work...

This commit is contained in:
Pietro Gagliardi 2015-04-29 10:36:31 -04:00
parent ec7f461af1
commit ff14f76bad
5 changed files with 8 additions and 4 deletions

View File

@ -3,7 +3,11 @@
osCFILES = \
unix/alloc.c \
unix/bin.c \
unix/button.c \
unix/checkbox.c \
unix/container.c \
unix/entry.c \
unix/label.c \
unix/main.c \
unix/menu.c \
unix/newcontrol.c \

View File

@ -61,7 +61,7 @@ uiButton *uiNewButton(const char *text)
"label", text,
NULL);
b->widget = WIDGET(b);
b->widget = GTK_WIDGET(uiControlHandle(uiControl(b)));
b->button = GTK_BUTTON(b->widget);
g_signal_connect(b->widget, "clicked", G_CALLBACK(onClicked), b);

View File

@ -85,7 +85,7 @@ uiCheckbox *uiNewCheckbox(const char *text)
"label", text,
NULL);
c->widget = WIDGET(c);
c->widget = GTK_WIDGET(uiControlHandle(uiControl(c)));
c->button = GTK_BUTTON(c->widget);
c->toggleButton = GTK_TOGGLE_BUTTON(c->widget);
c->checkButton = GTK_CHECK_BUTTON(c->widget);

View File

@ -38,7 +38,7 @@ uiEntry *uiNewEntry(void)
FALSE, FALSE, onDestroy, e,
NULL);
e->widget = WIDGET(e);
e->widget = GTK_WIDGET(uiControlHandle(uiControl(e)));
e->entry = GTK_ENTRY(e->widget);
uiEntry(e)->Text = entryText;

View File

@ -42,7 +42,7 @@ uiLabel *uiNewLabel(const char *text)
// TODO yalign 0?
NULL);
l->widget = WIDGET(l);
l->widget = GTK_WIDGET(uiControlHandle(uiControl(l)));
l->label = GTK_LABEL(l->widget);
uiLabel(l)->Text = labelText;