gobjectification.conversation: b11ba55b: Remove back-reference to conversation fr...

sadrul at pidgin.im sadrul at pidgin.im
Sat Jul 24 23:10:45 EDT 2010


----------------------------------------------------------------------
Revision: b11ba55bc3eb1f010888678023bc3bd3b83cfb3b
Parent:   2e6c58dd973f5babefca03350dbe02fabc5d4453
Author:   sadrul at pidgin.im
Date:     07/21/10 20:21:03
Branch:   im.pidgin.gobjectification.conversation
URL: http://d.pidgin.im/viewmtn/revision/info/b11ba55bc3eb1f010888678023bc3bd3b83cfb3b

Changelog: 

Remove back-reference to conversation from message.

Changes against parent 2e6c58dd973f5babefca03350dbe02fabc5d4453

  patched  libpurple/conversation/conv-message.c
  patched  libpurple/conversation/conv-message.h
  patched  libpurple/ft.c
  patched  libpurple/log.c
  patched  libpurple/prpl.c
  patched  libpurple/server.c

-------------- next part --------------
============================================================
--- libpurple/server.c	6ea4374624899ed829d393dae740e8b0e42c1c66
+++ libpurple/server.c	77e0f2206e6927255953149830be6cf429c7dd6d
@@ -269,8 +269,7 @@ serv_got_alias(PurpleConnection *gc, con
 
 			purple_conversation_write(conv,
 					purple_message_new(NULL, NULL, tmp,
-					PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NO_LINKIFY,
-					time(NULL), conv));
+						PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_NO_LINKIFY, time(NULL)));
 
 			g_free(tmp);
 			g_free(escaped2);
@@ -619,7 +618,7 @@ void serv_got_im(PurpleConnection *gc, c
 		conv = PURPLE_CONVERSATION(purple_im_new(account, name));
 
 	purple_conversation_write(conv,
-			purple_message_new(name, NULL, message, flags, mtime, conv));
+			purple_message_new(name, NULL, message, flags, mtime));
 	g_free(message);
 
 	/*
@@ -689,8 +688,7 @@ void serv_got_im(PurpleConnection *gc, c
 
 					purple_conversation_write(conv,
 							purple_message_new(NULL, NULL, away_msg,
-									   PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_AUTO_RESP,
-									   mtime, conv));
+								PURPLE_MESSAGE_SEND | PURPLE_MESSAGE_AUTO_RESP, mtime));
 				}
 			}
 		}
@@ -957,7 +955,7 @@ void serv_got_chat_in(PurpleConnection *
 					 who, message, conv, flags);
 
 	purple_conversation_write(conv,
-			purple_message_new(who, NULL, message, flags, mtime, conv));
+			purple_message_new(who, NULL, message, flags, mtime));
 
 	g_free(angel);
 	g_free(buffy);
============================================================
--- libpurple/prpl.c	44dbd258bed13045ab0e6d184efea92e926eb841
+++ libpurple/prpl.c	5bfcfee5fbe1b2881e64e9a0d424423d640dd813
@@ -465,8 +465,8 @@ purple_prpl_send_attention(PurpleConnect
 		return;
 
 	conv = PURPLE_CONVERSATION(purple_im_new(account, who));
-	purple_conversation_write(conv, purple_message_new(NULL, NULL, description,
-				flags, mtime, conv));
+	purple_conversation_write(conv,
+			purple_message_new(NULL, NULL, description, flags, mtime));
 	purple_prpl_attention(conv, who, type_code, PURPLE_MESSAGE_SEND, time(NULL));
 
 	g_free(description);
============================================================
--- libpurple/ft.c	3bd08493f7eb03a1b842dc9874e234e8e6857bb4
+++ libpurple/ft.c	6acb60d7896e2e4b9963c127a1a8ced83e3864c7
@@ -308,12 +308,12 @@ purple_xfer_conversation_write_internal(
 		message_with_img =
 			g_strdup_printf("<img id='%d'> %s", id, escaped);
 		purple_conversation_write(conv,
-				purple_message_new(NULL, NULL, message_with_img, flags, time(NULL), conv));
+				purple_message_new(NULL, NULL, message_with_img, flags, time(NULL)));
 		purple_imgstore_unref_by_id(id);
 		g_free(message_with_img);
 	} else {
 		purple_conversation_write(conv,
-				purple_message_new(NULL, NULL, escaped, flags, time(NULL), conv));
+				purple_message_new(NULL, NULL, escaped, flags, time(NULL)));
 	}
 	g_free(escaped);
 }
@@ -902,7 +902,7 @@ purple_xfer_set_completed(PurpleXfer *xf
 
 		if (conv != NULL)
 			purple_conversation_write(conv,
-					purple_message_new(NULL, NULL, msg, PURPLE_MESSAGE_SYSTEM, time(NULL), conv));
+					purple_message_new(NULL, NULL, msg, PURPLE_MESSAGE_SYSTEM, time(NULL)));
 		g_free(msg);
 	}
 
============================================================
--- libpurple/log.c	171d990d9e401399c3ffd05112681be4a8fdb1bc
+++ libpurple/log.c	5be40c4be1edc8d3099578e98208d44335b837d8
@@ -914,7 +914,7 @@ void purple_log_common_writer(PurpleLog 
 			if (log->conv != NULL)
 				purple_conversation_write(log->conv,
 						purple_message_new(NULL, NULL, _("Logging of this conversation failed."),
-							PURPLE_MESSAGE_ERROR, time(NULL), log->conv));
+							PURPLE_MESSAGE_ERROR, time(NULL)));
 
 			g_free(path);
 			return;
============================================================
--- libpurple/conversation/conv-message.c	be3f9a62615ac08ab8aa1e31a2f6d23f52589920
+++ libpurple/conversation/conv-message.c	bdf605c33fb46ea094aa0fd205fd02377606b7a7
@@ -36,8 +36,7 @@ PurpleMessage *purple_message_new(const 
 
 PurpleMessage *purple_message_new(const char *who,
 		const char *alias, const char *message,
-		PurpleMessageFlags flags, time_t when,
-		PurpleConversation *conv)
+		PurpleMessageFlags flags, time_t when)
 {
 	PurpleMessage *msg = g_new0(PurpleMessage, 1);
 	msg->who = g_strdup(who);
@@ -45,7 +44,6 @@ PurpleMessage *purple_message_new(const 
 	msg->flags = flags;
 	msg->what = g_strdup(message);
 	msg->when = when;
-	msg->conv = conv;
 
 	return msg;
 }
@@ -84,9 +82,3 @@ purple_message_get_alias(PurpleMessage *
 	return msg->alias;
 }
 
-PurpleConversation *
-purple_message_get_conversation(PurpleMessage *msg)
-{
-	return msg->conv;
-}
-
============================================================
--- libpurple/conversation/conv-message.h	936e31d7320071f2dea86b32b0b43b95e22cc9a1
+++ libpurple/conversation/conv-message.h	2121298f2499df7e6f0e53eeefaff7ae339ba8d6
@@ -61,8 +61,7 @@ PurpleMessage *purple_message_new(const 
 
 PurpleMessage *purple_message_new(const char *who,
 		const char *alias, const char *message,
-		PurpleMessageFlags flags, time_t when,
-		PurpleConversation *conv);
+		PurpleMessageFlags flags, time_t when);
 
 /**
  * Get the sender from a PurpleMessage


More information about the Commits mailing list