X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Fmenu.c;h=330849cbe3cdf8b321f46f1e8229470eb7caed51;hb=d658612cac44ccc1406aea1bad48c851016e4751;hp=b49177ba8b4473059ed05dfec7f970acecbc4d38;hpb=d519deeb2e24ba27664a231c6579bee1e02b4ebb;p=chaz%2Fopenbox diff --git a/openbox/menu.c b/openbox/menu.c index b49177ba..330849cb 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -111,7 +111,7 @@ void menu_startup(gboolean reconfig) g_message(_("Unable to find a valid menu file '%s'"), "menu.xml"); } - + g_assert(menu_parse_state.parent == NULL); if (!reconfig) @@ -198,7 +198,7 @@ static ObMenu* menu_from_name(gchar *name) g_message(_("Attempted to access menu '%s' but it does not exist"), name); return self; -} +} #define VALID_SHORTCUT(c) (((c) >= '0' && (c) <= '9') || \ ((c) >= 'A' && (c) <= 'Z') || \ @@ -209,7 +209,7 @@ static gunichar parse_shortcut(const gchar *label, gboolean allow_shortcut, gboolean *always_show) { gunichar shortcut = 0; - + *position = 0; *always_show = FALSE; @@ -268,7 +268,7 @@ static void parse_menu_item(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, { ObMenuParseState *state = data; gchar *label; - + if (state->parent) { if (parse_attr_string("label", node, &label)) { GSList *acts = NULL; @@ -523,6 +523,7 @@ void menu_entry_unref(ObMenuEntry *self) g_free(self->data.submenu.name); break; case OB_MENU_ENTRY_TYPE_SEPARATOR: + g_free(self->data.separator.label); break; }