Mercurial > pidgin
diff src/protocols/gg/gg.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 | 8bf2c6122bf1 |
children | 7ab20f829190 |
line wrap: on
line diff
--- a/src/protocols/gg/gg.c Sat May 22 17:20:27 2004 +0000 +++ b/src/protocols/gg/gg.c Sat May 22 17:33:38 2004 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 9772 2004-05-21 12:07:26Z lschiere $ + * $Id: gg.c 9791 2004-05-22 17:33:38Z lschiere $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -924,9 +924,11 @@ } static void -change_pass(GaimConnection *gc) +change_pass(GaimPluginAction *action) { - gaim_account_request_change_password(gaim_connection_get_account(gc)); + GaimConnection *gc = (GaimConnection *) action->context; + GaimAccount *account = gaim_connection_get_account(gc); + gaim_account_request_change_password(account); } #if 0 @@ -1391,46 +1393,32 @@ } } -static GList *agg_actions(GaimConnection *gc) +static GList *agg_actions(GaimPlugin *plugin, gpointer context) { GList *m = NULL; - struct proto_actions_menu *pam; + GaimPluginAction *act = NULL; #if 0 - pam = g_new0(struct proto_actions_menu, 1); - pam->label = _("Directory Search"); - pam->callback = show_find_info; - pam->gc = gc; - m = g_list_append(m, pam); - + act = gaim_plugin_action_new(_("Directory Search"), show_find_info); + m = g_list_append(m, act); m = g_list_append(m, NULL); #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); #if 0 - m = g_list_append(m, NULL); - pam = g_new0(struct proto_actions_menu, 1); - pam->label = _("Import Buddy List from Server"); - pam->callback = import_buddies_server; - pam->gc = gc; - m = g_list_append(m, pam); + act = gaim_plugin_action_new(_("Import Buddy List from Server"), + import_buddies_server); + m = g_list_append(m, act); - pam = g_new0(struct proto_actions_menu, 1); - pam->label = _("Export Buddy List to Server"); - pam->callback = export_buddies_server; - pam->gc = gc; - m = g_list_append(m, pam); + act = gaim_plugin_action_new(_("Export Buddy List to Server"), + export_buddies_server); + m = g_list_append(m, act); - pam = g_new0(struct proto_actions_menu, 1); - pam->label = _("Delete Buddy List from Server"); - pam->callback = delete_buddies_server; - pam->gc = gc; - m = g_list_append(m, pam); + act = gaim_plugin_action_new(_("Delete Buddy List from Server"), + delete_buddies_server); + m = g_list_append(m, act); #endif return m; @@ -1542,7 +1530,6 @@ NULL, NULL, agg_away_states, - agg_actions, agg_buddy_menu, NULL, agg_login, @@ -1617,7 +1604,7 @@ NULL, /**< ui_info */ &prpl_info, /**< extra_info */ NULL, - NULL + agg_actions }; static void