Mercurial > libervia-backend
changeset 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 | af395a6f2551 |
children | 6b15a6d184d5 |
files | frontends/src/primitivus/config.py frontends/src/primitivus/primitivus setup.py |
diffstat | 3 files changed, 5 insertions(+), 3 deletions(-) [+] |
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()
--- a/frontends/src/primitivus/primitivus Thu Sep 04 20:24:41 2014 +0200 +++ b/frontends/src/primitivus/primitivus Thu Sep 04 20:30:57 2014 +0200 @@ -242,7 +242,7 @@ 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)
--- a/setup.py Thu Sep 04 20:24:41 2014 +0200 +++ b/setup.py Thu Sep 04 20:30:57 2014 +0200 @@ -308,6 +308,6 @@ 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