diff frontends/src/primitivus/config.py @ 1165:ca15fb1abbc4

primitivus: added disable_mouse config option /!\ minimal Urwid version is now 1.2.0
author Goffi <goffi@goffi.org>
date Thu, 04 Sep 2014 20:30:57 +0200
parents 85fd02356dba
children 069ad98b360d
line wrap: on
line diff
--- a/frontends/src/primitivus/config.py	Thu Sep 04 20:24:41 2014 +0200
+++ b/frontends/src/primitivus/config.py	Thu Sep 04 20:30:57 2014 +0200
@@ -24,7 +24,7 @@
 import ConfigParser
 
 
-def applyConfig():
+def applyConfig(host):
     """Parse configuration and apply found change
 
     raise: can raise various Exceptions if configuration is not good
@@ -43,6 +43,8 @@
             if not action or not shortcut:
                 raise ValueError("Bad option: {} = {}".format(name, value))
             shortcuts[action] = shortcut
+        if name == "disable_mouse":
+            host.loop.screen.set_mouse_tracking(False)
 
     action_key_map.replace(shortcuts)
     action_key_map.check_namespaces()