diff options
-rw-r--r-- | libempathy-gtk/empathy-individual-menu.c | 3 | ||||
-rw-r--r-- | libempathy/empathy-tp-chat.c | 7 | ||||
-rw-r--r-- | libempathy/empathy-tp-chat.h | 4 | ||||
-rw-r--r-- | src/empathy-chat-window.c | 5 |
4 files changed, 9 insertions, 10 deletions
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c index 22d314882..478170fb3 100644 --- a/libempathy-gtk/empathy-individual-menu.c +++ b/libempathy-gtk/empathy-individual-menu.c @@ -1560,8 +1560,7 @@ room_sub_menu_activate_cb (GtkWidget *item, g_return_if_fail (EMPATHY_IS_CONTACT (contact)); /* send invitation */ - empathy_contact_list_add (EMPATHY_CONTACT_LIST (chat), - contact, _("Inviting you to this room")); + empathy_tp_chat_add (chat, contact, _("Inviting you to this room")); out: g_object_unref (contact); diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index f3a3aa832..28c0e2a19 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -157,12 +157,11 @@ create_conference_cb (GObject *source, } } -static void -tp_chat_add (EmpathyContactList *list, +void +empathy_tp_chat_add (EmpathyTpChat *self, EmpathyContact *contact, const gchar *message) { - EmpathyTpChat *self = (EmpathyTpChat *) list; TpChannel *channel = (TpChannel *) self; if (tp_proxy_has_interface_by_id (self, @@ -171,7 +170,6 @@ tp_chat_add (EmpathyContactList *list, TpHandle handle; GArray handles = {(gchar *) &handle, 1}; - g_return_if_fail (EMPATHY_IS_TP_CHAT (list)); g_return_if_fail (EMPATHY_IS_CONTACT (contact)); handle = empathy_contact_get_handle (contact); @@ -1326,7 +1324,6 @@ empathy_tp_chat_init (EmpathyTpChat *self) static void tp_chat_iface_init (EmpathyContactListIface *iface) { - iface->add = tp_chat_add; iface->remove = tp_chat_remove; iface->get_members = tp_chat_get_members; } diff --git a/libempathy/empathy-tp-chat.h b/libempathy/empathy-tp-chat.h index 7da675c32..adb2ee1c5 100644 --- a/libempathy/empathy-tp-chat.h +++ b/libempathy/empathy-tp-chat.h @@ -103,6 +103,10 @@ TpChannelChatState empathy_tp_chat_get_chat_state (EmpathyTpChat *chat, EmpathyContact * empathy_tp_chat_get_self_contact (EmpathyTpChat *self); +void empathy_tp_chat_add (EmpathyTpChat *self, + EmpathyContact *contact, + const gchar *message); + G_END_DECLS #endif /* __EMPATHY_TP_CHAT_H__ */ diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index ac3584f34..0d49fcb89 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -1188,8 +1188,7 @@ chat_window_invite_participant_activate_cb (GtkAction *action, contact = empathy_contact_dup_from_tp_contact (tp_contact); - empathy_contact_list_add (EMPATHY_CONTACT_LIST (tp_chat), - contact, _("Inviting you to this room")); + empathy_tp_chat_add (tp_chat, contact, _("Inviting you to this room")); g_object_unref (contact); } @@ -2045,7 +2044,7 @@ drag_data_received_individual_id (EmpathyChatWindow *self, tp_channel_get_identifier ((TpChannel *) chat)); contact = empathy_contact_dup_from_tp_contact (tp_contact); - empathy_contact_list_add (EMPATHY_CONTACT_LIST (chat), contact, NULL); + empathy_tp_chat_add (chat, contact, NULL); g_object_unref (contact); out: |