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('@')
|
services = service.split('@')
|
||||||
room = services[0]
|
room = services[0]
|
||||||
service = services[1]
|
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)
|
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):
|
def on_register_button_clicked(self, widget):
|
||||||
"""When we want to register an agent :
|
"""When we want to register an agent :
|
||||||
|
|
|
@ -674,7 +674,7 @@ class Join_groupchat_window:
|
||||||
self.xml.get_widget('nickname_entry').\
|
self.xml.get_widget('nickname_entry').\
|
||||||
set_text(self.plugin.nicks[self.account])
|
set_text(self.plugin.nicks[self.account])
|
||||||
self.xml.signal_autoconnect(self)
|
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')
|
self.recently_combobox = self.xml.get_widget('recently_combobox')
|
||||||
liststore = gtk.ListStore(str)
|
liststore = gtk.ListStore(str)
|
||||||
|
@ -690,7 +690,7 @@ class Join_groupchat_window:
|
||||||
|
|
||||||
def on_join_groupchat_window_destroy(self, widget):
|
def on_join_groupchat_window_destroy(self, widget):
|
||||||
"""close window"""
|
"""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):
|
def on_join_groupchat_window_key_press_event(self, widget, event):
|
||||||
if event.keyval == gtk.keysyms.Escape: # ESCAPE
|
if event.keyval == gtk.keysyms.Escape: # ESCAPE
|
||||||
|
|
|
@ -911,7 +911,10 @@ class Roster_window:
|
||||||
Add_new_contact_window(self.plugin, account)
|
Add_new_contact_window(self.plugin, account)
|
||||||
|
|
||||||
def on_join_gc_activate(self, widget, account):
|
def on_join_gc_activate(self, widget, account):
|
||||||
|
if not self.plugin.windows[account].has_key('join_gc'):
|
||||||
Join_groupchat_window(self.plugin, account)
|
Join_groupchat_window(self.plugin, account)
|
||||||
|
else:
|
||||||
|
self.plugin.windows[account]['join_gc'].window.present()
|
||||||
|
|
||||||
def on_new_message_menuitem_activate(self, widget, account):
|
def on_new_message_menuitem_activate(self, widget, account):
|
||||||
New_message_dialog(self.plugin, account)
|
New_message_dialog(self.plugin, account)
|
||||||
|
|
Loading…
Add table
Reference in a new issue