From: Dana Jansens Date: Sat, 11 Oct 2003 17:57:50 +0000 (+0000) Subject: the menu's labels are allocated X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=a38b954a9d5df58d52c5e7930b170f4206f38259;p=chaz%2Fopenbox the menu's labels are allocated --- 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);