X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenu.c;h=c52f30131b5b76d212ff6836061142d820ddf07b;hb=1d6e2c13573a6dcbcefd292b23130f3734cf2f1b;hp=cf405720ab211cab138ba8dd930a4a1ce973b6a2;hpb=43c5c01d33e0f4b849fe93ba468827180727eadc;p=chaz%2Fopenbox diff --git a/openbox/menu.c b/openbox/menu.c index cf405720..c52f3013 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -55,14 +55,14 @@ static gboolean menu_open(gchar *file, xmlDocPtr *doc, xmlNodePtr *node) return loaded; } -static void client_dest(ObClient *c) +static void client_dest(gpointer client) { /* menus can be associated with a client, so close any that are since we are disappearing now */ - menu_frame_hide_all_client(c); + menu_frame_hide_all_client(client); } -void menu_startup() +void menu_startup(gboolean reconfig) { xmlDocPtr doc; xmlNodePtr node; @@ -92,7 +92,7 @@ void menu_startup() } } if (!loaded) { - if (menu_open("menu", &doc, &node)) { + if (menu_open("menu.xml", &doc, &node)) { parse_tree(menu_parse_inst, doc, node->xmlChildrenNode); xmlFreeDoc(doc); } @@ -100,12 +100,14 @@ void menu_startup() g_assert(menu_parse_state.menus == NULL); - client_add_destructor(client_dest); + if (!reconfig) + client_add_destructor(client_dest); } -void menu_shutdown() +void menu_shutdown(gboolean reconfig) { - client_remove_destructor(client_dest); + if (!reconfig) + client_remove_destructor(client_dest); parse_shutdown(menu_parse_inst); menu_parse_inst = NULL; @@ -203,7 +205,7 @@ static void parse_menu(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, if ((menu = menu_new(name, title, NULL))) { if (parse_attr_string("execute", node, &script)) { - menu->execute = g_strdup(script); + menu->execute = ob_expand_tilde(script); } else { state->menus = g_slist_prepend(state->menus, menu); parse_tree(i, doc, node->xmlChildrenNode);