X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenu.c;h=7c49cedbe3d411b22b7fbb0647d7bb37aeeb332d;hb=51d735672c7a726655867b703d07e390781939de;hp=7d8f0ba29cafaf7397fa7adc3a304a02f81d86f1;hpb=9f31f80ce8adaa4c4cc899e7ab9106d971fe4e96;p=chaz%2Fopenbox diff --git a/openbox/menu.c b/openbox/menu.c index 7d8f0ba2..7c49cedb 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -90,7 +90,16 @@ void menu_startup(gboolean reconfig) loaded = TRUE; obt_xml_tree_from_root(menu_parse_inst); obt_xml_close(menu_parse_inst); - } else + } + else if (obt_xml_load_file(menu_parse_inst, + it->data, + "openbox_menu")) + { + loaded = TRUE; + obt_xml_tree_from_root(menu_parse_inst); + obt_xml_close(menu_parse_inst); + } + else g_message(_("Unable to find a valid menu file \"%s\""), (const gchar*)it->data); } @@ -279,7 +288,7 @@ static void parse_menu_item(xmlNodePtr node, gpointer data) /* Don't try to extract "icon" attribute if icons in user-defined menus are not enabled. */ - if (obt_xml_attr_string(node, "label", &label)) { + if (obt_xml_attr_string_unstripped(node, "label", &label)) { xmlNodePtr c; GSList *acts = NULL; @@ -314,7 +323,7 @@ static void parse_menu_separator(xmlNodePtr node, gpointer data) if (state->parent) { gchar *label; - if (!obt_xml_attr_string(node, "label", &label)) + if (!obt_xml_attr_string_unstripped(node, "label", &label)) label = NULL; menu_add_separator(state->parent, -1, label); @@ -334,7 +343,7 @@ static void parse_menu(xmlNodePtr node, gpointer data) goto parse_menu_fail; if (!g_hash_table_lookup(menu_hash, name)) { - if (!obt_xml_attr_string(node, "label", &title)) + if (!obt_xml_attr_string_unstripped(node, "label", &title)) goto parse_menu_fail; if ((menu = menu_new(name, title, TRUE, NULL))) {