From 2dcca42c198d566f9a421b132997e1d55cb6f07c Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 28 Mar 2014 18:07:13 +0100 Subject: [PATCH] core: more organisation in constants.py --- src/core/constants.py | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/core/constants.py b/src/core/constants.py index 0eb8881f..eeebbfab 100644 --- a/src/core/constants.py +++ b/src/core/constants.py @@ -22,11 +22,27 @@ from xdg import BaseDirectory class Const(object): + + ## Application ## APP_NAME = u'Salut à Toi' APP_NAME_SHORT = u'SàT' APP_NAME_FULL = u'%s (%s)' % (APP_NAME_SHORT, APP_NAME) APP_VERSION = u'0.4.1D' # Please add 'D' at the end for dev versions + + ## Parameters ## + NO_SECURITY_LIMIT = -1 + INDIVIDUAL = "individual" + GENERAL = "general" + + + ## Profile and entities ## + PROF_KEY_NONE = '@NONE@' + PROF_KEY_DEFAULT = '@DEFAULT@' + ENTITY_ALL = '@ALL@' + + + ## Configuration ## DEFAULT_CONFIG = { 'media_dir': '/usr/share/sat/media', 'pid_dir': '/tmp', @@ -45,13 +61,12 @@ class Const(object): ['%s/' % path for path in list(BaseDirectory.load_config_paths('sat'))] ] - NO_SECURITY_LIMIT = -1 - INDIVIDUAL = "individual" - GENERAL = "general" - SAVEFILE_DATABASE = "sat.db" - PROF_KEY_NONE = '@NONE@' - PROF_KEY_DEFAULT = '@DEFAULT@' - IQ_SET = '/iq[@type="set"]' + ## Plugins ## # names of widely used plugins TEXT_CMDS = 'TEXT-COMMANDS' + + + ## Misc ## + SAVEFILE_DATABASE = "sat.db" + IQ_SET = '/iq[@type="set"]'