aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-07 22:39:54 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-07 22:39:54 +0800
commit31b467503ba8705c32b3de475f543a2fabd6cba6 (patch)
tree66ea1e6996f40243941e8ea71b680c782c581022 /libempathy-gtk
parenteecff5c85657bd20626ad9cb426a79a66eb771a6 (diff)
downloadgsoc2013-empathy-31b467503ba8705c32b3de475f543a2fabd6cba6.tar
gsoc2013-empathy-31b467503ba8705c32b3de475f543a2fabd6cba6.tar.gz
gsoc2013-empathy-31b467503ba8705c32b3de475f543a2fabd6cba6.tar.bz2
gsoc2013-empathy-31b467503ba8705c32b3de475f543a2fabd6cba6.tar.lz
gsoc2013-empathy-31b467503ba8705c32b3de475f543a2fabd6cba6.tar.xz
gsoc2013-empathy-31b467503ba8705c32b3de475f543a2fabd6cba6.tar.zst
gsoc2013-empathy-31b467503ba8705c32b3de475f543a2fabd6cba6.zip
explicitely pass the show state to empathy_chat_set_show_contacts
This will allow us to show/hide the contact list without changing priv->show_contacts.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 692382078..256222118 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1850,18 +1850,20 @@ chat_reset_size_request (gpointer widget)
}
static void
-chat_update_contacts_visibility (EmpathyChat *chat)
+chat_update_contacts_visibility (EmpathyChat *chat,
+ gboolean show)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
- gboolean show;
GtkAllocation allocation;
- show = priv->remote_contact == NULL && priv->show_contacts;
-
if (!priv->scrolled_window_contacts) {
return;
}
+ if (priv->remote_contact != NULL) {
+ show = FALSE;
+ }
+
if (show && priv->contact_list_view == NULL) {
EmpathyContactListStore *store;
gint min_width;
@@ -1912,7 +1914,7 @@ empathy_chat_set_show_contacts (EmpathyChat *chat,
priv->show_contacts = show;
- chat_update_contacts_visibility (chat);
+ chat_update_contacts_visibility (chat, show);
g_object_notify (G_OBJECT (chat), "show-contacts");
}
@@ -1942,7 +1944,7 @@ chat_remote_contact_changed_cb (EmpathyChat *chat)
g_object_get (channel, "handle-type", &priv->handle_type, NULL);
}
- chat_update_contacts_visibility (chat);
+ chat_update_contacts_visibility (chat, priv->show_contacts);
g_object_notify (G_OBJECT (chat), "remote-contact");
g_object_notify (G_OBJECT (chat), "id");