]> Dogcows Code - chaz/openbox/commitdiff
the menu's labels are allocated
authorDana Jansens <danakj@orodu.net>
Sat, 11 Oct 2003 17:57:50 +0000 (17:57 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 11 Oct 2003 17:57:50 +0000 (17:57 +0000)
openbox/client_menu.c

index d7f26e3e1d73d2c0e0193af977d4eeea0fa89471..f36b43902f2289e001ff7bb07aafad87ad55bd2a 100644 (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 = 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);
This page took 0.023983 seconds and 4 git commands to generate.