we can now edit non-root line in advanced configuration editor
This commit is contained in:
parent
c9d2e9123c
commit
b24e6d80ce
2 changed files with 14 additions and 2 deletions
|
@ -78,8 +78,18 @@ class Advanced_configuration_window:
|
||||||
|
|
||||||
def on_config_edited(self, cell, row, text):
|
def on_config_edited(self, cell, row, text):
|
||||||
modelrow = self.model[row]
|
modelrow = self.model[row]
|
||||||
if gajim.config.set(modelrow[0], text):
|
option = modelrow[0]
|
||||||
return
|
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()
|
self.plugin.save_config()
|
||||||
modelrow[1] = text
|
modelrow[1] = text
|
||||||
|
|
||||||
|
|
|
@ -240,6 +240,8 @@ class Config:
|
||||||
ival = self.is_valid_int(val)
|
ival = self.is_valid_int(val)
|
||||||
if ival:
|
if ival:
|
||||||
return True
|
return True
|
||||||
|
elif ival == None:
|
||||||
|
return None
|
||||||
return False
|
return False
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue