primitivus: added disable_mouse config option /!\ minimal Urwid version is now 1.2.0
This commit is contained in:
parent
5b2e887317
commit
8544b5868a
2 changed files with 5 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ from sat_frontends.primitivus.keys import action_key_map
|
|||
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 @@ def applyConfig():
|
|||
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()
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ class PrimitivusApp(QuickApp, InputHistory):
|
|||
|
||||
def postInit(self):
|
||||
try:
|
||||
config.applyConfig()
|
||||
config.applyConfig(self)
|
||||
except Exception as e:
|
||||
log.error("configuration error: {}".format(e))
|
||||
popup = sat_widgets.Alert(_("Configuration Error"), _("Something went wrong while reading the configuration, please check :messages"), ok_cb=self.removePopUp)
|
||||
|
|
|
|||
Loading…
Reference in a new issue