[empathy: 11/17] [EmpathyContactMenu] Replace raw Tp call with existing abstraction



commit 901c4d9b608d764a894c4a4a9df803c3e06a6ab3
Author: Danielle Madeley <danielle madeley collabora co uk>
Date:   Mon Dec 21 11:04:39 2009 +1100

    [EmpathyContactMenu] Replace raw Tp call with existing abstraction
    
    This was the place I'd copied my code from. However it makes a lot of sense to
    use the same abstraction here too.

 libempathy-gtk/empathy-contact-menu.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index 4e1adfa..3d022a8 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -483,10 +483,7 @@ static void
 room_sub_menu_activate_cb (GtkWidget *item,
 			   RoomSubMenuData *data)
 {
-	TpHandle handle;
-	GArray handles = {(gchar *) &handle, 1};
 	EmpathyTpChat *chat;
-	TpChannel *channel;
 
 	chat = empathy_chatroom_get_tp_chat (data->chatroom);
 	if (chat == NULL) {
@@ -495,10 +492,8 @@ room_sub_menu_activate_cb (GtkWidget *item,
 	}
 
 	/* send invitation */
-	handle = empathy_contact_get_handle (data->contact);
-	channel = empathy_tp_chat_get_channel (chat);
-	tp_cli_channel_interface_group_call_add_members (channel, -1, &handles,
-		_("Inviting to this room"), NULL, NULL, NULL, NULL);
+	empathy_contact_list_add (EMPATHY_CONTACT_LIST (chat), data->contact,
+		_("Inviting you to this room"));
 }
 
 static GtkWidget *



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