From 87a039507241c49c2cf6aeaf288c90a72c7119e3 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 22 Sep 2010 15:26:47 +0200 Subject: chat-window: remember the geometry of the last saved window This way new chat window have this geometry rather than the default one. --- src/empathy-chat-window.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index bc50355a5..346c23a85 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -2188,12 +2188,19 @@ empathy_chat_window_add_chat (EmpathyChatWindow *window, g_object_unref (gsettings); + if (empathy_chat_is_room (chat)) + name = "room-window"; + if (separate_windows) { + /* First bind to the 'generic' name. So new window for which we didn't + * save a geometry yet will have the geometry of the last saved + * window (bgo #601191). */ + empathy_geometry_bind (GTK_WINDOW (priv->dialog), name); + + /* Then bind it to the name of the contact/room so we'll save the + * geometry specific to this window */ name = empathy_chat_get_id (chat); } - else if (empathy_chat_is_room (chat)) { - name = "room-window"; - } empathy_geometry_bind (GTK_WINDOW (priv->dialog), name); } -- cgit v1.2.3