pidgin/pidgin

a4eb488f88ae
Parents 4951752ad038
Children 720a07f05cae
Remove redundant write_chat and write_im implementations
--- a/finch/gntconv.c Fri May 23 09:20:34 2014 +0200
+++ b/finch/gntconv.c Fri May 23 09:44:04 2014 +0200
@@ -1090,45 +1090,6 @@
}
static void
-finch_write_chat(PurpleChatConversation *chat, PurpleMessage *msg)
-{
- purple_conversation_write(PURPLE_CONVERSATION(chat),
- purple_message_get_author(msg),
- purple_message_get_contents(msg),
- purple_message_get_flags(msg),
- purple_message_get_time(msg));
-}
-
-static void
-finch_write_im(PurpleIMConversation *im, PurpleMessage *msg)
-{
- PurpleConversation *conv = PURPLE_CONVERSATION(im);
- PurpleAccount *account = purple_conversation_get_account(conv);
- PurpleMessageFlags flags = purple_message_get_flags(msg);
- const gchar *who = purple_message_get_author(msg);
-
- if (flags & PURPLE_MESSAGE_SEND)
- {
- who = purple_connection_get_display_name(purple_account_get_connection(account));
- if (!who)
- who = purple_account_get_private_alias(account);
- if (!who)
- who = purple_account_get_username(account);
- }
- else if (flags & PURPLE_MESSAGE_RECV)
- {
- PurpleBuddy *buddy;
- who = purple_conversation_get_name(conv);
- buddy = purple_blist_find_buddy(account, who);
- if (buddy)
- who = purple_buddy_get_contact_alias(buddy);
- }
-
- purple_conversation_write(conv, who, purple_message_get_contents(msg),
- flags, purple_message_get_time(msg));
-}
-
-static void
finch_write_conv(PurpleConversation *conv, const char *who, const char *alias,
const char *message, PurpleMessageFlags flags, time_t mtime)
{
@@ -1266,8 +1227,8 @@
{
finch_create_conversation,
finch_destroy_conversation,
- finch_write_chat,
- finch_write_im,
+ NULL, /* write_chat */
+ NULL, /* write_im */
finch_write_conv,
finch_chat_add_users,
finch_chat_rename_user,
--- a/pidgin/gtkconv.c Fri May 23 09:20:34 2014 +0200
+++ b/pidgin/gtkconv.c Fri May 23 09:44:04 2014 +0200
@@ -6202,32 +6202,6 @@
g_free(gtkconv);
}
-
-static void
-pidgin_conv_write_im(PurpleIMConversation *im, PurpleMessage *msg)
-{
- PidginConversation *gtkconv;
- PurpleConversation *conv = PURPLE_CONVERSATION(im);
- PurpleMessageFlags flags = purple_message_get_flags(msg);
-
- gtkconv = PIDGIN_CONVERSATION(conv);
-
- if (conv != gtkconv->active_conv &&
- flags & PURPLE_MESSAGE_ACTIVE_ONLY)
- {
- /* Plugins that want these messages suppressed should be
- * calling purple_im_conversation_write_message(), so they get suppressed here,
- * before being written to the log. */
- purple_debug_info("gtkconv",
- "Suppressing message for an inactive conversation in pidgin_conv_write_im()\n");
- return;
- }
-
- purple_conversation_write(conv, purple_message_get_author(msg),
- purple_message_get_contents(msg), flags,
- purple_message_get_time(msg));
-}
-
#if 0
static const char *
get_text_tag_color(GtkTextTag *tag)
@@ -7745,7 +7719,7 @@
pidgin_conv_new,
pidgin_conv_destroy, /* destroy_conversation */
NULL, /* write_chat */
- pidgin_conv_write_im, /* write_im */
+ NULL, /* write_im */
pidgin_conv_write_conv, /* write_conv */
pidgin_conv_chat_add_users, /* chat_add_users */
pidgin_conv_chat_rename_user, /* chat_rename_user */