/soc/2013/ankitkv/gobjectification: 014583658b51: Refactored lib...
Ankit Vani
a at nevitus.org
Sun Jun 23 08:14:19 EDT 2013
Changeset: 014583658b5144eb7fd9f2f891548fef9fecabbd
Author: Ankit Vani <a at nevitus.org>
Date: 2013-06-23 17:44 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/014583658b51
Description:
Refactored libpurple/plugins to use the GObject-based PurpleConversation
diffstat:
libpurple/plugins/joinpart.c | 2 +-
libpurple/plugins/offlinemsg.c | 2 +-
libpurple/plugins/psychic.c | 2 +-
libpurple/plugins/statenotify.c | 4 +++-
4 files changed, 6 insertions(+), 4 deletions(-)
diffs (50 lines):
diff --git a/libpurple/plugins/joinpart.c b/libpurple/plugins/joinpart.c
--- a/libpurple/plugins/joinpart.c
+++ b/libpurple/plugins/joinpart.c
@@ -88,7 +88,7 @@ static gboolean should_hide_notice(Purpl
g_return_val_if_fail(PURPLE_IS_CHAT_CONVERSATION(conv), FALSE);
/* If the room is small, don't bother. */
- chat = PURPLE_CONV_CHAT(conv);
+ chat = PURPLE_CHAT_CONVERSATION(conv);
threshold = purple_prefs_get_int(THRESHOLD_PREF);
if (g_list_length(purple_chat_conversation_get_users(chat)) < threshold)
return FALSE;
diff --git a/libpurple/plugins/offlinemsg.c b/libpurple/plugins/offlinemsg.c
--- a/libpurple/plugins/offlinemsg.c
+++ b/libpurple/plugins/offlinemsg.c
@@ -105,7 +105,7 @@ record_pounce(OfflineMsg *offline)
purple_conversation_set_data(conv, "plugin_pack:offlinemsg",
GINT_TO_POINTER(OFFLINE_MSG_YES));
- purple_im_conversation_write_message(PURPLE_CONV_IM(conv), offline->who, offline->message,
+ purple_conversation_write_message(conv, offline->who, offline->message,
PURPLE_MESSAGE_SEND, time(NULL));
discard_data(offline);
diff --git a/libpurple/plugins/psychic.c b/libpurple/plugins/psychic.c
--- a/libpurple/plugins/psychic.c
+++ b/libpurple/plugins/psychic.c
@@ -74,7 +74,7 @@ buddy_typing_cb(PurpleAccount *acct, con
}
/* Necessary because we may be creating a new conversation window. */
- purple_im_conversation_set_typing_state(PURPLE_CONV_IM(gconv), PURPLE_IM_CONVERSATION_TYPING);
+ purple_im_conversation_set_typing_state(PURPLE_IM_CONVERSATION(gconv), PURPLE_IM_CONVERSATION_TYPING);
}
}
diff --git a/libpurple/plugins/statenotify.c b/libpurple/plugins/statenotify.c
--- a/libpurple/plugins/statenotify.c
+++ b/libpurple/plugins/statenotify.c
@@ -41,7 +41,9 @@ write_status(PurpleBuddy *buddy, const c
g_snprintf(buf, sizeof(buf), message, escaped);
g_free(escaped);
- purple_im_conversation_write_message(PURPLE_CONV_IM(conv), NULL, buf, PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_ACTIVE_ONLY | PURPLE_MESSAGE_NO_LINKIFY, time(NULL));
+ purple_conversation_write_message(conv, NULL, buf,
+ PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_ACTIVE_ONLY | PURPLE_MESSAGE_NO_LINKIFY,
+ time(NULL));
}
static void
More information about the Commits
mailing list