summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
Diffstat (limited to 'openbox')
-rw-r--r--openbox/menu.c15
-rw-r--r--openbox/menu.h2
2 files changed, 15 insertions, 2 deletions
diff --git a/openbox/menu.c b/openbox/menu.c
index b271cf31..74c23482 100644
--- a/openbox/menu.c
+++ b/openbox/menu.c
@@ -90,11 +90,11 @@ void menu_startup()
menu_add_entry(m, menu_entry_new_submenu("subz", s));
- /*
t = (Menu *)plugin_create("timed_menu");
a = action_from_string("execute");
a->data.execute.path = g_strdup("xeyes");
- menu_add_entry(t, menu_entry_new("xeyes", a));*/
+ menu_add_entry(t, menu_entry_new("xeyes", a));
+ menu_add_entry(m, menu_entry_new_submenu("timed", t));
s = menu_new("empty", "chub", m);
menu_add_entry(m, menu_entry_new_submenu("empty", s));
@@ -293,6 +293,17 @@ void menu_hide(Menu *self) {
}
}
+void menu_clear(Menu *self) {
+ GList *it;
+
+ for (it = self->entries; it; it = it->next) {
+ MenuEntry *entry = it->data;
+ menu_entry_free(entry);
+ }
+ self->entries = NULL;
+}
+
+
MenuEntry *menu_find_entry(Menu *menu, Window win)
{
GList *it;
diff --git a/openbox/menu.h b/openbox/menu.h
index 081b3528..43ac054f 100644
--- a/openbox/menu.h
+++ b/openbox/menu.h
@@ -104,6 +104,8 @@ void menu_show_full(Menu *menu, int x, int y, Client *client);
void menu_hide(Menu *self);
+void menu_clear(Menu *self);
+
MenuEntry *menu_entry_new_full(char *label, Action *action,
MenuEntryRenderType render_type,
gpointer submenu);