aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-04-21 04:33:53 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-04-21 04:33:53 +0800
commite8abbdfc6887557b81768ddb9fd9d0c0884bd7f0 (patch)
treebd3805406839658092bcf8e6a5ea9178270099a0 /libempathy-gtk/empathy-chat.c
parent53d5660631a79613346839bd00814dc6859d647d (diff)
downloadgsoc2013-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/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c22
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);
}