aboutsummaryrefslogtreecommitdiff
path: root/src/button.c
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2023-11-26 23:19:19 +0100
committerFederico Angelilli <code@fedang.net>2023-11-26 23:19:19 +0100
commit7da583328758e3e8e3ace381aab9e98313f76767 (patch)
treeb131ab8e893444217750864e184aa5af9a4cfcd9 /src/button.c
parent52668d11f90a25c917d29353bf3a2dab2fa13bc4 (diff)
Change behaviour of button_simple_set_text
Diffstat (limited to 'src/button.c')
-rw-r--r--src/button.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/button.c b/src/button.c
index 2835623..24eaf0c 100644
--- a/src/button.c
+++ b/src/button.c
@@ -12,12 +12,12 @@ Button *button_simple_create(PangoAlignment align, Color color, Color line_color
return btn;
}
-void button_simple_set_text(Button *btn, const char *text, Color text_color)
+void button_simple_set_text(Button *btn, char *text, Color text_color)
{
g_assert(btn->simple);
ButtonSimple *sbtn = CAST(btn, ButtonSimple);
if (sbtn->text != NULL) g_free(sbtn->text);
- sbtn->text = g_strdup(text);
+ sbtn->text = text;
sbtn->text_color = text_color;
}