From 31b467503ba8705c32b3de475f543a2fabd6cba6 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 7 Dec 2009 14:39:54 +0000 Subject: 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. --- libempathy-gtk/empathy-chat.c | 14 ++++++++------ 1 file 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"); -- cgit v1.2.3