handle the mouse in the prompts too

pull/4/head
Blake DeMarcy 2017-04-25 20:37:21 -05:00
parent a6e3e1675f
commit c4f04173c4
1 changed files with 11 additions and 1 deletions

View File

@ -1181,7 +1181,7 @@ class App(object):
urwid.Text(("button", "Max message width:")),
urwid.AttrMap(width_edit, "opt_prompt"),
urwid.Divider(),
urwid.Text(("button", "Scroll multiplier when holding shift:")),
urwid.Text(("button", "Scroll multiplier when holding shift or scrolling with the mouse:")),
urwid.AttrMap(shift_edit, "opt_prompt"),
urwid.Divider(),
urwid.Text(("button", "Text editor:")),
@ -1694,6 +1694,16 @@ class OptionsMenu(urwid.LineBox):
wipe_screen()
def mouse_event(self, size, event, button, x, y, focus):
if super(OptionsMenu, self).mouse_event(size, event, button, x, y, focus):
return
if button == 4:
self.keypress(size, "up")
elif button == 5:
self.keypress(size, "down")
class ActionBox(urwid.ListBox):
"""
The listwalker used by all the browsing pages. Most of the application