More GTK+ work.

This commit is contained in:
Pietro Gagliardi 2015-06-26 18:45:00 -04:00
parent a30db90e91
commit 9f6043153c
5 changed files with 27 additions and 1 deletions

View File

@ -18,6 +18,7 @@ osCFILES = \
unix/separator.c \ unix/separator.c \
unix/slider.c \ unix/slider.c \
unix/spinbox.c \ unix/spinbox.c \
unix/stddialogs.c \
unix/tab.c \ unix/tab.c \
unix/text.c \ unix/text.c \
unix/util.c \ unix/util.c \

View File

@ -150,5 +150,6 @@ uintptr_t uiMakeContainer(uiControl *c)
widget = GTK_WIDGET(g_object_new(containerWidgetType, NULL)); widget = GTK_WIDGET(g_object_new(containerWidgetType, NULL));
uiUnixMakeSingleWidgetControl(c, widget); uiUnixMakeSingleWidgetControl(c, widget);
containerWidget(widget)->c = c;
return (uintptr_t) widget; return (uintptr_t) widget;
} }

View File

@ -149,6 +149,8 @@ static uiMenuItem *newItem(struct menu *m, int type, const char *name)
complain("attempt to create a new menu item after menus have been finalized"); complain("attempt to create a new menu item after menus have been finalized");
item = uiNew(struct menuItem); item = uiNew(struct menuItem);
uiTyped(item)->Type = uiTypeMenuItem();
g_array_append_val(m->items, item); g_array_append_val(m->items, item);
item->type = type; item->type = type;
@ -248,6 +250,8 @@ uiMenu *uiNewMenu(const char *name)
menus = g_array_new(FALSE, TRUE, sizeof (struct menu *)); menus = g_array_new(FALSE, TRUE, sizeof (struct menu *));
m = uiNew(struct menu); m = uiNew(struct menu);
uiTyped(m)->Type = uiTypeMenu();
g_array_append_val(menus, m); g_array_append_val(menus, m);
m->name = g_strdup(name); m->name = g_strdup(name);

20
redo/unix/stddialogs.c Normal file
View File

@ -0,0 +1,20 @@
// 26 june 2015
#include "uipriv_unix.h"
char *uiOpenFile(void)
{
return NULL;
}
char *uiSaveFile(void)
{
return NULL;
}
void uiMsgBox(const char *title, const char *description)
{
}
void uiMsgBoxError(const char *title, const char *description)
{
}

View File

@ -115,7 +115,7 @@ static void windowSetChild(uiWindow *ww, uiControl *child)
uiControlSetParent(w->child, NULL); uiControlSetParent(w->child, NULL);
w->child = child; w->child = child;
if (w->child != NULL) { if (w->child != NULL) {
uiControlSetParent(w->child, uiControl(w)); //TODO uiControlSetParent(w->child, uiControl(w));
uiControlQueueResize(w->child); uiControlQueueResize(w->child);
} }
} }