[caribou] Make SettingsManager singleton
- From: Eitan Isaacson <eitani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou] Make SettingsManager singleton
- Date: Thu, 5 May 2011 19:43:26 +0000 (UTC)
commit b1ba682af01576f294e71872551f576519627a30
Author: Eitan Isaacson <eitan monotonous org>
Date: Tue May 3 16:31:46 2011 -0700
Make SettingsManager singleton
caribou/settings/setting_types.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/caribou/settings/setting_types.py b/caribou/settings/setting_types.py
index b0e374d..f58e2bb 100644
--- a/caribou/settings/setting_types.py
+++ b/caribou/settings/setting_types.py
@@ -58,10 +58,13 @@ class SettingsTopGroup(SettingsGroup):
SettingsGroup.__init__(self, "_top", label, children)
self.path = path
self.schema_id = schema_id
+ self._manager = None
def __call__(self):
- from caribou.settings.settings_manager import SettingsManager
- return SettingsManager(self)
+ if self._manager is None:
+ from caribou.settings.settings_manager import SettingsManager
+ self._manager = SettingsManager(self)
+ return self._manager
class ValueSetting(Setting):
variant_type = ''
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]