summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorJody Foo <jody.foo@gmail.com>2017-01-13 21:28:50 +0100
committerJody Foo <jody.foo@gmail.com>2017-01-13 21:28:50 +0100
commita71499a910adebcc85bb7c96ea817456bcd81718 (patch)
treeba64c17778c0d2bc819025caccb3275d368b8dc2 /alot
parent4645c4b2eb2b3aa93305f0c10fd3567cfeeb41c7 (diff)
Add a setting for enabling or disabling mouse support.
Mouse support is enabled by default. To disable mouse support, set ``` handle_mouse = False ``` in your config file.
Diffstat (limited to 'alot')
-rw-r--r--alot/defaults/alot.rc.spec3
-rw-r--r--alot/ui.py2
2 files changed, 4 insertions, 1 deletions
diff --git a/alot/defaults/alot.rc.spec b/alot/defaults/alot.rc.spec
index d99a96e8..d2ee450f 100644
--- a/alot/defaults/alot.rc.spec
+++ b/alot/defaults/alot.rc.spec
@@ -35,6 +35,9 @@ themes_dir = string(default=None)
# name of the theme to use
theme = string(default=None)
+# enable mouse support - mouse tracking will be handled by urwid
+handle_mouse = boolean(default=True)
+
# headers that get displayed by default
displayed_headers = force_list(default=list(From,To,Cc,Bcc,Subject))
diff --git a/alot/ui.py b/alot/ui.py
index 10d255c3..8b077a7d 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -96,7 +96,7 @@ class UI(object):
# set up main loop
self.mainloop = urwid.MainLoop(self.root_widget,
- handle_mouse=True,
+ handle_mouse=settings.get('handle_mouse'),
event_loop=urwid.TwistedEventLoop(),
unhandled_input=self._unhandeled_input,
input_filter=self._input_filter)