[gnome-clocks] Create the system settings only once



commit 86021051095799e3cd3affd05daf160bc9ac5446
Author: Paolo Borelli <pborelli gnome org>
Date:   Wed Dec 5 09:48:29 2012 +0100

    Create the system settings only once

 gnomeclocks/utils.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomeclocks/utils.py b/gnomeclocks/utils.py
index 20beeb9..c366f02 100644
--- a/gnomeclocks/utils.py
+++ b/gnomeclocks/utils.py
@@ -59,10 +59,11 @@ class Dirs:
 
 
 class SystemSettings:
+    settings = Gio.Settings.new('org.gnome.desktop.interface')
+
     @staticmethod
     def get_clock_format():
-        settings = Gio.Settings.new('org.gnome.desktop.interface')
-        systemClockFormat = settings.get_string('clock-format')
+        systemClockFormat = SystemSettings.settings.get_string('clock-format')
         return systemClockFormat
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]