summaryrefslogtreecommitdiff
path: root/openbox
diff options
context:
space:
mode:
authorScott Moynes <smoynes@nexus.carleton.ca>2003-05-10 14:51:27 +0000
committerScott Moynes <smoynes@nexus.carleton.ca>2003-05-10 14:51:27 +0000
commit03d42b5d8253ad2de94df20b12b9fb22ce51eb3d (patch)
tree2467b9cce5fcbbc86095e9f2a3ab58faaebc724c /openbox
parent3fab044f347fbfdad27492802fe3e3628ff915da (diff)
Timed menu that reads output from a process while the window is hidden
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);