[empathy] Avoid to completely hide the last saved window when creating a new one
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Avoid to completely hide the last saved window when creating a new one
- Date: Wed, 29 Sep 2010 10:52:44 +0000 (UTC)
commit e3ec7ef3fac49d470573eed6f31fd2e39ab72c40
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Sep 22 15:33:59 2010 +0200
Avoid to completely hide the last saved window when creating a new one
src/empathy-chat-window.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 346c23a..66c4e96 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -2192,11 +2192,21 @@ empathy_chat_window_add_chat (EmpathyChatWindow *window,
name = "room-window";
if (separate_windows) {
+ gint x, y;
+
+ /* Save current position of the window */
+ gtk_window_get_position (GTK_WINDOW (priv->dialog), &x, &y);
+
/* 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);
+ /* Restore previous position of the window so the newly created window
+ * won't be in the same position as the latest saved window and so
+ * completely hide it. */
+ gtk_window_move (GTK_WINDOW (priv->dialog), x, y);
+
/* 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]