aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-chat-window.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-06-08 01:23:21 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-06-08 01:23:21 +0800
commit009bc0da7bc2192194cd7dbe88f90e0184570b38 (patch)
tree9ec6ac98d3273ea2860abaa40903cb34372b43d3 /src/empathy-chat-window.c
parent9ddfc7ec17b25b1b02f30639e291b80be85b9a5f (diff)
downloadgsoc2013-empathy-009bc0da7bc2192194cd7dbe88f90e0184570b38.tar
gsoc2013-empathy-009bc0da7bc2192194cd7dbe88f90e0184570b38.tar.gz
gsoc2013-empathy-009bc0da7bc2192194cd7dbe88f90e0184570b38.tar.bz2
gsoc2013-empathy-009bc0da7bc2192194cd7dbe88f90e0184570b38.tar.lz
gsoc2013-empathy-009bc0da7bc2192194cd7dbe88f90e0184570b38.tar.xz
gsoc2013-empathy-009bc0da7bc2192194cd7dbe88f90e0184570b38.tar.zst
gsoc2013-empathy-009bc0da7bc2192194cd7dbe88f90e0184570b38.zip
Set position/size of chat window only when adding the first chat. Fixes bug #536391 (Ross Burton).
svn path=/trunk/; revision=1153
Diffstat (limited to 'src/empathy-chat-window.c')
-rw-r--r--src/empathy-chat-window.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 1db873b5a..8be64a3d8 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1299,20 +1299,23 @@ empathy_chat_window_add_chat (EmpathyChatWindow *window,
/* Reference the chat object */
g_object_ref (chat);
- empathy_geometry_load (chat_get_window_id_for_geometry (chat), &x, &y, &w, &h);
-
- if (x >= 0 && y >= 0) {
- /* Let the window manager position it if we don't have
- * good x, y coordinates.
- */
- gtk_window_move (GTK_WINDOW (priv->dialog), x, y);
- }
-
- if (w > 0 && h > 0) {
- /* Use the defaults from the glade file if we don't have
- * good w, h geometry.
- */
- gtk_window_resize (GTK_WINDOW (priv->dialog), w, h);
+ /* If this window has just been created, position it */
+ if (priv->chats == NULL) {
+ empathy_geometry_load (chat_get_window_id_for_geometry (chat), &x, &y, &w, &h);
+
+ if (x >= 0 && y >= 0) {
+ /* Let the window manager position it if we don't have
+ * good x, y coordinates.
+ */
+ gtk_window_move (GTK_WINDOW (priv->dialog), x, y);
+ }
+
+ if (w > 0 && h > 0) {
+ /* Use the defaults from the glade file if we don't have
+ * good w, h geometry.
+ */
+ gtk_window_resize (GTK_WINDOW (priv->dialog), w, h);
+ }
}
child = GTK_WIDGET (chat);