an admin can now modify the ban list. for #530

This commit is contained in:
Yann Leboulanger 2006-02-07 12:56:20 +00:00
parent 98521fa2c3
commit d40026cabd
2 changed files with 16 additions and 4 deletions

View File

@ -1654,7 +1654,11 @@ class DataFormWindow:
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'data_form_window', APP)
self.window = self.xml.get_widget('data_form_window')
self.config_table = self.xml.get_widget('config_table')
self.fill_table()
if config:
self.fill_table()
else:
self.config_table.set_no_show_all(True)
self.config_table.hide()
self.xml.signal_autoconnect(self)
self.window.show_all()
@ -1877,8 +1881,8 @@ class ServiceRegistrationWindow(DataFormWindow):
class GroupchatConfigWindow(DataFormWindow):
'''GroupchatConfigWindow class'''
def __init__(self, account, room_jid, config):
DataFormWindow.__init__(self, account, config)
def __init__(self, account, room_jid, config = None):
DataFormWindow.__init__(self, account, config = None)
self.room_jid = room_jid
self.remove_button = {}
self.affiliation_treeview = {}

View File

@ -31,6 +31,7 @@ import gtkgui_helpers
import message_control
import tooltips
import dialogs
import config
import vcard
import cell_renderer_image
import history_window
@ -1087,7 +1088,14 @@ class GroupchatControl(ChatControlBase):
self.show_change_nick_input_dialog(title, prompt, self.nick)
def _on_configure_room_menuitem_activate(self, widget):
gajim.connections[self.account].request_gc_config(self.room_jid)
c = gajim.contacts.get_gc_contact(self.account, self.room_jid, self.nick)
if c.affiliation == 'owner':
gajim.connections[self.account].request_gc_config(self.room_jid)
elif c.affiliation == 'admin':
if not gajim.interface.instances[self.account]['gc_config'].has_key(
self.room_jid):
gajim.interface.instances[self.account]['gc_config'][self.room_jid]\
= config.GroupchatConfigWindow(self.account, self.room_jid)
def _on_bookmark_room_menuitem_activate(self, widget):
bm = {