Mercurial > pidgin.yaz
diff src/protocols/toc/toc.c @ 9015:67421e0dc497
[gaim-migrate @ 9791]
(05:54:53) siege: that's the first pass on merging the two action sources
(05:55:27) siege: using it right now, seems to be working fine. You may
want to look it over though...
(05:56:04) siege: found a small mem-leak in a GList getting created and not
destroyed, this fixes that as well
(13:20:40) KingAnt: LSchiere: Well it's probably ok. I haven't even had a
chance to look at the commit for the other thing
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 22 May 2004 17:33:38 +0000 |
parents | 294ae6548d4e |
children | 7ab20f829190 |
line wrap: on
line diff
--- a/src/protocols/toc/toc.c Sat May 22 17:20:27 2004 +0000 +++ b/src/protocols/toc/toc.c Sat May 22 17:33:38 2004 +0000 @@ -1519,41 +1519,37 @@ } static void -show_set_info(GaimConnection *gc) +show_set_info(GaimPluginAction *action) { + GaimConnection *gc = (GaimConnection *) action->context; gaim_account_request_change_user_info(gaim_connection_get_account(gc)); } static void -change_pass(GaimConnection *gc) +change_pass(GaimPluginAction *action) { + GaimConnection *gc = (GaimConnection *) action->context; gaim_account_request_change_password(gaim_connection_get_account(gc)); } -static GList *toc_actions(GaimConnection *gc) +static GList *toc_actions(GaimPlugin *plugin, gpointer context) { GList *m = NULL; - struct proto_actions_menu *pam; + GaimPluginAction *act; - pam = g_new0(struct proto_actions_menu, 1); - pam->label = _("Set User Info"); - pam->callback = show_set_info; - pam->gc = gc; - m = g_list_append(m, pam); + act = gaim_plugin_action_new(_("Set User Info"), + show_set_info); + m = g_list_append(m, act); #if 0 - pam = g_new0(struct proto_actions_menu, 1); - pam->label = _("Set Dir Info"); - pam->callback = show_set_dir; - pam->gc = gc; - m = g_list_append(m, pam); + act = gaim_plugin_action_new(_("Set Dir Info"), + show_set_dir); + m = g_list_append(m, act); #endif - pam = g_new0(struct proto_actions_menu, 1); - pam->label = _("Change Password"); - pam->callback = change_pass; - pam->gc = gc; - m = g_list_append(m, pam); + act = gaim_plugin_action_new(_("Change Password"), + change_pass); + m = g_list_append(m, act); return m; } @@ -2107,7 +2103,6 @@ NULL, NULL, toc_away_states, - toc_actions, toc_buddy_menu, toc_chat_info, toc_login, @@ -2182,7 +2177,7 @@ NULL, /**< ui_info */ &prpl_info, /**< extra_info */ NULL, - NULL + toc_actions }; static void