Mercurial > libervia-backend
changeset 2333:a21b3b31086d
primitivus (chat): added "GOTO_BOTTOM" ("G") shortcut to scroll down to last message in history
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 14 Jul 2017 08:34:10 +0200 |
parents | 7df0a77a5064 |
children | ca14e1ced3b5 |
files | frontends/src/primitivus/chat.py frontends/src/primitivus/keys.py |
diffstat | 2 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py Fri Jul 14 08:32:49 2017 +0200 +++ b/frontends/src/primitivus/chat.py Fri Jul 14 08:34:10 2017 +0200 @@ -312,6 +312,8 @@ elif self.show_title == 2: self.chat_widget.header = None self._invalidate() + elif key == a_key['GOTO_BOTTOM']: # user wants to focus last message + self.mess_widgets.focus_position = len(self.mess_walker) - 1 return super(Chat, self).keypress(size, key)
--- a/frontends/src/primitivus/keys.py Fri Jul 14 08:32:49 2017 +0200 +++ b/frontends/src/primitivus/keys.py Fri Jul 14 08:34:10 2017 +0200 @@ -55,6 +55,7 @@ ("chat_panel", "TIMESTAMP_HIDE"): "meta t", ("chat_panel", "SHORT_NICKNAME"): "meta n", ("chat_panel", "SUBJECT_SWITCH"): "meta s", + ("chat_panel", "GOTO_BOTTOM"): "G", #card game ("card_game", "CARD_SELECT"): ' ',