]> git.0d.be Git - empathy.git/commitdiff
[EmpathyContactMenu] Replace raw Tp call with existing abstraction
authorDanielle Madeley <danielle.madeley@collabora.co.uk>
Mon, 21 Dec 2009 00:04:39 +0000 (11:04 +1100)
committerDanielle Madeley <danielle.madeley@collabora.co.uk>
Mon, 21 Dec 2009 09:55:03 +0000 (20:55 +1100)
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

index 4e1adfa90157596e83da9542b81117a87805c891..3d022a8b06126dfcb17f4745a90799285d6a8f69 100644 (file)
@@ -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 *