empathy r2423 - trunk/libempathy



Author: xclaesse
Date: Tue Feb  3 22:21:08 2009
New Revision: 2423
URL: http://svn.gnome.org/viewvc/empathy?rev=2423&view=rev

Log:
Remove repeated casts to EmpathyTpChat

Signed-off-by: Will Thompson <will thompson collabora co uk>

Modified:
   trunk/libempathy/empathy-tp-chat.c

Modified: trunk/libempathy/empathy-tp-chat.c
==============================================================================
--- trunk/libempathy/empathy-tp-chat.c	(original)
+++ trunk/libempathy/empathy-tp-chat.c	Tue Feb  3 22:21:08 2009
@@ -420,8 +420,9 @@
 		     guint        message_flags,
 		     const gchar *message_body,
 		     gpointer     user_data,
-		     GObject     *chat)
+		     GObject     *chat_)
 {
+	EmpathyTpChat *chat = EMPATHY_TP_CHAT (chat_);
 	EmpathyTpChatPriv *priv = GET_PRIV (chat);
 	EmpathyMessage    *message;
 
@@ -442,20 +443,20 @@
 
 		ids = g_array_sized_new (FALSE, FALSE, sizeof (guint), 1);
 		g_array_append_val (ids, message_id);
-		acknowledge_messages (EMPATHY_TP_CHAT (chat), ids);
+		acknowledge_messages (chat, ids);
 		g_array_free (ids, TRUE);
 
 		return;
 	}
 
-	message = tp_chat_build_message (EMPATHY_TP_CHAT (chat),
+	message = tp_chat_build_message (chat,
 					 message_id,
 					 message_type,
 					 timestamp,
 					 from_handle,
 					 message_body);
 
-	tp_chat_emit_or_queue_message (EMPATHY_TP_CHAT (chat), message);
+	tp_chat_emit_or_queue_message (chat, message);
 	g_object_unref (message);
 }
 
@@ -465,8 +466,9 @@
 		 guint        message_type,
 		 const gchar *message_body,
 		 gpointer     user_data,
-		 GObject     *chat)
+		 GObject     *chat_)
 {
+	EmpathyTpChat *chat = EMPATHY_TP_CHAT (chat_);
 	EmpathyTpChatPriv *priv = GET_PRIV (chat);
 	EmpathyMessage *message;
 
@@ -475,14 +477,14 @@
 
 	DEBUG ("Message sent: %s", message_body);
 
-	message = tp_chat_build_message (EMPATHY_TP_CHAT (chat),
+	message = tp_chat_build_message (chat,
 					 0,
 					 message_type,
 					 timestamp,
 					 0,
 					 message_body);
 
-	tp_chat_emit_or_queue_message (EMPATHY_TP_CHAT (chat), message);
+	tp_chat_emit_or_queue_message (chat, message);
 	g_object_unref (message);
 }
 
@@ -558,8 +560,9 @@
 				  const GPtrArray *messages_list,
 				  const GError    *error,
 				  gpointer         user_data,
-				  GObject         *chat)
+				  GObject         *chat_)
 {
+	EmpathyTpChat     *chat = EMPATHY_TP_CHAT (chat_);
 	EmpathyTpChatPriv *priv = GET_PRIV (chat);
 	guint              i;
 	GArray            *empty_non_text_content_ids = NULL;
@@ -607,19 +610,19 @@
 			continue;
 		}
 
-		message = tp_chat_build_message (EMPATHY_TP_CHAT (chat),
+		message = tp_chat_build_message (chat,
 						 message_id,
 						 message_type,
 						 timestamp,
 						 from_handle,
 						 message_body);
 
-		tp_chat_emit_or_queue_message (EMPATHY_TP_CHAT (chat), message);
+		tp_chat_emit_or_queue_message (chat, message);
 		g_object_unref (message);
 	}
 
 	if (empty_non_text_content_ids != NULL) {
-		acknowledge_messages (EMPATHY_TP_CHAT (chat), empty_non_text_content_ids);
+		acknowledge_messages (chat, empty_non_text_content_ids);
 		g_array_free (empty_non_text_content_ids, TRUE);
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]