summaryrefslogtreecommitdiff
path: root/libtk/buton.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtk/buton.c')
-rw-r--r--libtk/buton.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libtk/buton.c b/libtk/buton.c
index 356b8985..325422b9 100644
--- a/libtk/buton.c
+++ b/libtk/buton.c
@@ -198,15 +198,16 @@ tkmkbutton(TkTop *t, int btype)
tkl = TKobj(TkLabel, tk);
tkl->ul = -1;
tkl->justify = Tkleft;
- if (btype == TKradiobutton)
- tkl->variable = strdup(tkselbut);
switch (btype) {
case TKbutton:
e = tkbindings(t, tk, bb, nelem(bb));
break;
case TKcheckbutton:
+ e = tkbindings(t, tk, cb, nelem(cb));
+ break;
case TKradiobutton:
+ tkl->variable = strdup(tkselbut);
e = tkbindings(t, tk, cb, nelem(cb));
break;
}