From b83bf4e238741658adb055420fc13b4bb81b7d62 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 28 Jan 2014 06:52:59 +0100 Subject: [PATCH] Rename scrollpercent{x,y} --- qutebrowser/app.py | 32 ++++++++++++++++---------------- qutebrowser/commands/__init__.py | 6 ++++-- qutebrowser/utils/config.py | 4 ++-- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index c4dc5d31d..9127c772c 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -121,22 +121,22 @@ class QuteBrowser(QApplication): args = argv[1:] handlers = { - 'open': self.mainwindow.tabs.openurl, - 'tabopen': self.mainwindow.tabs.tabopen, - 'quit': self.quit, - 'tabclose': self.mainwindow.tabs.cur_close, - 'tabprev': self.mainwindow.tabs.switch_prev, - 'tabnext': self.mainwindow.tabs.switch_next, - 'reload': self.mainwindow.tabs.cur_reload, - 'stop': self.mainwindow.tabs.cur_stop, - 'back': self.mainwindow.tabs.cur_back, - 'forward': self.mainwindow.tabs.cur_forward, - 'print': self.mainwindow.tabs.cur_print, - 'scroll': self.mainwindow.tabs.cur_scroll, - 'scrollpercentx': self.mainwindow.tabs.cur_scroll_percent_x, - 'scrollpercenty': self.mainwindow.tabs.cur_scroll_percent_y, - 'undo': self.mainwindow.tabs.undo_close, - 'pyeval': self.pyeval, + 'open': self.mainwindow.tabs.openurl, + 'tabopen': self.mainwindow.tabs.tabopen, + 'quit': self.quit, + 'tabclose': self.mainwindow.tabs.cur_close, + 'tabprev': self.mainwindow.tabs.switch_prev, + 'tabnext': self.mainwindow.tabs.switch_next, + 'reload': self.mainwindow.tabs.cur_reload, + 'stop': self.mainwindow.tabs.cur_stop, + 'back': self.mainwindow.tabs.cur_back, + 'forward': self.mainwindow.tabs.cur_forward, + 'print': self.mainwindow.tabs.cur_print, + 'scroll': self.mainwindow.tabs.cur_scroll, + 'scroll_perc_y': self.mainwindow.tabs.cur_scroll_percent_x, + 'scroll_perc_y': self.mainwindow.tabs.cur_scroll_percent_y, + 'undo': self.mainwindow.tabs.undo_close, + 'pyeval': self.pyeval, } handler = handlers[cmd] diff --git a/qutebrowser/commands/__init__.py b/qutebrowser/commands/__init__.py index 57a561393..2d97fe05d 100644 --- a/qutebrowser/commands/__init__.py +++ b/qutebrowser/commands/__init__.py @@ -81,15 +81,17 @@ class Undo(Command): nargs = 0 desc = 'Undo closing a tab' -class ScrollPercentX(Command): +class ScrollPercX(Command): nargs = '?' count = True hide = True + name = 'scroll_perc_x' -class ScrollPercentY(Command): +class ScrollPercY(Command): nargs = '?' count = True hide = True + name = 'scroll_perc_y' class PyEval(Command): nargs = 1 diff --git a/qutebrowser/utils/config.py b/qutebrowser/utils/config.py index fc1ca13c9..a34b12c30 100644 --- a/qutebrowser/utils/config.py +++ b/qutebrowser/utils/config.py @@ -19,8 +19,8 @@ default_config = { 'k': 'scroll 0 -50', 'l': 'scroll 50 0', 'u': 'undo', - 'gg': 'scrollpercenty 0', - 'G': 'scrollpercenty', + 'gg': 'scroll_perc_y 0', + 'G': 'scroll_perc_y', } }