X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Faction.c;h=a395af2d19c03ca5d41f095e4a8139e8d8497ac9;hb=fdd1c3c8a7eac8ba1246ae64cbfca6f922294c51;hp=efc7f1ef513b89dba2bac42d9fb692e2ef2e3556;hpb=8fe0cb8989c1fe12b30b9030b446345f25340d35;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index efc7f1ef..a395af2d 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -1,3 +1,21 @@ +/* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- + + action.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 "client.h" #include "focus.h" @@ -686,7 +704,7 @@ ActionString actionstrings[] = } }; -ObAction *action_from_string(char *name, ObUserAction uact) +ObAction *action_from_string(const gchar *name, ObUserAction uact) { ObAction *a = NULL; gboolean exist = FALSE; @@ -723,7 +741,7 @@ ObAction *action_parse(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node, if (act->func == action_execute || act->func == action_restart) { if ((n = parse_find_node("execute", node->xmlChildrenNode))) { gchar *s = parse_string(doc, n); - act->data.execute.path = ob_expand_tilde(s); + act->data.execute.path = parse_expand_tilde(s); g_free(s); } } else if (act->func == action_showmenu) { @@ -800,6 +818,7 @@ void action_execute(union ActionData *data) g_warning("failed to execute '%s': %s", cmd, e->message); } + g_free(cmd); } else { g_warning("failed to convert '%s' from utf8", data->execute.path); } @@ -1166,7 +1185,7 @@ void action_restart(union ActionData *data) void action_exit(union ActionData *data) { - ob_exit(); + ob_exit(0); } void action_showmenu(union ActionData *data) @@ -1231,11 +1250,12 @@ void action_growtoedge(union ActionData *data) { int x, y, width, height, dest; ObClient *c = data->diraction.any.c; - Rect *a = screen_area(c->desktop); + Rect *a; if (!c) return; + a = screen_area(c->desktop); x = c->frame->area.x; y = c->frame->area.y; width = c->frame->area.width;