From 723f2af8c621525848a234d88d98b5107cf0d683 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 9 Apr 2015 02:56:51 -0400 Subject: Implemented the text routines on the GTK+ backend. They work! --- new/button_unix.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'new/button_unix.c') diff --git a/new/button_unix.c b/new/button_unix.c index a39bdf5..c458e68 100644 --- a/new/button_unix.c +++ b/new/button_unix.c @@ -47,7 +47,15 @@ uiControl *uiNewButton(const char *text) return b->c; } -// TODO text +char *uiButtonText(uiControl *c) +{ + return g_strdup(gtk_button_get_label(GTK_BUTTON(uiControlHandle(c)))); +} + +void uiButtonSetText(uiControl *c, const char *text) +{ + gtk_button_set_label(GTK_BUTTON(uiControlHandle(c)), text); +} void uiButtonOnClicked(uiControl *c, void (*f)(uiControl *, void *), void *data) { -- cgit v1.2.3