summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vogt <david.vogt@adfinis-sygroup.ch>2016-07-23 14:27:42 +0200
committerDavid Vogt <david.vogt@adfinis-sygroup.ch>2016-07-23 14:50:28 +0200
commit1f320b86869fa23111fcdb54f30105ba0a86d1a1 (patch)
tree254ab707ccf6dec3e50fe48c57d73b7ff6b9b5ec
parent11bf5c8809154bc47833360d40d23e8099472b1a (diff)
downloadqutebrowser-1f320b86869fa23111fcdb54f30105ba0a86d1a1.tar.gz
qutebrowser-1f320b86869fa23111fcdb54f30105ba0a86d1a1.zip
Various fixes after code review.
* Move documentation changes of bookmark / quickmarks to docstrings, as the asciidoc is autogenerated from those * Fix some whitespaces in the BDD test cases * Improved docstring in qute_bookmarks handler
-rw-r--r--doc/help/commands.asciidoc4
-rw-r--r--qutebrowser/browser/commands.py3
-rw-r--r--qutebrowser/browser/urlmarks.py3
-rw-r--r--qutebrowser/browser/webkit/network/qutescheme.py5
-rw-r--r--tests/end2end/features/urlmarks.feature4
5 files changed, 10 insertions, 9 deletions
diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc
index cc9d7d031..4c64c9068 100644
--- a/doc/help/commands.asciidoc
+++ b/doc/help/commands.asciidoc
@@ -122,8 +122,6 @@ Save the current page as a bookmark, or a specific url.
If no url and title are provided, then save the current page as a bookmark. If a url and title have been provided, then save the given url as a bookmark with the provided title.
-You can view all saved bookmarks on the link:qute://bookmarks[bookmarks page].
-
==== positional arguments
* +'url'+: url to save as a bookmark. If None, use url of current page.
* +'title'+: title of the new bookmark.
@@ -514,8 +512,6 @@ Syntax: +:quickmark-add 'url' 'name'+
Add a new quickmark.
-You can view all saved quickmarks on the link:qute://bookmarks[bookmarks page].
-
==== positional arguments
* +'url'+: The url to add as quickmark.
* +'name'+: The name for the new quickmark.
diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py
index 5192ac895..42b91f737 100644
--- a/qutebrowser/browser/commands.py
+++ b/qutebrowser/browser/commands.py
@@ -1104,6 +1104,9 @@ class CommandDispatcher:
If a url and title have been provided, then save the given url as
a bookmark with the provided title.
+ You can view all saved bookmarks on the
+ link:qute://bookmarks[bookmarks page].
+
Args:
url: url to save as a bookmark. If None, use url of current page.
title: title of the new bookmark.
diff --git a/qutebrowser/browser/urlmarks.py b/qutebrowser/browser/urlmarks.py
index df1302535..e7b78c310 100644
--- a/qutebrowser/browser/urlmarks.py
+++ b/qutebrowser/browser/urlmarks.py
@@ -178,6 +178,9 @@ class QuickmarkManager(UrlMarkManager):
def quickmark_add(self, win_id, url, name):
"""Add a new quickmark.
+ You can view all saved quickmarks on the
+ link:qute://bookmarks[bookmarks page].
+
Args:
win_id: The window ID to display the errors in.
url: The url to add as quickmark.
diff --git a/qutebrowser/browser/webkit/network/qutescheme.py b/qutebrowser/browser/webkit/network/qutescheme.py
index a659395f5..85be4ceff 100644
--- a/qutebrowser/browser/webkit/network/qutescheme.py
+++ b/qutebrowser/browser/webkit/network/qutescheme.py
@@ -264,9 +264,8 @@ def qute_pdfjs(_win_id, request):
@add_handler('bookmarks')
-def qute_bookmarks(_win_id, request):
- """Handler for qute:bookmarks. Show a list of all quickmarks / bookmarks"""
-
+def qute_bookmarks(_win_id, _request):
+ """Handler for qute:bookmarks. Display all quickmarks / bookmarks."""
bookmarks = sorted(objreg.get('bookmark-manager').marks.items(),
key=lambda x: x[1]) # Sort by title
quickmarks = sorted(objreg.get('quickmark-manager').marks.items(),
diff --git a/tests/end2end/features/urlmarks.feature b/tests/end2end/features/urlmarks.feature
index 2f965169f..010d87f90 100644
--- a/tests/end2end/features/urlmarks.feature
+++ b/tests/end2end/features/urlmarks.feature
@@ -189,10 +189,10 @@ Feature: quickmarks and bookmarks
Scenario: Listing quickmarks
When I run :quickmark-add http://localhost:(port)/data/numbers/15.txt fifteen
- And I run :quickmark-add http://localhost:(port)/data/numbers/14.txt fourteen
+ And I run :quickmark-add http://localhost:(port)/data/numbers/14.txt fourteen
And I open qute:bookmarks
Then the page should contain the plaintext "fifteen"
- And the page should contain the plaintext "fourteen"
+ And the page should contain the plaintext "fourteen"
Scenario: Listing bookmarks
When I open data/title.html