Mercurial > pidgin.yaz
comparison src/gtkblist.c @ 13196:f04dffe22957
[gaim-migrate @ 15559]
This fixes the GaimPluginAction crash/not working. We were freeing the data that we were using in the a
I haven't leak checked this, but it _should_ be alright..
committer: Tailor Script <tailor@pidgin.im>
author | Gary Kramlich <grim@reaperworld.com> |
---|---|
date | Thu, 09 Feb 2006 00:14:40 +0000 |
parents | c242836ff793 |
children | 6ff5271afedc |
comparison
equal
deleted
inserted
replaced
13195:c242836ff793 | 13196:f04dffe22957 |
---|---|
5444 } | 5444 } |
5445 | 5445 |
5446 #endif | 5446 #endif |
5447 | 5447 |
5448 static void | 5448 static void |
5449 plugin_act(GtkObject *obk, GaimPluginAction *pam) | 5449 plugin_act(GtkObject *obj, GaimPluginAction *pam) |
5450 { | 5450 { |
5451 if (pam->callback) | 5451 if (pam && pam->callback) |
5452 pam->callback(pam); | 5452 pam->callback(pam); |
5453 } | 5453 } |
5454 | 5454 |
5455 static void | 5455 static void |
5456 build_plugin_actions(GtkWidget *menu, GaimPlugin *plugin) | 5456 build_plugin_actions(GtkWidget *menu, GaimPlugin *plugin) |
5472 menuitem = gtk_menu_item_new_with_label(action->label); | 5472 menuitem = gtk_menu_item_new_with_label(action->label); |
5473 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); | 5473 gtk_menu_shell_append(GTK_MENU_SHELL(menu), menuitem); |
5474 | 5474 |
5475 g_signal_connect(G_OBJECT(menuitem), "activate", | 5475 g_signal_connect(G_OBJECT(menuitem), "activate", |
5476 G_CALLBACK(plugin_act), action); | 5476 G_CALLBACK(plugin_act), action); |
5477 g_object_set_data(G_OBJECT(menuitem), "plugin_action", action); | 5477 g_object_set_data_full(G_OBJECT(menuitem), "plugin_action", |
5478 action, | |
5479 (GDestroyNotify)gaim_plugin_action_free); | |
5478 gtk_widget_show(menuitem); | 5480 gtk_widget_show(menuitem); |
5479 | |
5480 gaim_plugin_action_free(action); | |
5481 } | 5481 } |
5482 else | 5482 else |
5483 gaim_separator(menu); | 5483 gaim_separator(menu); |
5484 } | 5484 } |
5485 | 5485 |