we can now edit non-root line in advanced configuration editor

This commit is contained in:
Yann Leboulanger 2005-05-26 21:09:01 +00:00
parent c9d2e9123c
commit b24e6d80ce
2 changed files with 14 additions and 2 deletions

View File

@ -78,8 +78,18 @@ class Advanced_configuration_window:
def on_config_edited(self, cell, row, text):
modelrow = self.model[row]
if gajim.config.set(modelrow[0], text):
return
option = modelrow[0]
if row.find(':') > 0:
row_splitted = row.split(':')
optnamerow = self.model[row_splitted[0]]
optname = optnamerow[0]
keyrow = self.model[':'.join(row_splitted[:2])]
key = keyrow[0]
if gajim.config.set_per(optname, key, option, text):
return
else:
if gajim.config.set(option, text):
return
self.plugin.save_config()
modelrow[1] = text

View File

@ -240,6 +240,8 @@ class Config:
ival = self.is_valid_int(val)
if ival:
return True
elif ival == None:
return None
return False
return None