Fixed some compiler issues. Oops, forgot to migrate menu.c.
This commit is contained in:
parent
1a24465cc9
commit
cee974f4fc
|
@ -52,7 +52,7 @@ static void boxContainerUpdateState(uiControl *c)
|
|||
|
||||
for (i = 0; i < b->controls->len; i++) {
|
||||
bc = ptrArrayIndex(b->controls, struct boxControl *, i);
|
||||
uiControlUpdateState(bc->c);
|
||||
controlUpdateState(bc->c);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ static uiBox *finishNewBox(GtkOrientation orientation)
|
|||
{
|
||||
uiBox *b;
|
||||
|
||||
b = (uiBox *) uiNewControl(uiTypeBox());
|
||||
b = (uiBox *) uiNewControl(uiBoxType());
|
||||
|
||||
b->widget = gtk_box_new(orientation, 0);
|
||||
b->container = GTK_CONTAINER(b->widget);
|
||||
|
@ -135,8 +135,6 @@ static uiBox *finishNewBox(GtkOrientation orientation)
|
|||
|
||||
b->controls = newPtrArray();
|
||||
|
||||
uiUnixMakeSingleWidgetControl(uiControl(b), b->widget);
|
||||
|
||||
uiUnixFinishNewControl(b, uiBox);
|
||||
uiControl(b)->ContainerUpdateState = boxContainerUpdateState;
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ uiButton *uiNewButton(const char *text)
|
|||
{
|
||||
uiButton *b;
|
||||
|
||||
b = (uiButton *) uiNewControl(uiTypeButton());
|
||||
b = (uiButton *) uiNewControl(uiButtonType());
|
||||
|
||||
b->widget = gtk_button_new_with_label(text);
|
||||
b->button = GTK_BUTTON(b->widget);
|
||||
|
|
|
@ -69,7 +69,7 @@ uiCheckbox *uiNewCheckbox(const char *text)
|
|||
{
|
||||
uiCheckbox *c;
|
||||
|
||||
c = (uiCheckbox *) uiNewControl(uiTypeCheckbox());
|
||||
c = (uiCheckbox *) uiNewControl(uiCheckboxType());
|
||||
|
||||
c->widget = gtk_check_button_new_with_label(text);
|
||||
c->button = GTK_BUTTON(c->widget);
|
||||
|
|
|
@ -22,7 +22,7 @@ static uiCombobox *finishNewCombobox(GtkWidget *(*newfunc)(void))
|
|||
{
|
||||
uiCombobox *c;
|
||||
|
||||
c = (uiCombobox *) uiNewControl(uiTypeCombobox());
|
||||
c = (uiCombobox *) uiNewControl(uiComboboxType());
|
||||
|
||||
c->widget = (*newfunc)();
|
||||
c->combobox = GTK_COMBO_BOX(c->widget);
|
||||
|
|
|
@ -23,7 +23,7 @@ uiDateTimePicker *finishNewDateTimePicker(OSTHING OSARG)
|
|||
{
|
||||
uiDateTimePicker *d;
|
||||
|
||||
d = (uiDateTimePicker *) uiNewControl(uiTypeDateTimePicker());
|
||||
d = (uiDateTimePicker *) uiNewControl(uiDateTimePickerType());
|
||||
|
||||
d->widget = gtk_label_new("TODO uiDateTimePicker not implemented");
|
||||
|
||||
|
|
|
@ -67,14 +67,14 @@ uiEntry *uiNewEntry(void)
|
|||
{
|
||||
uiEntry *e;
|
||||
|
||||
e = (uiEntry *) uiNewControl(uiTypeEntry());
|
||||
e = (uiEntry *) uiNewControl(uiEntryType());
|
||||
|
||||
e->widget = gtk_entry_new();
|
||||
e->entry = GTK_ENTRY(e->widget);
|
||||
e->editable = GTK_EDITABLE(e->widget);
|
||||
|
||||
e->onChangedSignal = g_signal_connect(e->widget, "changed", G_CALLBACK(onChanged), e);
|
||||
uiEntryOnChanged(e->onChanged, defaultOnChanged, NULL);
|
||||
uiEntryOnChanged(e, defaultOnChanged, NULL);
|
||||
|
||||
uiUnixFinishNewControl(e, uiEntry);
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ static void groupContainerUpdateState(uiControl *c)
|
|||
uiGroup *g = uiGroup(c);
|
||||
|
||||
if (g->child != NULL)
|
||||
uiControlUpdateState(g->child);
|
||||
controlUpdateState(g->child);
|
||||
}
|
||||
|
||||
char *uiGroupTitle(uiGroup *g)
|
||||
|
@ -53,17 +53,15 @@ void uiGroupSetTitle(uiGroup *g, const char *text)
|
|||
|
||||
void uiGroupSetChild(uiGroup *g, uiControl *child)
|
||||
{
|
||||
struct group *g = (struct group *) gg;
|
||||
|
||||
if (g->child != NULL) {
|
||||
gtk_container_remove(GTK_CONTAINER(g->bin),
|
||||
gtk_container_remove(GTK_CONTAINER(g->box),
|
||||
GTK_WIDGET(uiControlHandle(g->child)));
|
||||
uiControlSetParent(g->child, NULL);
|
||||
}
|
||||
g->child = child;
|
||||
if (g->child != NULL) {
|
||||
uiControlSetParent(g->child, uiControl(g));
|
||||
gtk_container_add(GTK_CONTAINER(g->bin),
|
||||
gtk_container_add(GTK_CONTAINER(g->box),
|
||||
GTK_WIDGET(uiControlHandle(g->child)));
|
||||
uiControlQueueResize(g->child);
|
||||
}
|
||||
|
@ -89,7 +87,7 @@ uiGroup *uiNewGroup(const char *text)
|
|||
PangoAttribute *bold;
|
||||
PangoAttrList *boldlist;
|
||||
|
||||
g = (uiGroup *) uiNewControl(uiTypeGroup());
|
||||
g = (uiGroup *) uiNewControl(uiGroupType());
|
||||
|
||||
g->widget = gtk_frame_new(text);
|
||||
g->container = GTK_CONTAINER(g->widget);
|
||||
|
|
|
@ -29,7 +29,7 @@ uiLabel *uiNewLabel(const char *text)
|
|||
{
|
||||
uiLabel *l;
|
||||
|
||||
l = (uiLabel *) uiNewControl(uiTypeLabel());
|
||||
l = (uiLabel *) uiNewControl(uiLabelType());
|
||||
|
||||
l->widget = gtk_label_new(text);
|
||||
l->misc = GTK_MISC(l->widget);
|
||||
|
|
|
@ -149,7 +149,7 @@ static uiMenuItem *newItem(struct menu *m, int type, const char *name)
|
|||
complain("attempt to create a new menu item after menus have been finalized");
|
||||
|
||||
item = uiNew(struct menuItem);
|
||||
uiTyped(item)->Type = uiTypeMenuItem();
|
||||
uiTyped(item)->Type = uiMenuItemType();
|
||||
|
||||
g_array_append_val(m->items, item);
|
||||
|
||||
|
@ -250,7 +250,7 @@ uiMenu *uiNewMenu(const char *name)
|
|||
menus = g_array_new(FALSE, TRUE, sizeof (struct menu *));
|
||||
|
||||
m = uiNew(struct menu);
|
||||
uiTyped(m)->Type = uiTypeMenu();
|
||||
uiTyped(m)->Type = uiMenuType();
|
||||
|
||||
g_array_append_val(menus, m);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ uiProgressBar *uiNewProgressBar(void)
|
|||
{
|
||||
uiProgressBar *p;
|
||||
|
||||
p = (uiProgressBar *) uiNewControl(uiTypeProgressBar());
|
||||
p = (uiProgressBar *) uiNewControl(uiProgressBarType());
|
||||
|
||||
p->widget = gtk_progress_bar_new();
|
||||
p->pbar = GTK_PROGRESS_BAR(p->widget);
|
||||
|
|
|
@ -43,7 +43,7 @@ uiRadioButtons *uiNewRadioButtons(void)
|
|||
{
|
||||
uiRadioButtons *r;
|
||||
|
||||
r = (uiRadioButtons *) uiNewControl(uiTypeRadioButtons());
|
||||
r = (uiRadioButtons *) uiNewControl(uiRadioButtonsType());
|
||||
|
||||
r->widget = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
|
||||
r->container = GTK_CONTAINER(r->widget);
|
||||
|
|
|
@ -16,7 +16,7 @@ uiSeparator *uiNewHorizontalSeparator(void)
|
|||
{
|
||||
uiSeparator *s;
|
||||
|
||||
s = (uiSeparator *) uiNewControl(uiTypeSeparator());
|
||||
s = (uiSeparator *) uiNewControl(uiSeparatorType());
|
||||
|
||||
s->widget = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
|
||||
s->separator = GTK_SEPARATOR(s->widget);
|
||||
|
|
|
@ -51,7 +51,7 @@ uiSlider *uiNewSlider(intmax_t min, intmax_t max)
|
|||
{
|
||||
uiSlider *s;
|
||||
|
||||
s = (uiSlider *) uiNewControl(uiTypeSlider());
|
||||
s = (uiSlider *) uiNewControl(uiSliderType());
|
||||
|
||||
s->widget = gtk_scale_new_with_range(GTK_ORIENTATION_HORIZONTAL, min, max, 1);
|
||||
s->range = GTK_RANGE(s->widget);
|
||||
|
|
|
@ -55,7 +55,7 @@ uiSpinbox *uiNewSpinbox(intmax_t min, intmax_t max)
|
|||
if (min >= max)
|
||||
complain("error: min >= max in uiNewSpinbox()");
|
||||
|
||||
s = (uiSpinbox *) uiNewControl(uiTypeSpinbox());
|
||||
s = (uiSpinbox *) uiNewControl(uiSpinboxType());
|
||||
|
||||
s->widget = gtk_spin_button_new_with_range(min, max, 1);
|
||||
s->entry = GTK_ENTRY(s->widget);
|
||||
|
|
|
@ -107,7 +107,7 @@ uiTab *uiNewTab(void)
|
|||
{
|
||||
uiTab *t;
|
||||
|
||||
t = (uiTab *) uiNewControl(uiTypeTab());
|
||||
t = (uiTab *) uiNewControl(uiTabType());
|
||||
|
||||
t->widget = gtk_notebook_new();
|
||||
t->container = GTK_CONTAINER(t->widget);
|
||||
|
|
|
@ -74,7 +74,7 @@ static void windowContainerUpdateState(uiControl *c)
|
|||
uiWindow *w = uiWindow(c);
|
||||
|
||||
if (w->child != NULL)
|
||||
uiControlUpdateState(w->child);
|
||||
controlUpdateState(w->child);
|
||||
}
|
||||
|
||||
char *uiWindowTitle(uiWindow *w)
|
||||
|
@ -124,7 +124,7 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
|
|||
{
|
||||
uiWindow *w;
|
||||
|
||||
w = (uiWindow *) uiNewControl(uiTypeWindow());
|
||||
w = (uiWindow *) uiNewControl(uiWindowType());
|
||||
|
||||
w->widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
w->container = GTK_CONTAINER(w->widget);
|
||||
|
|
Loading…
Reference in New Issue