finch/gntblist.c

branch
soc.2013.gobjectification.plugins
changeset 36623
caaadef03507
parent 36606
9fe2d65fe1a7
child 36626
18fc361b3704
equal deleted inserted replaced
36622:5e129f11e6c6 36623:caaadef03507
740 740
741 if (!group || !*group) 741 if (!group || !*group)
742 group = _("Chats"); 742 group = _("Chats");
743 743
744 gc = purple_account_get_connection(account); 744 gc = purple_account_get_connection(account);
745 protocol = purple_connection_get_protocol_info(gc); 745 protocol = purple_connection_get_protocol(gc);
746 if (protocol->chat_info_defaults != NULL) 746 if (protocol->chat_info_defaults != NULL)
747 hash = purple_protocol_iface_chat_info_defaults(protocol, gc, name); 747 hash = purple_protocol_iface_chat_info_defaults(protocol, gc, name);
748 748
749 chat = purple_chat_new(account, name, hash); 749 chat = purple_chat_new(account, name, hash);
750 750
1060 1060
1061 static void 1061 static void
1062 append_proto_menu(GntMenu *menu, PurpleConnection *gc, PurpleBlistNode *node) 1062 append_proto_menu(GntMenu *menu, PurpleConnection *gc, PurpleBlistNode *node)
1063 { 1063 {
1064 GList *list; 1064 GList *list;
1065 PurpleProtocol *protocol = purple_connection_get_protocol_info(gc); 1065 PurpleProtocol *protocol = purple_connection_get_protocol(gc);
1066 1066
1067 if(!protocol || !protocol->blist_node_menu) 1067 if(!protocol || !protocol->blist_node_menu)
1068 return; 1068 return;
1069 1069
1070 for(list = purple_protocol_iface_blist_node_menu(protocol, node); list; 1070 for(list = purple_protocol_iface_blist_node_menu(protocol, node); list;
1124 PurpleConnection *gc; 1124 PurpleConnection *gc;
1125 1125
1126 purple_request_fields_add_group(fields, group); 1126 purple_request_fields_add_group(fields, group);
1127 1127
1128 gc = purple_account_get_connection(purple_chat_get_account(chat)); 1128 gc = purple_account_get_connection(purple_chat_get_account(chat));
1129 parts = purple_connection_get_protocol_info(gc)->chat_info(gc); 1129 parts = purple_connection_get_protocol(gc)->chat_info(gc);
1130 1130
1131 for (iter = parts; iter; iter = iter->next) { 1131 for (iter = parts; iter; iter = iter->next) {
1132 pce = iter->data; 1132 pce = iter->data;
1133 if (pce->is_int) { 1133 if (pce->is_int) {
1134 int val; 1134 int val;
1275 gboolean permitted; 1275 gboolean permitted;
1276 GntMenuItem *item; 1276 GntMenuItem *item;
1277 PurpleProtocol *protocol; 1277 PurpleProtocol *protocol;
1278 PurpleConnection *gc = purple_account_get_connection(purple_buddy_get_account(buddy)); 1278 PurpleConnection *gc = purple_account_get_connection(purple_buddy_get_account(buddy));
1279 1279
1280 protocol = purple_connection_get_protocol_info(gc); 1280 protocol = purple_connection_get_protocol(gc);
1281 if (protocol && protocol->get_info) 1281 if (protocol && protocol->get_info)
1282 { 1282 {
1283 add_custom_action(menu, _("Get Info"), 1283 add_custom_action(menu, _("Get Info"),
1284 PURPLE_CALLBACK(finch_blist_get_buddy_info_cb), buddy); 1284 PURPLE_CALLBACK(finch_blist_get_buddy_info_cb), buddy);
1285 } 1285 }
2609 PurpleConnection *gc = purple_account_get_connection(account); 2609 PurpleConnection *gc = purple_account_get_connection(account);
2610 PurpleProtocol *protocol; 2610 PurpleProtocol *protocol;
2611 2611
2612 if (!gc || !PURPLE_CONNECTION_IS_CONNECTED(gc)) 2612 if (!gc || !PURPLE_CONNECTION_IS_CONNECTED(gc))
2613 continue; 2613 continue;
2614 protocol = purple_connection_get_protocol_info(gc); 2614 protocol = purple_connection_get_protocol(gc);
2615 2615
2616 if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(protocol, get_actions)) { 2616 if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(protocol, get_actions)) {
2617 item = gnt_menuitem_new(purple_account_get_username(account)); 2617 item = gnt_menuitem_new(purple_account_get_username(account));
2618 gnt_menu_add_item(GNT_MENU(sub), item); 2618 gnt_menu_add_item(GNT_MENU(sub), item);
2619 build_protocol_actions(item, protocol, gc); 2619 build_protocol_actions(item, protocol, gc);
2814 purple_conversation_present(PURPLE_CONVERSATION(conv)); 2814 purple_conversation_present(PURPLE_CONVERSATION(conv));
2815 } 2815 }
2816 2816
2817 chat = purple_blist_find_chat(account, name); 2817 chat = purple_blist_find_chat(account, name);
2818 if (chat == NULL) { 2818 if (chat == NULL) {
2819 PurpleProtocol *protocol = purple_connection_get_protocol_info(gc); 2819 PurpleProtocol *protocol = purple_connection_get_protocol(gc);
2820 if (protocol->chat_info_defaults != NULL) 2820 if (protocol->chat_info_defaults != NULL)
2821 hash = purple_protocol_iface_chat_info_defaults(protocol, gc, name); 2821 hash = purple_protocol_iface_chat_info_defaults(protocol, gc, name);
2822 } else { 2822 } else {
2823 hash = purple_chat_get_components(chat); 2823 hash = purple_chat_get_components(chat);
2824 } 2824 }

mercurial