diff --git a/src/groupchat_window.py b/src/groupchat_window.py index 73a336541..a5c40b92f 100644 --- a/src/groupchat_window.py +++ b/src/groupchat_window.py @@ -99,7 +99,8 @@ class GroupchatWindow(chat.Chat): self.xml.signal_autoconnect(signal_dict) # get size and position from config - if gajim.config.get('saveposition'): + if gajim.config.get('saveposition') and \ + not gtkgui_helpers.one_window_opened('gc'): gtkgui_helpers.move_window(self.window, gajim.config.get('gc-x-position'), gajim.config.get('gc-y-position')) diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 98df9c589..9e337e20f 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -198,6 +198,14 @@ def resize_window(window, w, h): h = screen_h window.resize(abs(w), abs(h)) +def one_window_opened(typ): + for account in gajim.connections: + if not gajim.interface.windows[account].has_key(typ): + continue + if len(gajim.interface.windows[account][typ]): + return True + return False + class TagInfoHandler(xml.sax.ContentHandler): def __init__(self, tagname1, tagname2): xml.sax.ContentHandler.__init__(self) diff --git a/src/tabbed_chat_window.py b/src/tabbed_chat_window.py index 3fb943c36..34fa458b2 100644 --- a/src/tabbed_chat_window.py +++ b/src/tabbed_chat_window.py @@ -81,7 +81,8 @@ class TabbedChatWindow(chat.Chat): self.xml.signal_autoconnect(signal_dict) - if gajim.config.get('saveposition'): + if gajim.config.get('saveposition') and \ + not gtkgui_helpers.one_window_opened('chats'): # get window position and size from config gtkgui_helpers.move_window(self.window, gajim.config.get('chat-x-position'), gajim.config.get('chat-y-position'))