the menu's labels are allocated

This commit is contained in:
Dana Jansens 2003-10-11 17:57:50 +00:00
parent 055aa5cd74
commit a38b954a9d

View file

@ -72,13 +72,16 @@ static void client_update(ObMenuFrame *frame, gpointer data)
e->data.normal.enabled = frame->client->functions & OB_CLIENT_FUNC_ICONIFY; e->data.normal.enabled = frame->client->functions & OB_CLIENT_FUNC_ICONIFY;
e = menu_find_entry_id(menu, CLIENT_MAXIMIZE); e = menu_find_entry_id(menu, CLIENT_MAXIMIZE);
e->data.normal.label = frame->client->max_vert || frame->client->max_horz ? g_free(e->data.normal.label);
_("Restore") : _("Maximize"); 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->data.normal.enabled =frame->client->functions & OB_CLIENT_FUNC_MAXIMIZE;
e = menu_find_entry_id(menu, CLIENT_SHADE); e = menu_find_entry_id(menu, CLIENT_SHADE);
e->data.normal.label = frame->client->shaded ? g_free(e->data.normal.label);
_("Roll down") : _("Roll up"); 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->data.normal.enabled = frame->client->functions & OB_CLIENT_FUNC_SHADE;
e = menu_find_entry_id(menu, CLIENT_MOVE); e = menu_find_entry_id(menu, CLIENT_MOVE);