From 0e69ae2b96fb4dd7435ebe15645d1384d11a3ef7 Mon Sep 17 00:00:00 2001 From: Scott Moynes Date: Wed, 23 Jul 2003 01:45:44 +0000 Subject: * Change xml parsing to pass the parent node, rather than the first child. * Add x,y co-ordinates on showmenu action so we can place menus on keypress. --- plugins/menu/fifo_menu.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'plugins/menu') diff --git a/plugins/menu/fifo_menu.c b/plugins/menu/fifo_menu.c index 71326225..3443294e 100644 --- a/plugins/menu/fifo_menu.c +++ b/plugins/menu/fifo_menu.c @@ -133,6 +133,11 @@ void plugin_destroy (ObMenu *m) FIFO_MENU_DATA(m)->fifo = NULL; } + if (FIFO_MENU_DATA(m)->buf != NULL) { + g_free(FIFO_MENU_DATA(m)->buf); + FIFO_MENU_DATA(m)->buf = NULL; + } + g_free(m->plugin_data); menu_free(m->name); @@ -162,9 +167,11 @@ void *plugin_create(PluginMenuCreateData *data) m = menu_new( (label != NULL ? label : ""), (id != NULL ? id : PLUGIN_NAME), data->parent); - menu_add_entry(data->parent, menu_entry_new_submenu( - (label != NULL ? label : ""), - m)); + + if (data->parent) + menu_add_entry(data->parent, menu_entry_new_submenu( + (label != NULL ? label : ""), + m)); g_free(label); g_free(id); -- cgit v1.2.3