pidgin/gtkconv.c

changeset 23320
e002cfcba317
parent 23310
e34473be13db
child 23333
5e25cbf555c0
equal deleted inserted replaced
23319:987080575fde 23320:e002cfcba317
3151 chat = g_object_get_data(G_OBJECT(gtkconv->imhtml), "transient_chat"); 3151 chat = g_object_get_data(G_OBJECT(gtkconv->imhtml), "transient_chat");
3152 } 3152 }
3153 3153
3154 if ((chat == NULL) && (gtkconv->imhtml != NULL)) { 3154 if ((chat == NULL) && (gtkconv->imhtml != NULL)) {
3155 GHashTable *components; 3155 GHashTable *components;
3156 components = g_hash_table_new_full(g_str_hash, g_str_equal, 3156 PurpleAccount *account = purple_conversation_get_account(conv);
3157 g_free, g_free); 3157 PurplePlugin *prpl = purple_find_prpl(purple_account_get_protocol_id(account));
3158 g_hash_table_replace(components, g_strdup("channel"), 3158 PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
3159 g_strdup(conv->name)); 3159 if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, chat_info_defaults)) {
3160 components = prpl_info->chat_info_defaults(purple_account_get_connection(account),
3161 purple_conversation_get_name(conv));
3162 } else {
3163 components = g_hash_table_new_full(g_str_hash, g_str_equal,
3164 g_free, g_free);
3165 g_hash_table_replace(components, g_strdup("channel"),
3166 g_strdup(purple_conversation_get_name(conv)));
3167 }
3160 chat = purple_chat_new(conv->account, NULL, components); 3168 chat = purple_chat_new(conv->account, NULL, components);
3161 purple_blist_node_set_flags((PurpleBlistNode *)chat, 3169 purple_blist_node_set_flags((PurpleBlistNode *)chat,
3162 PURPLE_BLIST_NODE_FLAG_NO_SAVE); 3170 PURPLE_BLIST_NODE_FLAG_NO_SAVE);
3163 g_object_set_data_full(G_OBJECT(gtkconv->imhtml), "transient_chat", 3171 g_object_set_data_full(G_OBJECT(gtkconv->imhtml), "transient_chat",
3164 chat, (GDestroyNotify)purple_blist_remove_chat); 3172 chat, (GDestroyNotify)purple_blist_remove_chat);

mercurial