diff options
author | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-04-25 20:37:21 -0500 |
---|---|---|
committer | Blake DeMarcy <ofunknowndescent@gmail.com> | 2017-04-25 20:37:21 -0500 |
commit | c4f04173c44ec79c80de1eed47892e28fde2d704 (patch) | |
tree | 78417387539db2c73f6435ab4edce965da465828 /clients | |
parent | a6e3e1675f810033bed35fd5ce27a7e87c636132 (diff) | |
download | bbj-c4f04173c44ec79c80de1eed47892e28fde2d704.tar.gz |
handle the mouse in the prompts too
Diffstat (limited to 'clients')
-rw-r--r-- | clients/urwid/main.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/clients/urwid/main.py b/clients/urwid/main.py index c07db81..57bb119 100644 --- a/clients/urwid/main.py +++ b/clients/urwid/main.py @@ -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 |