summaryrefslogtreecommitdiff
path: root/openbox/client_menu.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-10-11 17:57:50 +0000
committerDana Jansens <danakj@orodu.net>2003-10-11 17:57:50 +0000
commita38b954a9d5df58d52c5e7930b170f4206f38259 (patch)
tree2d722b3fab33a69103a3492ac08caeddbeae38aa /openbox/client_menu.c
parent055aa5cd7411c4563956e376523219afc6198ce1 (diff)
the menu's labels are allocated
Diffstat (limited to 'openbox/client_menu.c')
-rw-r--r--openbox/client_menu.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/openbox/client_menu.c b/openbox/client_menu.c
index d7f26e3e..f36b4390 100644
--- a/openbox/client_menu.c
+++ b/openbox/client_menu.c
@@ -72,13 +72,16 @@ static void client_update(ObMenuFrame *frame, gpointer data)
e->data.normal.enabled = frame->client->functions & OB_CLIENT_FUNC_ICONIFY;
e = menu_find_entry_id(menu, CLIENT_MAXIMIZE);
- e->data.normal.label = frame->client->max_vert || frame->client->max_horz ?
- _("Restore") : _("Maximize");
+ g_free(e->data.normal.label);
+ e->data.normal.label =
+ g_strdup(frame->client->max_vert || frame->client->max_horz ?
+ _("Restore") : _("Maximize"));
e->data.normal.enabled =frame->client->functions & OB_CLIENT_FUNC_MAXIMIZE;
e = menu_find_entry_id(menu, CLIENT_SHADE);
- e->data.normal.label = frame->client->shaded ?
- _("Roll down") : _("Roll up");
+ g_free(e->data.normal.label);
+ e->data.normal.label = g_strdup(frame->client->shaded ?
+ _("Roll down") : _("Roll up"));
e->data.normal.enabled = frame->client->functions & OB_CLIENT_FUNC_SHADE;
e = menu_find_entry_id(menu, CLIENT_MOVE);