summaryrefslogtreecommitdiff
path: root/plugins/menu
diff options
context:
space:
mode:
authorScott Moynes <smoynes@nexus.carleton.ca>2003-07-23 01:45:44 +0000
committerScott Moynes <smoynes@nexus.carleton.ca>2003-07-23 01:45:44 +0000
commit0e69ae2b96fb4dd7435ebe15645d1384d11a3ef7 (patch)
treefb68e08bfab17debce6c71a57df541197e296a82 /plugins/menu
parent845833226b7d65019d41eb3afce6fad7ae3d30a2 (diff)
* 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.
Diffstat (limited to 'plugins/menu')
-rw-r--r--plugins/menu/fifo_menu.c13
1 files changed, 10 insertions, 3 deletions
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);