aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-01-10 00:15:31 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-10 00:15:31 +0800
commitc870b1b51063dff7e5218d8bd6bdc565cb69b577 (patch)
tree4cb2431426467c02ae36c1c38cc3a4da90a1f5f6 /libempathy-gtk
parenteba71b838f543c7dd9390e74911526cf3d48fa26 (diff)
downloadgsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.gz
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.bz2
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.lz
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.xz
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.tar.zst
gsoc2013-empathy-c870b1b51063dff7e5218d8bd6bdc565cb69b577.zip
Let a chatroom keep a reference to a its TpChat if applicable
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2189
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-contact-menu.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index 91138e293..e3fb3c9f7 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -301,20 +301,20 @@ room_sub_menu_activate_cb (GtkWidget *item,
{
TpHandle handle;
GArray handles = {(gchar *) &handle, 1};
+ EmpathyTpChat *chat;
TpChannel *channel;
- g_object_get (data->chatroom, "tp-channel", &channel, NULL);
- if (channel == NULL) {
+ chat = empathy_chatroom_get_tp_chat (data->chatroom);
+ if (chat == NULL) {
/* channel was invalidated. Ignoring */
return;
}
/* 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);
-
- g_object_unref (channel);
}
static GtkWidget *
@@ -362,17 +362,13 @@ empathy_contact_invite_menu_item_new (EmpathyContact *contact)
for (l = rooms; l != NULL; l = g_list_next (l)) {
EmpathyChatroom *chatroom = l->data;
- TpChannel *channel;
- g_object_get (chatroom, "tp-channel", &channel, NULL);
- if (channel != NULL) {
+ if (empathy_chatroom_get_tp_chat (chatroom) != NULL) {
have_rooms = TRUE;
room_item = create_room_sub_menu (contact, chatroom);
gtk_menu_shell_append (submenu_shell, room_item);
gtk_widget_show (room_item);
-
- g_object_unref (channel);
}
}