don't open a tabbedchat or a groupchat window over another one
This commit is contained in:
parent
2c016fddab
commit
9121514778
|
@ -99,7 +99,8 @@ class GroupchatWindow(chat.Chat):
|
||||||
self.xml.signal_autoconnect(signal_dict)
|
self.xml.signal_autoconnect(signal_dict)
|
||||||
|
|
||||||
# get size and position from config
|
# 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,
|
gtkgui_helpers.move_window(self.window,
|
||||||
gajim.config.get('gc-x-position'),
|
gajim.config.get('gc-x-position'),
|
||||||
gajim.config.get('gc-y-position'))
|
gajim.config.get('gc-y-position'))
|
||||||
|
|
|
@ -198,6 +198,14 @@ def resize_window(window, w, h):
|
||||||
h = screen_h
|
h = screen_h
|
||||||
window.resize(abs(w), abs(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):
|
class TagInfoHandler(xml.sax.ContentHandler):
|
||||||
def __init__(self, tagname1, tagname2):
|
def __init__(self, tagname1, tagname2):
|
||||||
xml.sax.ContentHandler.__init__(self)
|
xml.sax.ContentHandler.__init__(self)
|
||||||
|
|
|
@ -81,7 +81,8 @@ class TabbedChatWindow(chat.Chat):
|
||||||
self.xml.signal_autoconnect(signal_dict)
|
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
|
# get window position and size from config
|
||||||
gtkgui_helpers.move_window(self.window, gajim.config.get('chat-x-position'),
|
gtkgui_helpers.move_window(self.window, gajim.config.get('chat-x-position'),
|
||||||
gajim.config.get('chat-y-position'))
|
gajim.config.get('chat-y-position'))
|
||||||
|
|
Loading…
Reference in New Issue