]> Dogcows Code - chaz/openbox/blobdiff - openbox/menu.c
Timed menu that reads output from a process while the window is hidden
[chaz/openbox] / openbox / menu.c
index b271cf31e811220688f906fb4821a321de291471..74c234827ad945ffb0b28b979ac1a23a11b0e8b7 100644 (file)
@@ -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;
This page took 0.02282 seconds and 4 git commands to generate.