pidgin/pidgin

Switch sent-chat-msg to PurpleMessage

2014-05-22, Tomasz Wasilczyk
247d94c903c3
Parents 6764e037a308
Children bb50003b96d0
Switch sent-chat-msg to PurpleMessage
--- a/finch/gntsound.c Thu May 22 16:52:23 2014 +0200
+++ b/finch/gntsound.c Thu May 22 16:57:07 2014 +0200
@@ -230,8 +230,8 @@
}
static void
-chat_msg_sent_cb(PurpleAccount *account, const char *message,
- int id, PurpleSoundEventID event)
+chat_msg_sent_cb(PurpleAccount *account, PurpleMessage *msg, int id,
+ PurpleSoundEventID event)
{
PurpleConnection *conn = purple_account_get_connection(account);
PurpleChatConversation *chat = NULL;
--- a/libpurple/conversation.c Thu May 22 16:52:23 2014 +0200
+++ b/libpurple/conversation.c Thu May 22 16:57:07 2014 +0200
@@ -162,9 +162,8 @@
if (!purple_message_is_empty(msg)) {
err = purple_serv_chat_send(gc, id, msg);
- /* TODO: use msg! */
- purple_signal_emit(purple_conversations_get_handle(), "sent-chat-msg",
- account, sent, id);
+ purple_signal_emit(purple_conversations_get_handle(),
+ "sent-chat-msg", account, msg, id);
}
}
--- a/libpurple/conversations.c Thu May 22 16:52:23 2014 +0200
+++ b/libpurple/conversations.c Thu May 22 16:57:07 2014 +0200
@@ -346,8 +346,8 @@
3, PURPLE_TYPE_ACCOUNT, PURPLE_TYPE_MESSAGE, G_TYPE_UINT);
purple_signal_register(handle, "sent-chat-msg",
- purple_marshal_VOID__POINTER_POINTER_UINT, G_TYPE_NONE,
- 3, PURPLE_TYPE_ACCOUNT, G_TYPE_STRING, G_TYPE_UINT);
+ purple_marshal_VOID__POINTER_POINTER_UINT, G_TYPE_NONE,
+ 3, PURPLE_TYPE_ACCOUNT, PURPLE_TYPE_MESSAGE, G_TYPE_UINT);
purple_signal_register(handle, "receiving-chat-msg",
purple_marshal_BOOLEAN__POINTER_POINTER_POINTER_POINTER_POINTER,
--- a/libpurple/plugins/signals-test.c Thu May 22 16:52:23 2014 +0200
+++ b/libpurple/plugins/signals-test.c Thu May 22 16:57:07 2014 +0200
@@ -368,10 +368,11 @@
}
static void
-sent_chat_msg_cb(PurpleAccount *account, const char *buffer, int id, void *data)
+sent_chat_msg_cb(PurpleAccount *account, PurpleMessage *msg, int id, void *data)
{
purple_debug_misc("signals test", "sent-chat-msg (%s, %s, %d)\n",
- purple_account_get_username(account), buffer, id);
+ purple_account_get_username(account),
+ purple_message_get_contents(msg), id);
}
static gboolean
--- a/libpurple/protocols/irc/cmds.c Thu May 22 16:52:23 2014 +0200
+++ b/libpurple/protocols/irc/cmds.c Thu May 22 16:57:07 2014 +0200
@@ -172,7 +172,7 @@
"sent-im-msg", irc->account, pmsg);
} else {
purple_signal_emit(purple_conversations_get_handle(),
- "sent-chat-msg", irc->account, msg,
+ "sent-chat-msg", irc->account, pmsg,
purple_chat_conversation_get_id(PURPLE_CHAT_CONVERSATION(convo)));
}
--- a/pidgin/gtksound.c Thu May 22 16:52:23 2014 +0200
+++ b/pidgin/gtksound.c Thu May 22 16:57:07 2014 +0200
@@ -177,8 +177,8 @@
}
static void
-chat_msg_sent_cb(PurpleAccount *account, const char *message,
- int id, PurpleSoundEventID event)
+chat_msg_sent_cb(PurpleAccount *account, PurpleMessage *msg, int id,
+ PurpleSoundEventID event)
{
PurpleConnection *conn = purple_account_get_connection(account);
PurpleConversation *conv = NULL;
--- a/pidgin/plugins/notify.c Thu May 22 16:52:23 2014 +0200
+++ b/pidgin/plugins/notify.c Thu May 22 16:57:07 2014 +0200
@@ -285,7 +285,7 @@
}
static void
-chat_sent_im(PurpleAccount *account, const char *message, int id)
+chat_sent_im(PurpleAccount *account, PurpleMessage *msg, int id)
{
PurpleChatConversation *chat = NULL;
--- a/pidgin/plugins/unity.c Thu May 22 16:52:23 2014 +0200
+++ b/pidgin/plugins/unity.c Thu May 22 16:57:07 2014 +0200
@@ -206,7 +206,7 @@
}
static void
-chat_sent_im(PurpleAccount *account, const char *message, int id)
+chat_sent_im(PurpleAccount *account, PurpleMessage *msg, int id)
{
PurpleChatConversation *chat = NULL;
chat = purple_conversations_find_chat(purple_account_get_connection(account), id);