X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Flayer.c;h=bbfda57218f122ae1784dc11ba03c9372d4cebf1;hb=a1746ab2158da2324aefb7ce81e7b5edc9c41e79;hp=5f0d6ce63aec8c55702e3111b5d1ae79088114c0;hpb=2c9d6c8cab3956af754f04aeea2f115a2697de3c;p=chaz%2Fopenbox diff --git a/openbox/actions/layer.c b/openbox/actions/layer.c index 5f0d6ce6..bbfda572 100644 --- a/openbox/actions/layer.c +++ b/openbox/actions/layer.c @@ -6,14 +6,12 @@ typedef struct { gboolean toggle; } Options; -static gpointer setup_func_top(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); -static gpointer setup_func_bottom(ObParseInst *i, xmlDocPtr doc, - xmlNodePtr node); -static gpointer setup_func_send(ObParseInst *i, xmlDocPtr doc, - xmlNodePtr node); +static gpointer setup_func_top(xmlNodePtr node); +static gpointer setup_func_bottom(xmlNodePtr node); +static gpointer setup_func_send(xmlNodePtr node); static gboolean run_func(ObActionsData *data, gpointer options); -void action_layer_startup() +void action_layer_startup(void) { actions_register("ToggleAlwaysOnTop", setup_func_top, g_free, run_func, NULL, NULL); @@ -23,7 +21,7 @@ void action_layer_startup() run_func, NULL, NULL); } -static gpointer setup_func_top(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) +static gpointer setup_func_top(xmlNodePtr node) { Options *o = g_new0(Options, 1); o->layer = 1; @@ -31,8 +29,7 @@ static gpointer setup_func_top(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) return o; } -static gpointer setup_func_bottom(ObParseInst *i, xmlDocPtr doc, - xmlNodePtr node) +static gpointer setup_func_bottom(xmlNodePtr node) { Options *o = g_new0(Options, 1); o->layer = -1; @@ -40,16 +37,15 @@ static gpointer setup_func_bottom(ObParseInst *i, xmlDocPtr doc, return o; } -static gpointer setup_func_send(ObParseInst *i, xmlDocPtr doc, - xmlNodePtr node) +static gpointer setup_func_send(xmlNodePtr node) { xmlNodePtr n; Options *o; o = g_new0(Options, 1); - if ((n = parse_find_node("layer", node))) { - gchar *s = parse_string(doc, n); + if ((n = obt_parse_find_node(node, "layer"))) { + gchar *s = obt_parse_node_string(n); if (!g_ascii_strcasecmp(s, "above") || !g_ascii_strcasecmp(s, "top")) o->layer = 1;