merge and split tabbed chat window on the fly (need to do the same for gc)
begining is in the previous commit (sorry)
This commit is contained in:
parent
eef71fcb27
commit
c75e610914
|
@ -207,7 +207,30 @@ class Preferences_window:
|
||||||
self.plugin.windows[acct]['chats'][jid].xmls[jid].\
|
self.plugin.windows[acct]['chats'][jid].xmls[jid].\
|
||||||
get_widget('message_textview').set_buffer(buf2[acct][jid])
|
get_widget('message_textview').set_buffer(buf2[acct][jid])
|
||||||
else:
|
else:
|
||||||
|
#save buffers and close tabbed chat windows
|
||||||
|
for acct in gajim.connections:
|
||||||
|
buf1[acct] = {}
|
||||||
|
buf2[acct] = {}
|
||||||
|
jids[acct] = self.plugin.windows[acct]['chats'].keys()
|
||||||
|
if 'tabbed' in jids[acct]:
|
||||||
|
jids[acct].remove('tabbed')
|
||||||
|
for jid in jids[acct]:
|
||||||
|
buf1[acct][jid] = self.plugin.windows[acct]['chats'][jid].\
|
||||||
|
xmls[jid].get_widget('conversation_textview').get_buffer()
|
||||||
|
buf2[acct][jid] = self.plugin.windows[acct]['chats'][jid].\
|
||||||
|
xmls[jid].get_widget('message_textview').get_buffer()
|
||||||
|
self.plugin.windows[acct]['chats']['tabbed'].window.destroy()
|
||||||
gajim.config.set('usetabbedchat', False)
|
gajim.config.set('usetabbedchat', False)
|
||||||
|
#open new tabbed chat windows
|
||||||
|
for acct in gajim.connections:
|
||||||
|
for jid in jids[acct]:
|
||||||
|
user = self.plugin.roster.contacts[acct][jid][0]
|
||||||
|
self.plugin.roster.new_chat(user, acct)
|
||||||
|
self.plugin.windows[acct]['chats'][jid].xmls[jid].\
|
||||||
|
get_widget('conversation_textview').set_buffer(\
|
||||||
|
buf1[acct][jid])
|
||||||
|
self.plugin.windows[acct]['chats'][jid].xmls[jid].\
|
||||||
|
get_widget('message_textview').set_buffer(buf2[acct][jid])
|
||||||
self.plugin.save_config()
|
self.plugin.save_config()
|
||||||
|
|
||||||
def update_print_time(self):
|
def update_print_time(self):
|
||||||
|
|
Loading…
Reference in New Issue