diff options
Diffstat (limited to 'python/settings.py')
| -rw-r--r-- | python/settings.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/settings.py b/python/settings.py index ce7c140a..135cd342 100644 --- a/python/settings.py +++ b/python/settings.py @@ -154,18 +154,28 @@ class Settings(object): return (out_list, SettingsScope(c_scope.value)) def set_bool(self, id, value, view = None, scope = SettingsScope.SettingsAutoScope): + if view is not None: + view = view.handle return core.BNSettingsSetBool(self.registry_id, view, scope, id, value) def set_double(self, id, value, view = None, scope = SettingsScope.SettingsAutoScope): + if view is not None: + view = view.handle return core.BNSettingsSetDouble(self.registry_id, view, scope, id, value) def set_integer(self, id, value, view = None, scope = SettingsScope.SettingsAutoScope): + if view is not None: + view = view.handle return core.BNSettingsSetUInt64(self.registry_id, view, scope, id, value) def set_string(self, id, value, view = None, scope = SettingsScope.SettingsAutoScope): + if view is not None: + view = view.handle return core.BNSettingsSetString(self.registry_id, view, scope, id, value) def set_string_list(self, id, value, view = None, scope = SettingsScope.SettingsAutoScope): + if view is not None: + view = view.handle length = ctypes.c_ulonglong() length.value = len(value) string_list = (ctypes.c_char_p * len(value))() |
