diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-21 04:33:53 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-04-21 04:33:53 +0800 |
commit | e8abbdfc6887557b81768ddb9fd9d0c0884bd7f0 (patch) | |
tree | bd3805406839658092bcf8e6a5ea9178270099a0 /libempathy-gtk | |
parent | 53d5660631a79613346839bd00814dc6859d647d (diff) | |
download | gsoc2013-empathy-e8abbdfc6887557b81768ddb9fd9d0c0884bd7f0.tar gsoc2013-empathy-e8abbdfc6887557b81768ddb9fd9d0c0884bd7f0.tar.gz gsoc2013-empathy-e8abbdfc6887557b81768ddb9fd9d0c0884bd7f0.tar.bz2 gsoc2013-empathy-e8abbdfc6887557b81768ddb9fd9d0c0884bd7f0.tar.lz gsoc2013-empathy-e8abbdfc6887557b81768ddb9fd9d0c0884bd7f0.tar.xz gsoc2013-empathy-e8abbdfc6887557b81768ddb9fd9d0c0884bd7f0.tar.zst gsoc2013-empathy-e8abbdfc6887557b81768ddb9fd9d0c0884bd7f0.zip |
Don't resize the window when a contact list appear if it's already big enough.
svn path=/trunk/; revision=1016
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 6bb983a5f..85956c812 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -1283,15 +1283,19 @@ chat_set_show_contacts (EmpathyChat *chat, gboolean show) } if (show) { - if (priv->contacts_width <= 0) { - /* It's the first time we show the contact list, make - * sure the chat view don't get resized. Relax the - * size request once it's done. */ - gtk_widget_set_size_request (priv->vbox_left, - priv->vbox_left->allocation.width, - -1); - g_idle_add (chat_reset_size_request, priv->vbox_left); - } else { + gint min_width; + + /* We are adding the contact list to the chat, we don't want the + * chat view to become too small. If the chat view is already + * smaller than 250 make sure that size won't change. If the + * chat view is bigger the contact list will take some space on + * it but we make sure the chat view don't become smaller than + * 250. Relax the size request once the resize is done */ + min_width = MIN (priv->vbox_left->allocation.width, 250); + gtk_widget_set_size_request (priv->vbox_left, min_width, -1); + g_idle_add (chat_reset_size_request, priv->vbox_left); + + if (priv->contacts_width > 0) { gtk_paned_set_position (GTK_PANED (priv->hpaned), priv->contacts_width); } |