summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moynes <smoynes@nexus.carleton.ca>2003-05-10 15:12:27 +0000
committerScott Moynes <smoynes@nexus.carleton.ca>2003-05-10 15:12:27 +0000
commit24eb9f85df07efb0d57f06a255ac6673bf93d8a7 (patch)
tree1a2412e3a4db42d946202905ad62ba234d6dbb81
parent03d42b5d8253ad2de94df20b12b9fb22ce51eb3d (diff)
Turn off timed_menu by default
-rw-r--r--openbox/menu.c8
-rw-r--r--plugins/menu/timed_menu.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/openbox/menu.c b/openbox/menu.c
index 74c23482..994a8a93 100644
--- a/openbox/menu.c
+++ b/openbox/menu.c
@@ -90,12 +90,14 @@ 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(m, menu_entry_new_submenu("timed", t));
-
+ */
+
s = menu_new("empty", "chub", m);
menu_add_entry(m, menu_entry_new_submenu("empty", s));
@@ -234,7 +236,9 @@ void menu_add_entry(Menu *menu, MenuEntry *entry)
{
XSetWindowAttributes attrib;
- g_assert(menu != NULL && entry != NULL && entry->item == None);
+ g_assert(menu != NULL);
+ g_assert(entry != NULL);
+ g_assert(entry->item == None);
menu->entries = g_list_append(menu->entries, entry);
entry->parent = menu;
diff --git a/plugins/menu/timed_menu.c b/plugins/menu/timed_menu.c
index 34d71e73..68bf57b1 100644
--- a/plugins/menu/timed_menu.c
+++ b/plugins/menu/timed_menu.c
@@ -41,7 +41,8 @@ void timed_menu_timeout_handler(void *data)
{
/* if the menu is not shown, run a process and use its output
as menu */
- char *args[] = {"/bin/sh", "-c", "ls", NULL};
+ char *args[] = {"/bin/sh", "-c", TIMED_MENU_DATA(data)->command,
+ NULL};
GIOChannel *io;
char *line;
gint child, c_stdout, line_len, terminator_pos;
@@ -93,6 +94,7 @@ void *plugin_create()
d->type = TIMED_MENU_PIPE;
d->timer = timer_start(1000000, &timed_menu_timeout_handler, m);
+ d->command = "ls";
m->plugin_data = (void *)d;