summaryrefslogtreecommitdiff
path: root/new/button_unix.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-04-09 02:56:51 -0400
committerPietro Gagliardi <[email protected]>2015-04-09 02:56:51 -0400
commit723f2af8c621525848a234d88d98b5107cf0d683 (patch)
tree591810eab724fe1f5bd9755555d260734d23c691 /new/button_unix.c
parenta0073727c8991e5dbc17d8f7bf02028159aebd90 (diff)
Implemented the text routines on the GTK+ backend. They work!
Diffstat (limited to 'new/button_unix.c')
-rw-r--r--new/button_unix.c10
1 files changed, 9 insertions, 1 deletions
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)
{