diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2008-04-02 12:53:52 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2008-04-02 12:53:52 (GMT) |
commit | 14f1ca9b8491dee343305066facf8e7ae24e381f (patch) | |
tree | 2a387daf635cf21c2843cd18b29bc6f72d781d87 /src/model | |
parent | b8dd3afcb84f86a94c41b1e29a851515e0009690 (diff) |
Make Frame, Shell and ShellModel singletons and remove all those references dragged around constructors.
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/shellmodel.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/model/shellmodel.py b/src/model/shellmodel.py index 5462e27..1834fcd 100644 --- a/src/model/shellmodel.py +++ b/src/model/shellmodel.py @@ -110,3 +110,12 @@ class ShellModel(gobject.GObject): if self._showing_desktop != showing_desktop: self._showing_desktop = showing_desktop self.notify('zoom-level') + +_instance = None + +def get_instance(): + global _instance + if not _instance: + _instance = ShellModel() + return _instance + |