empathy r1034 - in trunk: libempathy src



Author: xclaesse
Date: Wed Apr 23 14:30:31 2008
New Revision: 1034
URL: http://svn.gnome.org/viewvc/empathy?rev=1034&view=rev

Log:
Fix some warnings with roomlist


Modified:
   trunk/libempathy/empathy-tp-roomlist.c
   trunk/src/empathy-new-chatroom-dialog.c

Modified: trunk/libempathy/empathy-tp-roomlist.c
==============================================================================
--- trunk/libempathy/empathy-tp-roomlist.c	(original)
+++ trunk/libempathy/empathy-tp-roomlist.c	Wed Apr 23 14:30:31 2008
@@ -344,20 +344,23 @@
 EmpathyTpRoomlist *
 empathy_tp_roomlist_new (McAccount *account)
 {
-	MissionControl *mc;
-	TpConnection   *connection;
+	EmpathyTpRoomlist *list;
+	MissionControl    *mc;
+	TpConnection      *connection;
 
 	g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
 
 	mc = empathy_mission_control_new ();
 	connection = mission_control_get_tpconnection (mc, account, NULL);
 
-	return g_object_new (EMPATHY_TYPE_TP_ROOMLIST,
+	list = g_object_new (EMPATHY_TYPE_TP_ROOMLIST,
 			     "connection", connection,
 			     NULL);
 
 	g_object_unref (mc);
 	g_object_unref (connection);
+
+	return list;
 }
 
 gboolean
@@ -376,6 +379,7 @@
 	EmpathyTpRoomlistPriv *priv = GET_PRIV (list);
 
 	g_return_if_fail (EMPATHY_IS_TP_ROOMLIST (list));
+	g_return_if_fail (TP_IS_CHANNEL (priv->channel));
 
 	tp_cli_channel_type_room_list_call_list_rooms (priv->channel, -1,
 						       NULL, NULL, NULL,
@@ -388,6 +392,7 @@
 	EmpathyTpRoomlistPriv *priv = GET_PRIV (list);
 
 	g_return_if_fail (EMPATHY_IS_TP_ROOMLIST (list));
+	g_return_if_fail (TP_IS_CHANNEL (priv->channel));
 
 	tp_cli_channel_type_room_list_call_stop_listing (priv->channel, -1,
 							 NULL, NULL, NULL,

Modified: trunk/src/empathy-new-chatroom-dialog.c
==============================================================================
--- trunk/src/empathy-new-chatroom-dialog.c	(original)
+++ trunk/src/empathy-new-chatroom-dialog.c	Wed Apr 23 14:30:31 2008
@@ -95,7 +95,7 @@
 								     EmpathyChatroom          *chatroom,
 								     EmpathyNewChatroomDialog *dialog);
 static void     new_chatroom_dialog_listing_cb                      (EmpathyTpRoomlist        *room_list,
-								     gboolean                  listing,
+								     gpointer                  unused,
 								     EmpathyNewChatroomDialog *dialog);
 static void     new_chatroom_dialog_model_clear                     (EmpathyNewChatroomDialog *dialog);
 static void     new_chatroom_dialog_model_row_activated_cb          (GtkTreeView             *tree_view,
@@ -366,7 +366,7 @@
 		g_signal_connect (dialog->room_list, "new-room",
 				  G_CALLBACK (new_chatroom_dialog_new_room_cb),
 				  dialog);
-		g_signal_connect (dialog->room_list, "listing",
+		g_signal_connect (dialog->room_list, "notify::listing",
 				  G_CALLBACK (new_chatroom_dialog_listing_cb),
 				  dialog);
 
@@ -415,9 +415,13 @@
 
 static void
 new_chatroom_dialog_listing_cb (EmpathyTpRoomlist        *room_list,
-				gboolean                  listing,
+				gpointer                  unused,
 				EmpathyNewChatroomDialog *dialog)
 {
+	gboolean listing;
+
+	listing = empathy_tp_roomlist_is_listing (room_list);
+
 	/* Update the throbber */
 	if (listing) {
 		ephy_spinner_start (EPHY_SPINNER (dialog->throbber));		



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