Add option to disable mouse support

Change-Id: Icb075699441774989810671e48106a9de3926b92
This commit is contained in:
James E. Blair 2016-01-14 14:01:27 -08:00
parent 1222a7f927
commit 9ae126da1e
3 changed files with 7 additions and 0 deletions

View File

@ -166,6 +166,10 @@ commentlinks:
# them in UTC instead, uncomment the following line:
# display-times-in-utc: true
# Gertty handles mouse input by default. If you don't want it messing
# with your terminal's mouse handling, uncomment the following line:
# handle-mouse: false
# Closed changes that are older than two months are removed from the
# local database (and their refs are removed from the local git repos
# so that git may garbage collect them). If you would like to change

View File

@ -251,6 +251,7 @@ class App(object):
self.status.update(title=screen.title)
self.updateStatusQueries()
self.loop = urwid.MainLoop(screen, palette=self.config.palette.getPalette(),
handle_mouse=self.config.handle_mouse,
unhandled_input=self.unhandledInput)
self.sync_pipe = self.loop.watch_pipe(self.refresh)

View File

@ -117,6 +117,7 @@ class ConfigSchema(object):
'hide-comments': self.hide_comments,
'thread-changes': bool,
'display-times-in-utc': bool,
'handle-mouse': bool,
'change-list-options': self.change_list_options,
'expire-age': str,
})
@ -226,6 +227,7 @@ class Config(object):
self.thread_changes = self.config.get('thread-changes', True)
self.utc = self.config.get('display-times-in-utc', False)
self.handle_mouse = self.config.get('handle-mouse', True)
change_list_options = self.config.get('change-list-options', {})
self.change_list_options = {