]>
Dogcows Code - chaz/openbox/blob - openbox/actions/addremovedesktop.c
1 #include "openbox/actions.h"
2 #include "openbox/screen.h"
10 static gpointer
setup_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
);
11 static gpointer
setup_add_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
);
12 static gpointer
setup_remove_func(ObParseInst
*i
,
13 xmlDocPtr doc
, xmlNodePtr node
);
14 static void free_func(gpointer options
);
15 static gboolean
run_func(ObActionsData
*data
, gpointer options
);
17 void action_addremovedesktop_startup(void)
19 actions_register("AddDesktop",
24 actions_register("RemoveDesktop",
31 static gpointer
setup_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
)
36 o
= g_new0(Options
, 1);
38 if ((n
= parse_find_node("where", node
))) {
39 gchar
*s
= parse_string(doc
, n
);
40 if (!g_ascii_strcasecmp(s
, "last"))
42 else if (!g_ascii_strcasecmp(s
, "current"))
50 static gpointer
setup_add_func(ObParseInst
*i
, xmlDocPtr doc
, xmlNodePtr node
)
52 Options
*o
= setup_func(i
, doc
, node
);
57 static gpointer
setup_remove_func(ObParseInst
*i
,
58 xmlDocPtr doc
, xmlNodePtr node
)
60 Options
*o
= setup_func(i
, doc
, node
);
65 static void free_func(gpointer options
)
72 /* Always return FALSE because its not interactive */
73 static gboolean
run_func(ObActionsData
*data
, gpointer options
)
77 actions_client_move(data
, TRUE
);
80 screen_add_desktop(o
->current
);
82 screen_remove_desktop(o
->current
);
84 actions_client_move(data
, FALSE
);
This page took 0.034817 seconds and 4 git commands to generate.