Fixed docs.

This commit is contained in:
Joel Torstensson 2015-02-09 17:38:50 +01:00
parent 55193803a1
commit 6e3d5867f9
4 changed files with 35 additions and 19 deletions

View File

@ -131,11 +131,11 @@ Contributors, sorted by the number of commits in descending order:
* Florian Bruhin
* Claude
* ZDarian
* Joel Torstensson
* Peter Vilim
* John ShaggyTwoDope Jenkins
* rikn00
* Martin Zimmermann
* Joel Torstensson
* Error 800
* Brian Jackson
* Patric Schmitz

View File

@ -8,10 +8,11 @@
|<<adblock-update,adblock-update>>|Update the adblock block lists.
|<<back,back>>|Go back in the history of the current tab.
|<<bind,bind>>|Bind a key to a command.
|<<cancel-download,cancel-download>>|Cancel the first/[count]th download.
|<<close,close>>|Close the current window.
|<<download,download>>|Download a given URL, given as string.
|<<download-page,download-page>>|Download the current page.
|<<download,download>>|Download a given URL, or current page if no URL given.
|<<download-cancel,download-cancel>>|Cancel the last/[count]th download.
|<<download-open,download-open>>|Open the last/[count]th finished download.
|<<download-remove,download-remove>>|Remove the last/[count]th finished download.
|<<forward,forward>>|Go forward in the history of the current tab.
|<<fullscreen,fullscreen>>|Toggle fullscreen mode.
|<<help,help>>|Show help about a command or setting.
@ -85,30 +86,45 @@ Bind a key to a command.
* +*-m*+, +*--mode*+: A comma-separated list of modes to bind the key in (default: `normal`).
[[cancel-download]]
=== cancel-download
Cancel the first/[count]th download.
==== count
The index of the download to cancel.
[[close]]
=== close
Close the current window.
[[download]]
=== download
Syntax: +:download 'url' ['dest']+
Syntax: +:download ['url'] ['dest']+
Download a given URL, given as string.
Download a given URL, or current page if no URL given.
==== positional arguments
* +'url'+: The URL to download
* +'url'+: The URL to download. If not given, download the current page.
* +'dest'+: The file path to write the download to to ask.
[[download-page]]
=== download-page
Download the current page.
[[download-cancel]]
=== download-cancel
Cancel the last/[count]th download.
==== count
The index of the download to cancel.
[[download-open]]
=== download-open
Open the last/[count]th finished download.
==== count
The index of the download to cancel.
[[download-remove]]
=== download-remove
Syntax: +:download-remove [*--all*]+
Remove the last/[count]th finished download.
==== optional arguments
* +*-a*+, +*--all*+: If given removes all finished downloads.
==== count
The index of the download to cancel.
[[forward]]
=== forward

View File

@ -915,7 +915,7 @@ class CommandDispatcher:
"""Download a given URL, or current page if no URL given.
Args:
url: The URL to download, or None to download current page.
url: The URL to download. If not given, download the current page.
dest: The file path to write the download to, or None to ask.
"""
download_manager = objreg.get('download-manager', scope='window',

View File

@ -833,7 +833,7 @@ class DownloadManager(QAbstractListModel):
"""Remove the last/[count]th finished download.
Args:
all: Whether to remove all finished downloads.
all_: If given removes all finished downloads.
count: The index of the download to cancel.
"""
finished_items = [d for d in self.downloads if d.done]