Add stop command (ctrl-s)

This commit is contained in:
Florian Bruhin 2014-05-09 13:11:47 +02:00
parent 05f38e15a6
commit 95f2950335
3 changed files with 7 additions and 3 deletions

3
TODO
View File

@ -383,9 +383,6 @@ Find backward, ignore case (command find_backward_ic, alias ibfind).
[n]R
Reload tab n or current tab if n is omitted without using any cached data (command reload_bypass_cache, aliases: refull).
[n]C-s
Stop loading of tab n or of current tab is [n] is omitted (command stop_loading, aliases: stop, st).
[n]=
Zoom to n percent or to 100% if n is omitted(command zoom, aliases: z).

View File

@ -183,6 +183,12 @@ class CurCommandDispatcher(QObject):
printdiag = QPrintDialog(tab)
printdiag.open(lambda: tab.print(printdiag.printer()))
@cmdutils.register(instance='mainwindow.tabs.cur')
def stop(self, count=None):
"""Stop loading of tab [n] or of current tab."""
tab = self._tabs.cntwidget(count)
tab.stop()
@cmdutils.register(instance='mainwindow.tabs.cur')
def back(self, count=1):
"""Go back in the history of the current tab.

View File

@ -624,6 +624,7 @@ DATA = OrderedDict([
('<PgUp>', '${<Ctrl-B>}'),
('<PgDown>', '${<Ctrl-F>}'),
('<Ctrl-h>', 'home'),
('<Ctrl-s>', 'stop'),
)),
('keybind.insert', sect.ValueList(