[empathy] explicitely pass the show state to empathy_chat_set_show_contacts
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] explicitely pass the show state to empathy_chat_set_show_contacts
- Date: Mon, 7 Dec 2009 15:20:35 +0000 (UTC)
commit 31b467503ba8705c32b3de475f543a2fabd6cba6
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Dec 7 14:39:54 2009 +0000
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 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 6923820..2562221 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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]