diff --git a/src/advanced.py b/src/advanced.py index b2954649f..1d297b104 100644 --- a/src/advanced.py +++ b/src/advanced.py @@ -58,7 +58,7 @@ class Advanced_window: iter = self.model.iter_next(iter) return iter - def fill(self, name, parents, val): + def fill(self, data, name, parents, val): iter = None if parents: for p in parents: @@ -110,5 +110,5 @@ class Advanced_window: renderer_text, text = 2) # add data to model - gajim.config.foreach(self.fill) + gajim.config.foreach(self.fill, None) diff --git a/src/common/config.py b/src/common/config.py index 1eba8a513..b0121bd45 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -202,16 +202,16 @@ class Config: 'message_sent': [ True, 'sounds/sent.wav' ], } - def foreach(self, func): + def foreach(self, cb, data): for opt in self.__options: - func(opt, None, self.__options[opt]) + cb(data, opt, None, self.__options[opt]) for opt in self.__options_per_key: - func(opt, None, None) + cb(data, opt, None, None) dict = self.__options_per_key[opt][1] for opt2 in dict.keys(): - func(opt2, [opt], None) + cb(data, opt2, [opt], None) for opt3 in dict[opt2]: - func(opt3, [opt, opt2], dict[opt2][opt3]) + cb(data, opt3, [opt, opt2], dict[opt2][opt3]) def is_valid_int(self, val): try: