Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
9014:51b5b3a622ce | 9015:67421e0dc497 |
---|---|
1517 { | 1517 { |
1518 return g_list_append(NULL, GAIM_AWAY_CUSTOM); | 1518 return g_list_append(NULL, GAIM_AWAY_CUSTOM); |
1519 } | 1519 } |
1520 | 1520 |
1521 static void | 1521 static void |
1522 show_set_info(GaimConnection *gc) | 1522 show_set_info(GaimPluginAction *action) |
1523 { | 1523 { |
1524 GaimConnection *gc = (GaimConnection *) action->context; | |
1524 gaim_account_request_change_user_info(gaim_connection_get_account(gc)); | 1525 gaim_account_request_change_user_info(gaim_connection_get_account(gc)); |
1525 } | 1526 } |
1526 | 1527 |
1527 static void | 1528 static void |
1528 change_pass(GaimConnection *gc) | 1529 change_pass(GaimPluginAction *action) |
1529 { | 1530 { |
1531 GaimConnection *gc = (GaimConnection *) action->context; | |
1530 gaim_account_request_change_password(gaim_connection_get_account(gc)); | 1532 gaim_account_request_change_password(gaim_connection_get_account(gc)); |
1531 } | 1533 } |
1532 | 1534 |
1533 static GList *toc_actions(GaimConnection *gc) | 1535 static GList *toc_actions(GaimPlugin *plugin, gpointer context) |
1534 { | 1536 { |
1535 GList *m = NULL; | 1537 GList *m = NULL; |
1536 struct proto_actions_menu *pam; | 1538 GaimPluginAction *act; |
1537 | 1539 |
1538 pam = g_new0(struct proto_actions_menu, 1); | 1540 act = gaim_plugin_action_new(_("Set User Info"), |
1539 pam->label = _("Set User Info"); | 1541 show_set_info); |
1540 pam->callback = show_set_info; | 1542 m = g_list_append(m, act); |
1541 pam->gc = gc; | |
1542 m = g_list_append(m, pam); | |
1543 | 1543 |
1544 #if 0 | 1544 #if 0 |
1545 pam = g_new0(struct proto_actions_menu, 1); | 1545 act = gaim_plugin_action_new(_("Set Dir Info"), |
1546 pam->label = _("Set Dir Info"); | 1546 show_set_dir); |
1547 pam->callback = show_set_dir; | 1547 m = g_list_append(m, act); |
1548 pam->gc = gc; | |
1549 m = g_list_append(m, pam); | |
1550 #endif | 1548 #endif |
1551 | 1549 |
1552 pam = g_new0(struct proto_actions_menu, 1); | 1550 act = gaim_plugin_action_new(_("Change Password"), |
1553 pam->label = _("Change Password"); | 1551 change_pass); |
1554 pam->callback = change_pass; | 1552 m = g_list_append(m, act); |
1555 pam->gc = gc; | |
1556 m = g_list_append(m, pam); | |
1557 | 1553 |
1558 return m; | 1554 return m; |
1559 } | 1555 } |
1560 | 1556 |
1561 #if 0 | 1557 #if 0 |
2105 toc_list_icon, | 2101 toc_list_icon, |
2106 toc_list_emblems, | 2102 toc_list_emblems, |
2107 NULL, | 2103 NULL, |
2108 NULL, | 2104 NULL, |
2109 toc_away_states, | 2105 toc_away_states, |
2110 toc_actions, | |
2111 toc_buddy_menu, | 2106 toc_buddy_menu, |
2112 toc_chat_info, | 2107 toc_chat_info, |
2113 toc_login, | 2108 toc_login, |
2114 toc_close, | 2109 toc_close, |
2115 toc_send_im, | 2110 toc_send_im, |
2180 NULL, /**< destroy */ | 2175 NULL, /**< destroy */ |
2181 | 2176 |
2182 NULL, /**< ui_info */ | 2177 NULL, /**< ui_info */ |
2183 &prpl_info, /**< extra_info */ | 2178 &prpl_info, /**< extra_info */ |
2184 NULL, | 2179 NULL, |
2185 NULL | 2180 toc_actions |
2186 }; | 2181 }; |
2187 | 2182 |
2188 static void | 2183 static void |
2189 init_plugin(GaimPlugin *plugin) | 2184 init_plugin(GaimPlugin *plugin) |
2190 { | 2185 { |