Skip to content
Snippets Groups Projects
Commit 91215147 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

don't open a tabbedchat or a groupchat window over another one

parent 2c016fdd
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,8 @@ def __init__(self, room_jid, nick, account):
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'))
......
......@@ -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)
......
......@@ -81,7 +81,8 @@ def __init__(self, contact, account):
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'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment