pidgin: 0b9d3da5: Try to get a hashtable created by the pr...
sadrul at pidgin.im
sadrul at pidgin.im
Sun May 25 12:20:48 EDT 2008
-----------------------------------------------------------------
Revision: 0b9d3da51576b05d37b8902cbf1cbac591f22eb1
Ancestor: f28a758a8344c88a83bfc3be1f70311a644780b3
Author: sadrul at pidgin.im
Date: 2008-05-25T16:08:26
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0b9d3da51576b05d37b8902cbf1cbac591f22eb1
Modified files:
pidgin/gtkconv.c
ChangeLog:
Try to get a hashtable created by the prpl first before joining a chat
not in the buddylist. This gets rid of a runtime warning when trying to
show the tooltip for a chat not in the buddylist (XMPP).
-------------- next part --------------
============================================================
--- pidgin/gtkconv.c fc866c385139d7c2b7593e455004217c87b29ccf
+++ pidgin/gtkconv.c 868e50f002483c415ff9324968ab8b798eecea99
@@ -3153,10 +3153,18 @@ populate_menu_with_options(GtkWidget *me
if ((chat == NULL) && (gtkconv->imhtml != NULL)) {
GHashTable *components;
- components = g_hash_table_new_full(g_str_hash, g_str_equal,
- g_free, g_free);
- g_hash_table_replace(components, g_strdup("channel"),
- g_strdup(conv->name));
+ PurpleAccount *account = purple_conversation_get_account(conv);
+ PurplePlugin *prpl = purple_find_prpl(purple_account_get_protocol_id(account));
+ PurplePluginProtocolInfo *prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
+ if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, chat_info_defaults)) {
+ components = prpl_info->chat_info_defaults(purple_account_get_connection(account),
+ purple_conversation_get_name(conv));
+ } else {
+ components = g_hash_table_new_full(g_str_hash, g_str_equal,
+ g_free, g_free);
+ g_hash_table_replace(components, g_strdup("channel"),
+ g_strdup(purple_conversation_get_name(conv)));
+ }
chat = purple_chat_new(conv->account, NULL, components);
purple_blist_node_set_flags((PurpleBlistNode *)chat,
PURPLE_BLIST_NODE_FLAG_NO_SAVE);
More information about the Commits
mailing list