primitivus: added disable_mouse config option /!\ minimal Urwid version is now 1.2.0
This commit is contained in:
parent
5b2e887317
commit
8544b5868a
3 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)
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -308,6 +308,6 @@ setup(name=NAME,
|
|||
scripts=['frontends/src/jp/jp', 'frontends/src/primitivus/primitivus', 'frontends/src/wix/wix'],
|
||||
zip_safe=False,
|
||||
dependency_links=['http://www.blarg.net/%7Esteveha/pyfeed-0.7.4.tar.gz', 'http://www.blarg.net/%7Esteveha/xe-0.7.4.tar.gz'],
|
||||
install_requires=['twisted', 'wokkel >= 0.7.1', 'progressbar', 'urwid >= 1.1.0', 'urwid-satext >= 0.3.0', 'pyfeed', 'xe', 'mutagen', 'pillow', 'lxml', 'pyxdg', 'markdown', 'html2text', 'pycrypto >= 2.6.1', 'python-potr'],
|
||||
install_requires=['twisted', 'wokkel >= 0.7.1', 'progressbar', 'urwid >= 1.2.0', 'urwid-satext >= 0.3.0', 'pyfeed', 'xe', 'mutagen', 'pillow', 'lxml', 'pyxdg', 'markdown', 'html2text', 'pycrypto >= 2.6.1', 'python-potr'],
|
||||
cmdclass={'install': CustomInstall},
|
||||
) # XXX: wxpython doesn't work, it's managed with preinstall_check
|
||||
|
|
|
|||
Loading…
Reference in a new issue