}
}
+static gboolean
+chat_reset_size_request (gpointer widget)
+{
+ gtk_widget_set_size_request (widget, -1, -1);
+
+ return FALSE;
+}
+
static void
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 {
+ gtk_paned_set_position (GTK_PANED (priv->hpaned),
+ priv->contacts_width);
+ }
gtk_widget_show (priv->scrolled_window_contacts);
- gtk_paned_set_position (GTK_PANED (priv->hpaned),
- priv->contacts_width);
} else {
priv->contacts_width = gtk_paned_get_position (GTK_PANED (priv->hpaned));
gtk_widget_hide (priv->scrolled_window_contacts);
gtk_container_add (GTK_CONTAINER (priv->scrolled_window_contacts),
GTK_WIDGET (priv->view));
gtk_widget_show (GTK_WIDGET (priv->view));
+ chat_set_show_contacts (chat, priv->remote_contact == NULL);
/* Initialy hide the topic, will be shown if not empty */
gtk_widget_hide (priv->hbox_topic);
- /* Show/Hide contact list */
- chat_set_show_contacts (chat, priv->remote_contact == NULL);
-
/* Set widget focus order */
list = g_list_append (NULL, priv->scrolled_window_input);
gtk_container_set_focus_chain (GTK_CONTAINER (priv->vbox_left), list);
priv->is_first_char = TRUE;
priv->log_manager = empathy_log_manager_new ();
priv->default_window_height = -1;
+ priv->contacts_width = -1;
priv->vscroll_visible = FALSE;
priv->sent_messages = NULL;
priv->sent_messages_index = -1;
<property name="can_focus">True</property>
<child>
<widget class="GtkVBox" id="vbox_left">
- <property name="width_request">600</property>
- <property name="height_request">500</property>
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
</child>
</widget>
<packing>
- <property name="resize">True</property>
+ <property name="resize">False</property>
<property name="shrink">True</property>
</packing>
</child>