# HG changeset patch # User Goffi # Date 1409855457 -7200 # Node ID ca15fb1abbc4c81551df38bffd7f86833a198fb7 # Parent af395a6f25518e09dfa51c33d6d6a9ede2bcb4a5 primitivus: added disable_mouse config option /!\ minimal Urwid version is now 1.2.0 diff -r af395a6f2551 -r ca15fb1abbc4 frontends/src/primitivus/config.py --- 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() diff -r af395a6f2551 -r ca15fb1abbc4 frontends/src/primitivus/primitivus --- 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) diff -r af395a6f2551 -r ca15fb1abbc4 setup.py --- 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