diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-07-27 01:37:28 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-01-20 01:36:55 -0500 |
| commit | fdabb69f4f25596df972caa76c85c2aeba26226e (patch) | |
| tree | 2566f1a229a65e54cdffd88a255301d0bf7fa3a7 /openbox/actions/resize.c | |
| parent | 0667bbc3e2fbd3fa39206e843560735524840d35 (diff) | |
update openbox to use the current parser interface in libobt
there is also some random bug fixes for other libobt stuff in here.
Diffstat (limited to 'openbox/actions/resize.c')
| -rw-r--r-- | openbox/actions/resize.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/openbox/actions/resize.c b/openbox/actions/resize.c index e073ed2f..47f45f5b 100644 --- a/openbox/actions/resize.c +++ b/openbox/actions/resize.c @@ -9,8 +9,7 @@ typedef struct { guint32 corner; } Options; -static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); -static void free_func(gpointer options); +static gpointer setup_func(xmlNodePtr node); static gboolean run_func(ObActionsData *data, gpointer options); static guint32 pick_corner(gint x, gint y, gint cx, gint cy, gint cw, gint ch, @@ -18,22 +17,18 @@ static guint32 pick_corner(gint x, gint y, gint cx, gint cy, gint cw, gint ch, void action_resize_startup(void) { - actions_register("Resize", - setup_func, - free_func, - run_func, - NULL, NULL); + actions_register("Resize", setup_func, g_free, run_func, NULL, NULL); } -static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) +static gpointer setup_func(xmlNodePtr node) { xmlNodePtr n; Options *o; o = g_new0(Options, 1); - if ((n = parse_find_node("edge", node))) { - gchar *s = parse_string(doc, n); + if ((n = obt_parse_find_node(node, "edge"))) { + gchar *s = obt_parse_node_string(n); o->corner_specified = TRUE; if (!g_ascii_strcasecmp(s, "top")) @@ -60,13 +55,6 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) return o; } -static void free_func(gpointer options) -{ - Options *o = options; - - g_free(o); -} - /* Always return FALSE because its not interactive */ static gboolean run_func(ObActionsData *data, gpointer options) { |
