aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-06-08 01:23:21 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2008-06-08 01:23:21 +0800
commit0d5baca9605d9142eb1d80d2fbc598fe1ff24a93 (patch)
tree9ec6ac98d3273ea2860abaa40903cb34372b43d3 /src
parent7a846e45a65670e9afb7daa6ab0385e2e5d07303 (diff)
downloadgsoc2013-empathy-0d5baca9605d9142eb1d80d2fbc598fe1ff24a93.tar
gsoc2013-empathy-0d5baca9605d9142eb1d80d2fbc598fe1ff24a93.tar.gz
gsoc2013-empathy-0d5baca9605d9142eb1d80d2fbc598fe1ff24a93.tar.bz2
gsoc2013-empathy-0d5baca9605d9142eb1d80d2fbc598fe1ff24a93.tar.lz
gsoc2013-empathy-0d5baca9605d9142eb1d80d2fbc598fe1ff24a93.tar.xz
gsoc2013-empathy-0d5baca9605d9142eb1d80d2fbc598fe1ff24a93.tar.zst
gsoc2013-empathy-0d5baca9605d9142eb1d80d2fbc598fe1ff24a93.zip
Set position/size of chat window only when adding the first chat. Fixes bug #536391 (Ross Burton).
git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@1153 4ee84921-47dd-4033-b63a-18d7a039a3e4
Diffstat (limited to 'src')
-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);