Turn off timed_menu by default
This commit is contained in:
parent
03d42b5d82
commit
24eb9f85df
2 changed files with 9 additions and 3 deletions
|
@ -90,12 +90,14 @@ void menu_startup()
|
||||||
|
|
||||||
menu_add_entry(m, menu_entry_new_submenu("subz", s));
|
menu_add_entry(m, menu_entry_new_submenu("subz", s));
|
||||||
|
|
||||||
|
/*
|
||||||
t = (Menu *)plugin_create("timed_menu");
|
t = (Menu *)plugin_create("timed_menu");
|
||||||
a = action_from_string("execute");
|
a = action_from_string("execute");
|
||||||
a->data.execute.path = g_strdup("xeyes");
|
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));
|
menu_add_entry(m, menu_entry_new_submenu("timed", t));
|
||||||
|
*/
|
||||||
|
|
||||||
s = menu_new("empty", "chub", m);
|
s = menu_new("empty", "chub", m);
|
||||||
menu_add_entry(m, menu_entry_new_submenu("empty", s));
|
menu_add_entry(m, menu_entry_new_submenu("empty", s));
|
||||||
|
|
||||||
|
@ -234,7 +236,9 @@ void menu_add_entry(Menu *menu, MenuEntry *entry)
|
||||||
{
|
{
|
||||||
XSetWindowAttributes attrib;
|
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);
|
menu->entries = g_list_append(menu->entries, entry);
|
||||||
entry->parent = menu;
|
entry->parent = menu;
|
||||||
|
|
|
@ -41,7 +41,8 @@ void timed_menu_timeout_handler(void *data)
|
||||||
{
|
{
|
||||||
/* if the menu is not shown, run a process and use its output
|
/* if the menu is not shown, run a process and use its output
|
||||||
as menu */
|
as menu */
|
||||||
char *args[] = {"/bin/sh", "-c", "ls", NULL};
|
char *args[] = {"/bin/sh", "-c", TIMED_MENU_DATA(data)->command,
|
||||||
|
NULL};
|
||||||
GIOChannel *io;
|
GIOChannel *io;
|
||||||
char *line;
|
char *line;
|
||||||
gint child, c_stdout, line_len, terminator_pos;
|
gint child, c_stdout, line_len, terminator_pos;
|
||||||
|
@ -93,6 +94,7 @@ void *plugin_create()
|
||||||
|
|
||||||
d->type = TIMED_MENU_PIPE;
|
d->type = TIMED_MENU_PIPE;
|
||||||
d->timer = timer_start(1000000, &timed_menu_timeout_handler, m);
|
d->timer = timer_start(1000000, &timed_menu_timeout_handler, m);
|
||||||
|
d->command = "ls";
|
||||||
|
|
||||||
m->plugin_data = (void *)d;
|
m->plugin_data = (void *)d;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue