we can now open only one join_gc window per account
This commit is contained in:
parent
25214a9cf2
commit
317f0e0db3
3 changed files with 9 additions and 4 deletions
|
@ -1720,8 +1720,10 @@ class Service_discovery_window:
|
|||
services = service.split('@')
|
||||
room = services[0]
|
||||
service = services[1]
|
||||
if not self.plugin.windows.has_key('join_gc'):
|
||||
if not self.plugin.windows[self.account].has_key('join_gc'):
|
||||
Join_groupchat_window(self.plugin, self.account, service, room)
|
||||
else:
|
||||
self.plugin.windows[self.account]['join_gc'].window.present()
|
||||
|
||||
def on_register_button_clicked(self, widget):
|
||||
"""When we want to register an agent :
|
||||
|
|
|
@ -674,7 +674,7 @@ class Join_groupchat_window:
|
|||
self.xml.get_widget('nickname_entry').\
|
||||
set_text(self.plugin.nicks[self.account])
|
||||
self.xml.signal_autoconnect(self)
|
||||
self.plugin.windows['join_gc'] = self # now add us to open windows
|
||||
self.plugin.windows[account]['join_gc'] = self #now add us to open windows
|
||||
|
||||
self.recently_combobox = self.xml.get_widget('recently_combobox')
|
||||
liststore = gtk.ListStore(str)
|
||||
|
@ -690,7 +690,7 @@ class Join_groupchat_window:
|
|||
|
||||
def on_join_groupchat_window_destroy(self, widget):
|
||||
"""close window"""
|
||||
del self.plugin.windows['join_gc'] # remove us from open windows
|
||||
del self.plugin.windows[self.account]['join_gc'] # remove us from open windows
|
||||
|
||||
def on_join_groupchat_window_key_press_event(self, widget, event):
|
||||
if event.keyval == gtk.keysyms.Escape: # ESCAPE
|
||||
|
|
|
@ -911,7 +911,10 @@ class Roster_window:
|
|||
Add_new_contact_window(self.plugin, account)
|
||||
|
||||
def on_join_gc_activate(self, widget, account):
|
||||
Join_groupchat_window(self.plugin, account)
|
||||
if not self.plugin.windows[account].has_key('join_gc'):
|
||||
Join_groupchat_window(self.plugin, account)
|
||||
else:
|
||||
self.plugin.windows[account]['join_gc'].window.present()
|
||||
|
||||
def on_new_message_menuitem_activate(self, widget, account):
|
||||
New_message_dialog(self.plugin, account)
|
||||
|
|
Loading…
Add table
Reference in a new issue