[empathy] chat-window: remember the geometry of the last saved window



commit 87a039507241c49c2cf6aeaf288c90a72c7119e3
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Sep 22 15:26:47 2010 +0200

    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 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index bc50355..346c23a 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);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]