diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-22 18:55:44 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-22 18:55:44 +0000 |
| commit | 5d350da82e9fc46aa59e59c255604429add2d1ed (patch) | |
| tree | c1c4ba58941032645c20f188c6dbe71647e5bb53 /openbox/actions/showmenu.c | |
| parent | d846979db91a81781993b3e14f6bc0803b9c3ed1 (diff) | |
rename showmenu to menu
Diffstat (limited to 'openbox/actions/showmenu.c')
| -rw-r--r-- | openbox/actions/showmenu.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/openbox/actions/showmenu.c b/openbox/actions/showmenu.c deleted file mode 100644 index 4b12548f..00000000 --- a/openbox/actions/showmenu.c +++ /dev/null @@ -1,57 +0,0 @@ -#include "openbox/actions.h" -#include "openbox/menu.h" -#include <glib.h> - -typedef struct { - gchar *name; -} Options; - -static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); -static void free_func(gpointer options); -static gboolean run_func(ObActionsData *data, gpointer options); - -void action_showmenu_startup() -{ - actions_register("ShowMenu", - setup_func, - free_func, - run_func, - NULL, NULL); -} - -static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) -{ - xmlNodePtr n; - Options *o; - - o = g_new0(Options, 1); - - if ((n = parse_find_node("menu", node))) - o->name = parse_string(doc, n); - return o; -} - -static void free_func(gpointer options) -{ - Options *o = options; - - if (o) { - g_free(o->name); - g_free(o); - } -} - -/* Always return FALSE because its not interactive */ -static gboolean run_func(ObActionsData *data, gpointer options) -{ - Options *o = options; - - /* you cannot call ShowMenu from inside a menu */ - if (data->uact == OB_USER_ACTION_MENU_SELECTION) return FALSE; - - if (o->name) { - menu_show(o->name, data->x, data->y, data->button != 0, data->client); - } - - return FALSE; -} |
