Mercurial > libervia-web
comparison 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 |
comparison
equal
deleted
inserted
replaced
477:fac8e8bc9a1a | 478:992b900ab876 |
---|---|
25 | 25 |
26 | 26 |
27 class Const(C): | 27 class Const(C): |
28 """Add here the constants that are only used by the browser side.""" | 28 """Add here the constants that are only used by the browser side.""" |
29 | 29 |
30 # Parameters that have an incidence on UI display/refresh: | 30 # Cached parameters, e.g those that have an incidence on UI display/refresh: |
31 # - they can be any parameter (not necessarily specific to Libervia) | 31 # - they can be any parameter (not necessarily specific to Libervia) |
32 # - 'cast_from_str' is a method used to eventually convert to a non string type | 32 # - list them as a couple (category, name) |
33 # - 'initial_value' is used to initialize the display before any profile connection | 33 CACHED_PARAMS = [(C.COMPOSITION_KEY, C.ENABLE_UNIBOX_PARAM)] |
34 UI_PARAMS = {"unibox": {"name": C.ENABLE_UNIBOX_PARAM, | |
35 "category": C.COMPOSITION_KEY, | |
36 "cast_from_str": param_to_bool, | |
37 "initial_value": False | |
38 }, | |
39 } | |
40 | 34 |
41 # Default avatar | 35 # Default avatar |
42 DEFAULT_AVATAR = "/media/misc/default_avatar.png" | 36 DEFAULT_AVATAR = "/media/misc/default_avatar.png" |