Menu parsing updates for plugins. FIFO menus are the only plugin that takes advantage of this. Example: <menu id="root" label="Openbox 3"> <menu id="fonk" label="fonk" plugin="fifo_menu"> </menu> </menu> This creates a FIFO ~/.openbox/fifo_menu/fonk to which you can send menus to. The menus sent to it must be like <fifo> <item> etc... </fifo> I think. If my memory serves me right. It is all hideous, but I just wanted to experiment and see if it was possible.
Scott Moynes smoynes@nexus.carleton.ca
5 files changed,
90 insertions(+),
38 deletions(-)
M
openbox/plugin.c
→
openbox/plugin.c
@@ -176,7 +176,7 @@ g_io_channel_unref(io);
} } -void *plugin_create(char *name /* TODO */) +void *plugin_create(char *name, void *data) { Plugin *p = (Plugin *)g_datalist_get_data(&plugins, name);@@ -190,7 +190,7 @@ g_critical("Unsupported create/destroy: %s", name);
return NULL; } - return p->create(); + return p->create(data); } void plugin_destroy(char *name, void *data)
M
openbox/plugin.h
→
openbox/plugin.h
@@ -14,7 +14,7 @@ gboolean plugin_open_reopen(char *name);
void plugin_close(char *name); /* call plugin's generic constructor */ -void *plugin_create(char *name /* TODO */); +void *plugin_create(char *name, void *data); /* free memory allocated by plugin_create() */ void plugin_destroy(char *name, void *object);