diff src/browser/sat_browser/constants.py @ 478:992b900ab876

browser side: rename and refactor constant UI_PARAMS to CACHED_PARAMS, from a dict of dict to a list of 2-tuple
author souliane <souliane@mailoo.org>
date Thu, 12 Jun 2014 22:37:22 +0200
parents fac8e8bc9a1a
children c21ea1fe3593
line wrap: on
line diff
--- a/src/browser/sat_browser/constants.py	Thu Jun 12 22:32:33 2014 +0200
+++ b/src/browser/sat_browser/constants.py	Thu Jun 12 22:37:22 2014 +0200
@@ -27,16 +27,10 @@
 class Const(C):
     """Add here the constants that are only used by the browser side."""
 
-    # Parameters that have an incidence on UI display/refresh:
+    # Cached parameters, e.g those that have an incidence on UI display/refresh:
     #     - they can be any parameter (not necessarily specific to Libervia)
-    #     - 'cast_from_str' is a method used to eventually convert to a non string type
-    #     - 'initial_value' is used to initialize the display before any profile connection
-    UI_PARAMS = {"unibox": {"name": C.ENABLE_UNIBOX_PARAM,
-                            "category": C.COMPOSITION_KEY,
-                            "cast_from_str": param_to_bool,
-                            "initial_value": False
-                             },
-                 }
+    #     - list them as a couple (category, name)
+    CACHED_PARAMS = [(C.COMPOSITION_KEY, C.ENABLE_UNIBOX_PARAM)]
 
     # Default avatar
     DEFAULT_AVATAR = "/media/misc/default_avatar.png"