From b24e6d80ce7e30f88fc3bb0d51ec8699fd169c25 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 26 May 2005 21:09:01 +0000 Subject: [PATCH] we can now edit non-root line in advanced configuration editor --- src/advanced.py | 14 ++++++++++++-- src/common/config.py | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/advanced.py b/src/advanced.py index 4b38c7802..2af01b217 100644 --- a/src/advanced.py +++ b/src/advanced.py @@ -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 diff --git a/src/common/config.py b/src/common/config.py index 2bd1dc4e8..67e130fcd 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -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