Fixed build issues; now to fix runtime bugs.
This commit is contained in:
parent
18f23a2ef5
commit
89b47316f9
|
@ -103,7 +103,7 @@ void uiMenuItemEnable(uiMenuItem *item)
|
||||||
menuItemEnableDisable(item, TRUE);
|
menuItemEnableDisable(item, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menuItemDisable(uiMenuItem *item)
|
void uiMenuItemDisable(uiMenuItem *item)
|
||||||
{
|
{
|
||||||
menuItemEnableDisable(item, FALSE);
|
menuItemEnableDisable(item, FALSE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
// on GTK+ a uiRadioButtons is a GtkBox with each of the GtkRadioButtons as children
|
// on GTK+ a uiRadioButtons is a GtkBox with each of the GtkRadioButtons as children
|
||||||
|
|
||||||
struct radiobuttons {
|
struct uiRadioButtons {
|
||||||
uiUnixControl c;
|
uiUnixControl c;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkContainer *container;
|
GtkContainer *container;
|
||||||
|
@ -24,7 +24,7 @@ static void onDestroy(uiRadioButtons *r)
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
void uiRadiobuttonsAppend(uiRadioButtons *r, const char *text)
|
void uiRadioButtonsAppend(uiRadioButtons *r, const char *text)
|
||||||
{
|
{
|
||||||
GtkWidget *rb;
|
GtkWidget *rb;
|
||||||
GtkRadioButton *previous;
|
GtkRadioButton *previous;
|
||||||
|
|
|
@ -73,7 +73,7 @@ void uiTabDelete(uiTab *t, uintmax_t n)
|
||||||
// make sure the page's control isn't destroyed
|
// make sure the page's control isn't destroyed
|
||||||
uiControlSetParent(page->c, NULL);
|
uiControlSetParent(page->c, NULL);
|
||||||
gtk_container_remove(GTK_CONTAINER(page->box),
|
gtk_container_remove(GTK_CONTAINER(page->box),
|
||||||
GTK+WIDGET(uiControlHandle(page->c)));
|
GTK_WIDGET(uiControlHandle(page->c)));
|
||||||
|
|
||||||
// this will also remove the tab
|
// this will also remove the tab
|
||||||
gtk_widget_destroy(page->box);
|
gtk_widget_destroy(page->box);
|
||||||
|
|
|
@ -14,7 +14,7 @@ void complain(const char *fmt, ...)
|
||||||
|
|
||||||
void setMargined(GtkContainer *c, int margined)
|
void setMargined(GtkContainer *c, int margined)
|
||||||
{
|
{
|
||||||
if (b->margined)
|
if (margined)
|
||||||
gtk_container_set_border_width(c, gtkXMargin);
|
gtk_container_set_border_width(c, gtkXMargin);
|
||||||
else
|
else
|
||||||
gtk_container_set_border_width(c, 0);
|
gtk_container_set_border_width(c, 0);
|
||||||
|
|
|
@ -15,6 +15,8 @@ struct uiWindow {
|
||||||
GtkWidget *menubar;
|
GtkWidget *menubar;
|
||||||
|
|
||||||
uiControl *child;
|
uiControl *child;
|
||||||
|
GtkWidget *childbox;
|
||||||
|
int margined;
|
||||||
|
|
||||||
int (*onClosing)(uiWindow *, void *);
|
int (*onClosing)(uiWindow *, void *);
|
||||||
void *onClosingData;
|
void *onClosingData;
|
||||||
|
@ -49,10 +51,8 @@ static void onDestroy(uiWindow *w)
|
||||||
// first hide ourselves
|
// first hide ourselves
|
||||||
gtk_widget_hide(w->widget);
|
gtk_widget_hide(w->widget);
|
||||||
// now destroy the child
|
// now destroy the child
|
||||||
binSetChild(w->bin, NULL);
|
uiControlSetParent(w->child, NULL);
|
||||||
uiControlDestroy(w->child);
|
uiControlDestroy(w->child);
|
||||||
// and destroy the bin
|
|
||||||
uiControlDestroy(w->bin);
|
|
||||||
// now destroy the menus, if any
|
// now destroy the menus, if any
|
||||||
if (w->menubar != NULL)
|
if (w->menubar != NULL)
|
||||||
freeMenubar(w->menubar);
|
freeMenubar(w->menubar);
|
||||||
|
|
Loading…
Reference in New Issue