X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fmenu.c;h=cf3fa5551b6c1661e887fb14e3cc708b37c7bb9d;hb=b07194a7aef3d0fbbef01a4e82fe7763f8c82720;hp=de3ec629f3962bfdbc120f777c6ccc62b798145c;hpb=ec4c9b0c1f22eee6ded4578c9448fab353b010cf;p=chaz%2Fopenbox diff --git a/openbox/menu.c b/openbox/menu.c index de3ec629..cf3fa555 100644 --- a/openbox/menu.c +++ b/openbox/menu.c @@ -1,3 +1,21 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- + + menu.c for the Openbox window manager + Copyright (c) 2003 Ben Jansens + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + See the COPYING file for a copy of the GNU General Public License. +*/ + #include "debug.h" #include "menu.h" #include "openbox.h" @@ -158,10 +176,12 @@ static void parse_menu_item(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, GSList *acts = NULL; for (node = node->children; node; node = node->next) - if (!xmlStrcasecmp(node->name, (const xmlChar*) "action")) - acts = g_slist_append(acts, action_parse - (i, doc, node, - OB_USER_ACTION_MENU_SELECTION)); + if (!xmlStrcasecmp(node->name, (const xmlChar*) "action")) { + ObAction *a = action_parse + (i, doc, node, OB_USER_ACTION_MENU_SELECTION); + if (a) + acts = g_slist_append(acts, a); + } menu_add_normal(state->parent, -1, label, acts); g_free(label); }