parent
a30a61e5ff
commit
fd137be30f
|
@ -2720,6 +2720,17 @@ class Connection(CommonConnection, ConnectionHandlers):
|
|||
self.add_lang(iq)
|
||||
self.connection.send(iq)
|
||||
|
||||
def cancel_gc_config(self, room_jid):
|
||||
if not app.account_is_connected(self.name):
|
||||
return
|
||||
cancel = nbxmpp.Node(tag='x', attrs={'xmlns': nbxmpp.NS_DATA,
|
||||
'type': 'cancel'})
|
||||
iq = nbxmpp.Iq(typ='set',
|
||||
queryNS=nbxmpp.NS_MUC_OWNER,
|
||||
payload=cancel,
|
||||
to=room_jid)
|
||||
self.connection.send(iq)
|
||||
|
||||
def destroy_gc_room(self, room_jid, reason = '', jid = ''):
|
||||
if not app.account_is_connected(self.name):
|
||||
return
|
||||
|
|
|
@ -1642,9 +1642,12 @@ class GroupchatConfigWindow:
|
|||
affiliation)
|
||||
|
||||
self.xml.connect_signals(self)
|
||||
self.window.connect('delete-event', self.on_cancel_button_clicked)
|
||||
self.window.show_all()
|
||||
|
||||
def on_cancel_button_clicked(self, widget):
|
||||
def on_cancel_button_clicked(self, *args):
|
||||
if self.form:
|
||||
app.connections[self.account].cancel_gc_config(self.room_jid)
|
||||
self.window.destroy()
|
||||
|
||||
def on_cell_edited(self, cell, path, new_text):
|
||||
|
|
Loading…
Reference in New Issue