diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-09 18:17:04 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-09 18:17:04 -0400 |
| commit | 22db738dd13fc8a7eae6188698ab82a803b9ec76 (patch) | |
| tree | 92dde89ba29b7c2c77eb7d3c27419098ae22e707 /new/entry_unix.c | |
| parent | 1a525dea313bc78d707b6678f76c7355445d4a87 (diff) | |
Migrated the GTK+ backend to the new uiControl/uiSizing system.
Diffstat (limited to 'new/entry_unix.c')
| -rw-r--r-- | new/entry_unix.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/new/entry_unix.c b/new/entry_unix.c index 04005d3..43caea3 100644 --- a/new/entry_unix.c +++ b/new/entry_unix.c @@ -2,11 +2,8 @@ #include "uipriv_unix.h" struct entry { - uiControl *c; }; -#define E(x) ((struct entry *) (x)) - static void onDestroy(GtkWidget *widget, gpointer data) { struct entry *e = (struct entry *) data; @@ -16,19 +13,21 @@ static void onDestroy(GtkWidget *widget, gpointer data) uiControl *uiNewEntry(void) { + uiControl *c; struct entry *e; GtkWidget *widget; - e = uiNew(struct entry); - - e->c = uiUnixNewControl(GTK_TYPE_ENTRY, - FALSE, FALSE, e, + c = uiUnixNewControl(GTK_TYPE_ENTRY, + FALSE, FALSE, NULL); - widget = GTK_WIDGET(uiControlHandle(e->c)); + widget = GTK_WIDGET(uiControlHandle(c)); + + e = uiNew(struct entry); g_signal_connect(widget, "destroy", G_CALLBACK(onDestroy), e); + c->data = e; - return e->c; + return c; } char *uiEntryText(uiControl *c) |
