Changeset 8668 for branches/gajim_0.11.1/src/config.py
- Timestamp:
- 08/31/07 10:59:52 (15 months ago)
- Files:
-
- 1 modified
-
branches/gajim_0.11.1/src/config.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11.1/src/config.py
r8663 r8668 29 29 import message_control 30 30 import chat_control 31 import dataforms_widget 31 32 32 33 try: … … 42 43 from common import zeroconf 43 44 from common import dbus_support 45 from common import dataforms 44 46 45 47 from common.exceptions import GajimGeneralException … … 2168 2170 self.window.destroy() 2169 2171 2170 class GroupchatConfigWindow (DataFormWindow):2172 class GroupchatConfigWindow: 2171 2173 '''GroupchatConfigWindow class''' 2172 def __init__(self, account, room_jid, config= None):2173 DataFormWindow.__init__(self, account, config)2174 def __init__(self, account, room_jid, form = None): 2175 self.account = account 2174 2176 self.room_jid = room_jid 2177 self.form = form 2175 2178 self.remove_button = {} 2176 2179 self.affiliation_treeview = {} … … 2181 2184 'admin':_('Administrator List')} 2182 2185 2183 # Draw the edit affiliation list things 2186 self.xml = gtkgui_helpers.get_glade('data_form_window.glade', 'data_form_window') 2187 self.window = self.xml.get_widget('data_form_window') 2188 self.window.set_transient_for(gajim.interface.roster.window) 2189 2190 if self.form: 2191 config_vbox = self.xml.get_widget('config_vbox') 2192 dataform = dataforms.ExtendForm(node = self.form) 2193 self.data_form_widget = dataforms_widget.DataFormWidget(dataform) 2194 # hide scrollbar of this data_form_widget, we already have in this 2195 # widget 2196 sw = self.data_form_widget.xml.get_widget('single_form_scrolledwindow') 2197 sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_NEVER) 2198 2199 self.data_form_widget.show() 2200 config_vbox.pack_start(self.data_form_widget) 2201 2202 # Draw the edit affiliation list things 2184 2203 add_on_vbox = self.xml.get_widget('add_on_vbox') 2185 2204 2186 2205 for affiliation in ('outcast', 'member', 'owner', 'admin'): 2187 2206 self.list_init[affiliation] = {} … … 2240 2259 affiliation) 2241 2260 2242 add_on_vbox.show_all() 2261 self.xml.signal_autoconnect(self) 2262 self.window.show_all() 2263 2264 def on_cancel_button_clicked(self, widget): 2265 self.window.destroy() 2243 2266 2244 2267 def on_cell_edited(self, cell, path, new_text): … … 2319 2342 def on_ok_button_clicked(self, widget): 2320 2343 # We pressed OK button of the DataFormWindow 2321 if self. config:2322 gajim.connections[self.account].send_gc_config(self.room_jid,2323 self.config)2344 if self.form: 2345 form = self.data_form_widget.data_form 2346 gajim.connections[self.account].send_gc_config(self.room_jid, form) 2324 2347 for affiliation in ('outcast', 'member', 'owner', 'admin'): 2325 2348 list = {}
