Florian Bruhin
13269ef388
Wrap long lines
2016-08-01 12:46:47 +02:00
Florian Bruhin
a772e8a2c3
Mark :set-mark/:jump-mark as hidden
...
Fixes #1708 .
2016-08-01 12:21:18 +02:00
nanjekyejoannah
212d5fe932
commit resolving issue #1395
2016-08-01 11:28:27 +03:00
Ryan Roden-Corrent
a086095954
Implement unix_filename_rubout.
...
unix_filename_rubout deletes to the previous slash or whitespace,
unlike the previously implemented backwards-kill-word which treats and
non-alphanumeric character as a boundary.
To illustrate, given the text 'foo/bar.baz', unix_filename_rubout will
delete 'bar.baz' while backwards-kill-word will delete only 'baz'.
See #1710 .
2016-07-30 19:34:38 -04:00
Ryan Roden-Corrent
6bcdacf1ce
Implement readline's backward-kill-word.
...
This restores the previous behavior of `unix-word-rubout` as
`backward-kill-word`, which is closer to the naming used in readline.
It is bound to <Alt-Backspace> by default, though <Ctrl-Backspace> will
also work due to a builtin binding.
Resolves #1698 .
2016-07-30 07:27:29 -04:00
Marshall Lochbaum
a7438f4f15
Extend tab-move's direction argument to take an index ( fixes #1701 )
2016-07-29 23:06:51 -04:00
Marshall Lochbaum
b22634e2eb
Correct qutebrowser.conf documentation for list types
2016-07-29 16:08:42 -04:00
Ryan Roden-Corrent
fbadc5e668
Remove second arg from on_selection_changed.
...
The deselected argument was unused, so remove it from the signal and
the slot.
2016-07-29 08:48:24 -04:00
Florian Bruhin
14eabc7160
Merge branch 'completion_trivial' of https://github.com/lahwaacz/qutebrowser into lahwaacz-completion_trivial
2016-07-29 12:08:10 +02:00
Florian Bruhin
066c9bf4dc
Split websettings into web{kit,engine,}settings
2016-07-29 12:01:22 +02:00
Florian Bruhin
08a9786a73
Add a stub for WebEnginePage.createWindow
...
See #1699 .
2016-07-29 10:35:14 +02:00
Florian Bruhin
cffe2281b1
Use qtmodeltester for completion model tests
...
See http://pytest-qt.readthedocs.io/en/latest/modeltester.html
See #1702
2016-07-29 10:26:55 +02:00
Jakub Klinkovský
2a70146db1
Remove unneeded invalidateFilter call.
...
First done in b5781f0ed3
and later
reverted in a6f1bf29ae
because it had
broken "completion->shrink", but that is no longer the case.
2016-07-29 10:15:21 +02:00
Jakub Klinkovský
119f9c0e18
completion: get rid of model-specific sort method (see #545 )
2016-07-29 10:13:32 +02:00
Jakub Klinkovský
49327dfcbb
completion: highlight only the matched terms
...
closes #1650
2016-07-29 10:13:32 +02:00
Jakub Klinkovský
caf5937585
completion: get rid of custom_filter (see #545 )
2016-07-29 10:13:27 +02:00
Florian Bruhin
af704439d9
Remove trailing newline
2016-07-29 09:05:25 +02:00
Claire Cavanaugh
3d258df23a
Heil PEP8 :P
2016-07-28 23:24:34 -07:00
Claire Cavanaugh
bf44636a24
:open opens quickmark when given a quckmark name
2016-07-28 22:50:10 -07:00
Ryan Roden-Corrent
e8f73b0fe6
Break up MainWindow.__init__.
...
Split out initialization of a few areas into private functions so
pylint won't complain about a long method.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
dd827332c0
Clean up unused imports from completion refactor.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
f31e890862
Move completion_item_{next,prev} to CompletionView.
...
These commands are more closely tied to the CompletionView than
Completer. This removes the need for an extra signal tying the
CompletionView to the Completer.
The call to _open_completion_if_needed was moved to
on_selection_changed, as this will already be called when a new item is
selected.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
ffc5a42d04
Don't use objreg to get CompletionView.
...
The CompletionView is the parent of the Completer, so there's no need
to use objreg to get it.
See #640 .
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
b9cf9d180b
Decouple Completer and CompletionView.
...
Rather than having a CompletionView instantiate and register a
Completer, instantiate both in MainWindow. The CompletionView is the
parent of the Completer, and communicates by emitting
selection_changed, meaning it no longer needs to contain a reference to
the Completer.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
d836fcb118
Code review for completion tests.
...
- clean up docstring typos
- use _ to name an unused loop variable
- parent the filter model to avoid an issue with disposal
- use mocker.patch instead of monkeypatch to mock Completer creation
- use is instead of == to compare by identity
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
e5da179ebf
Limit the public interface of Completer.
...
Only schedule_completion_update and selection_changed are used
externally, so mark the rest of the API as private.
2016-07-28 12:20:24 -04:00
Florian Bruhin
b48b7eddc8
Add no-cover pragma for _rect_on_view_js
2016-07-28 17:33:04 +02:00
Florian Bruhin
56515321dd
Handle failing javascript in webelem.rect_on_view
...
Fixes #1641 .
2016-07-28 17:10:31 +02:00
Florian Bruhin
5463e133ee
Split webelem.rect_for_view into two methods
2016-07-28 17:09:07 +02:00
Florian Bruhin
d6b6afdf11
Fix WebElementWrapper.__eq__
2016-07-28 15:57:25 +02:00
Florian Bruhin
1213b91b66
Fix ALL the contentsSizeChanged connections!
2016-07-28 15:29:56 +02:00
Florian Bruhin
9cbf9eaa76
Disconnect contents_size_changed during cleanup
2016-07-28 14:59:23 +02:00
Florian Bruhin
21c1dec59a
Actually handle contents_size_changed correctly
2016-07-28 14:56:42 +02:00
Florian Bruhin
d357ccf403
Add some more WebElementWrapper tests
2016-07-28 14:25:53 +02:00
Florian Bruhin
b0a0984fe7
Add missing check_vanished in remove_blank_target
2016-07-28 13:13:21 +02:00
Florian Bruhin
41e6a2392a
QtWebEngine: Add stub for find_all_elements
2016-07-28 12:36:09 +02:00
Florian Bruhin
631109e5eb
Fix raising of WebTabError
2016-07-28 12:36:09 +02:00
Florian Bruhin
d87840e254
Fix lint
2016-07-28 12:36:09 +02:00
Florian Bruhin
540c62c232
Add only_visible to find_all_elements
2016-07-28 12:36:09 +02:00
Florian Bruhin
5b943a431e
Fix WebElementWrapper.text
2016-07-28 12:36:09 +02:00
Florian Bruhin
49f57a5d7e
Fix userscripts
2016-07-28 12:36:09 +02:00
Florian Bruhin
5eca6e11a5
Fix editor/paste-primary
2016-07-28 12:36:09 +02:00
Florian Bruhin
e051de4843
Fix word hinting
2016-07-28 12:36:09 +02:00
Florian Bruhin
ffdaf8d470
Move webelem.is_visible/.rect_on_view to methods
2016-07-28 12:36:09 +02:00
Florian Bruhin
4318604c57
Don't use javascript in webelem.set_text for hints
2016-07-28 12:36:09 +02:00
Florian Bruhin
193c755637
Refactor WebElement API, part 2
...
Now we don't get a crash, but not any hints either...
2016-07-28 12:35:59 +02:00
Florian Bruhin
c5a91004f5
Add contents_size_changed to tab API
2016-07-28 12:35:56 +02:00
Florian Bruhin
c764733472
Refactor QWebElement API, part 1
2016-07-28 12:35:49 +02:00
Florian Bruhin
016c13a998
Use repr() for rfc2622 logging
2016-07-28 07:28:21 +02:00
Florian Bruhin
caab826e8a
Use repr() for IPC logging messages
2016-07-28 07:14:54 +02:00
Marshall Lochbaum
2c37de3ac1
Revert startpage config type to String instead of Url
2016-07-27 14:21:25 -04:00
Florian Bruhin
73cd0e01ef
Fix deleting of quickmarks with ctrl-d
2016-07-27 19:44:34 +02:00
Marshall Lochbaum
642abac634
Remove BaseList type
2016-07-27 13:06:15 -04:00
Marshall Lochbaum
b205ad500b
Add tests for configtypes.Url
2016-07-27 12:44:10 -04:00
Marshall Lochbaum
b4fec256dc
Merge LengthList into List
2016-07-27 12:39:03 -04:00
Florian Bruhin
04aa98d7fb
Release v0.8.1
2016-07-27 12:41:40 +02:00
Florian Bruhin
0eb74dcc1b
Hide harfbuzz warning if frozen
2016-07-27 12:15:10 +02:00
Florian Bruhin
7b82d81784
Improve error message on OS X without QtWebEngine
2016-07-27 12:13:22 +02:00
Florian Bruhin
9ff006746f
Handle empty command in CommandRunner.parse_all
...
Sicne we now call self._get_alias there, we also need to make sure it's
not an empty string before that.
Introduced in #1577 . Fixes #1690 .
2016-07-27 11:19:01 +02:00
Florian Bruhin
be609d5779
Improve logging for BaseKeyParser
...
See #1653
2016-07-27 10:27:53 +02:00
Florian Bruhin
ccbd47a0cd
Merge branch 'savefile_open-flush' of https://github.com/flv0/qutebrowser into flv0-savefile_open-flush
2016-07-27 10:11:33 +02:00
Marshall Lochbaum
a3c7ed51d4
Create LengthList to remove WebKitBytesList and refactor Padding
2016-07-26 23:59:55 -04:00
Marshall Lochbaum
083baf1222
Remove unnecessary List subclasses
2016-07-26 23:05:42 -04:00
Marshall Lochbaum
9e86933913
Replace List with BaseList and rename GenList to List
2016-07-26 23:02:10 -04:00
Marshall Lochbaum
d77145a5b8
Add GenList type and refactor *List types to use GenList
2016-07-26 21:34:50 -04:00
Florian Bruhin
cd905841e0
Don't log on_focus_changed warning if new is None
2016-07-26 23:27:20 +02:00
Florian Bruhin
2121865bdd
Show jsret value in update_scroll_pos callback
2016-07-26 23:26:20 +02:00
Marshall Lochbaum
b2c2d5a4f4
Add --delete option to bookmark-load
2016-07-26 13:49:17 -04:00
Marshall Lochbaum
d9247c15a4
Coding style fixes
2016-07-26 09:48:35 -04:00
Marshall Lochbaum
28842c90b6
Add --toggle flag to bookmark-add ( fixes #1667 )
2016-07-26 09:07:21 -04:00
Florian Bruhin
b12c984846
Release v0.8.0
2016-07-26 13:30:41 +02:00
Florian Bruhin
07e0ae5584
Un-hide --backend argument
2016-07-26 13:30:41 +02:00
Florian Bruhin
3ccb691e9f
tab API: Rename scroll to scroller
...
The scroll attribute did overwrite QWidget.scroll which is unfortunate.
2016-07-26 13:19:07 +02:00
Florian Bruhin
878fa26247
Use real slots for QtWebKit signals
...
Otherwise we can get this when immediately quitting:
Traceback (most recent call last):
File ".../qutebrowser/browser/webkit/webkittab.py", line 580, in <lambda>
not self._widget.page().error_occurred))
RuntimeError: wrapped C/C++ object of type WebView has been deleted
2016-07-26 12:55:40 +02:00
Florian Bruhin
49977a32c4
Remove unused imports
2016-07-26 11:09:24 +02:00
Florian Bruhin
70d6f90f08
Display key hint for :prompt-download-open
...
This also splits up _display_question into one method per mode.
2016-07-26 11:08:03 +02:00
Florian Bruhin
d70f3a0417
Merge branch 'Kingdread-open-download'
2016-07-26 10:54:59 +02:00
Florian Bruhin
36b0054238
Add keyconf.get_reverse_bindings_for
2016-07-26 10:50:50 +02:00
Florian Bruhin
f4f6a3dac1
Merge branch 'open-download' of https://github.com/Kingdread/qutebrowser into Kingdread-open-download
2016-07-26 10:32:34 +02:00
Florian Bruhin
da64db853e
Update docs
2016-07-26 08:36:16 +02:00
Florian Bruhin
dab17b801e
Merge branch 'mark-del-no-args' of https://github.com/mlochbaum/qutebrowser into mlochbaum-mark-del-no-args
2016-07-26 08:33:17 +02:00
Florian Bruhin
1564563662
Don't enable warnings if log was never inited
...
Otherwise, anything importing qtutils (which uses ignore_py_warnings
on module level) would enable warnings. This means pylint showed its own
warnings because of qute_pylint.config.
2016-07-25 13:03:58 +02:00
Florian Bruhin
c3f53312af
Fix 'is not' string comparison
2016-07-23 19:51:13 +02:00
Florian Bruhin
e887d9a381
Remove useless super-calls
2016-07-23 18:39:27 +02:00
Marshall Lochbaum
3ffb726b98
Merge branch 'master' into mark-del-no-args
2016-07-23 12:12:19 -04:00
Marshall Lochbaum
1781d0fba3
Use DoesNotExistError rather than CommandError in get_by_qurl
2016-07-23 12:05:21 -04:00
Marshall Lochbaum
9758b52d91
Assume _current_url is valid (remove try/except)
2016-07-23 12:05:21 -04:00
Marshall Lochbaum
02731743c0
Use qtutils.ensure_valid instead of testing isValid in get_by_qurl
2016-07-23 12:05:11 -04:00
Marshall Lochbaum
cba25d2bbb
Remove quickmark_del and bookmark_del from the urlmark classes (use delete instead)
2016-07-23 10:55:57 -04:00
Florian Bruhin
91b754d6ea
Merge branch 'issue_1033_bookmark_display' of https://github.com/winged/qutebrowser into winged-issue_1033_bookmark_display
2016-07-23 15:42:33 +02:00
David Vogt
1f320b8686
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
2016-07-23 14:50:28 +02:00
Florian Bruhin
02a06732ff
Also ignore ImportWarning for pkg_resources import
2016-07-23 14:15:39 +02:00
David Vogt
11bf5c8809
Minor cleanups. Whitespace / indentation CSS.
...
There were some CSS classes that were not used in the bookmarks page.
Also, fixes a small indentation / code alignment issue
2016-07-23 13:06:56 +02:00
Florian Bruhin
40a3e24b05
Ignore warning when importing pkg_resources
...
On Debian Jessie we get a PendingDeprecationWarning which we now see
since the log is init'ed earlier.
2016-07-23 13:04:53 +02:00
Florian Bruhin
64f208486e
Add log.ignore_py_warnings()
2016-07-23 13:04:45 +02:00
Florian Bruhin
36bb5cf285
Merge branch 'issue_1670_tests_fail_due_to_SSL_error' of https://github.com/ganwell/qutebrowser into ganwell-issue_1670_tests_fail_due_to_SSL_error
2016-07-23 12:46:16 +02:00
David Vogt
8bbfcc01be
Sort bookmarks / quickmarks by title or name respectively.
2016-07-23 12:32:05 +02:00
David Vogt
85be6565fc
Implement feature request #1033 : Bookmark display
...
There is a new page now, qute:bookmarks that will display all bookmarks and
quickmarks. It's still missing a search / filter feature, but you can use
the built-in search / navigation just as easily for now.
2016-07-23 12:09:49 +02:00
Jean-Louis Fuchs
f040fd5a6d
Ignore missing SSLv3 messages from Qt
2016-07-23 10:01:56 +00:00
Jean-Louis Fuchs
ef01566621
Initialize qt logging to qutebrowser as early as possible
2016-07-23 09:54:13 +00:00
Florian Bruhin
76eab7617b
Remove @pyqtSlot for functions and non-QObjects
...
Fixes #1669
2016-07-23 11:42:50 +02:00
Marshall Lochbaum
19949101c6
Make quickmark_del with no argument delete the current page's mark ( fixes #1661 )
2016-07-21 22:32:04 -04:00
Marshall Lochbaum
83005bc072
Make bookmark_del with no argument delete the current page's mark
2016-07-21 21:14:54 -04:00
Florian Bruhin
63e466f019
Remove @pyqtSlot for some non-QObject classes
...
Not sure if I got all, but at least I got the ones which fail
immediately on start.
See #1669 .
2016-07-21 14:56:12 +02:00
Jakub Klinkovský
202883fc03
fix #1657
...
The _filterstr attribute was not cleaned up properly and persisted
between hintings. In this case, it was set to something representing the
Escape key.
2016-07-17 17:36:35 +02:00
Florian Bruhin
d867a789c2
Re-enable crash reports for QtWebEngine
2016-07-17 14:27:01 +02:00
Florian Bruhin
d710a98f46
Fix lint
2016-07-15 15:52:48 +02:00
Florian Bruhin
e2c4e6301f
QtWebEngine: Implement scroll.at_top()
2016-07-15 14:00:41 +02:00
Florian Bruhin
695864281b
QtWebEngine: Implement pixel scroll position in JS
2016-07-15 13:04:44 +02:00
Florian Bruhin
7adc8ab2d6
QtWebEngine: Implement scroll position based on JS
2016-07-15 12:52:27 +02:00
Florian Bruhin
d079caafa8
Add possibility to disable spellcheck
2016-07-15 00:07:37 +02:00
Florian Bruhin
a8dc940b73
test/vulture reqs: Update vulture to 0.10
...
* Detect unused function and method arguments.
* Detect unused *args and **kwargs parameters.
* Change license from GPL to MIT.
2016-07-14 23:17:39 +02:00
Florian Bruhin
675e6eca23
Add old tab.seperator spellings to DELETED_OPTIONS
...
This was never caught due to the bug in the last commit, but now makes
reading very old configs fail.
2016-07-14 16:59:33 +02:00
Florian Bruhin
7b9d38e438
Fix config values being lost with DELETED_OPTIONS
...
When an option was deleted, we accidentally stopped reading instead of
ignoring that one option and then resuming.
2016-07-14 16:58:54 +02:00
Daniel Schadt
b995b9d5da
downloads: fix docstrings for new return value
2016-07-13 22:25:23 +02:00
Florian Bruhin
ff89ae7839
Merge branch 'master' of https://github.com/blyxxyz/qutebrowser into blyxxyz-master
2016-07-13 21:21:37 +02:00
Florian Bruhin
c9176b7c58
QtWebEngine: Fix 'unset' with run_js_blocking
2016-07-13 18:17:37 +02:00
Florian Bruhin
a7509d5978
Fix lint
2016-07-13 16:01:12 +02:00
Jan Verbeek
13cbdbb8bd
Record mode for :repeat-command before executing
2016-07-13 15:24:45 +02:00
Florian Bruhin
5b1cca92ab
Add run_js_blocking to tab API
2016-07-13 13:47:30 +02:00
Florian Bruhin
c83a8a64dc
QtWebEngine: Implement scroll.delta_page
2016-07-13 11:26:53 +02:00
Florian Bruhin
602d10c495
QtWebEngine: Implement scroll.to_point/.delta
2016-07-13 11:21:50 +02:00
Florian Bruhin
b78b89f04f
QtWebEngine: Implement :scroll-perc via JS
2016-07-13 10:55:04 +02:00
Florian Bruhin
9c49900f9e
QtWebEngine: Add JS logging
2016-07-13 10:55:04 +02:00
Daniel Schadt
7597221776
fix lint
2016-07-12 22:39:21 +02:00
Daniel Schadt
940b124253
switch set literal to list literal
...
See PR #1642 .
😗 🎶
2016-07-12 22:31:43 +02:00
Jan Verbeek
0cd39ae4ff
Change sets to lists
2016-07-12 22:21:05 +02:00
Jan Verbeek
bbc46d28ff
Use lists instead of tuples for comparing
...
Per one of the diff comments on #1597 :
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
2016-07-12 22:05:32 +02:00
Florian Bruhin
40455b2692
Always set FindWrapsAroundDocument in WebKitSearch
...
We accidentally set it to never wrap with the wrap-search option
removal, but we want to *always* wrap.
2016-07-12 17:28:59 +02:00
Florian Bruhin
54c00deb5b
Remove checking of 'wrap' in WebEngineSearch
...
wrap functionality was removed, so no point in doing this here.
2016-07-12 17:28:28 +02:00
Daniel Schadt
a088f238e5
usertypes: remove Frankenstein's enum
...
This approach is not as weird in Python and still works.
DownloadTarget.OpenDownload has been renamed to OpenFileDownloadTarget,
since OpenDownloadDownloadTarget didn't look as nice.
2016-07-12 17:10:36 +02:00
Daniel Schadt
ed5fb4de4a
downloads: make get_tmpdir private
2016-07-12 17:06:40 +02:00
Daniel Schadt
17175ec3d4
mhtml: remove duplicated usertypes import
2016-07-12 17:06:40 +02:00
Daniel Schadt
d42d980dda
downloads: introduce target= param for .get/.fetch
...
This parameter replaces the filename and fileobj parameters. This makes
it easier to add more download targets, since only one may be "chosen".
With the OPEN_DOWNLOAD special case added, handling of filename got a
bit ugly, since it may be either None, OPEN_DOWNLOAD or a str with the
file path, and we had to make sure only one target was chosen.
With the new target enum, this handling can be simplified and we
automatically get the guarantee that only one target is chosen.
2016-07-12 17:06:40 +02:00
Daniel Schadt
16e1f8eac9
downloads: fix docstring for .get()
...
An earlier commit removed the prompt_download_directory parameter, it is
now passed via **kwargs and should thus be removed from the docstring.
2016-07-12 16:52:01 +02:00
Daniel Schadt
203dad0004
fix lint
2016-07-12 16:52:01 +02:00
Daniel Schadt
8795f89c88
tests: fix tests for downloads bdd test
...
The test was failing because of two reasons:
First, the old code had filename questions in DownloadManager.get and
DownloadManager.fetch which were almost identical, thus the part in
DownloadManager.get was removed in an earlier commit. All filename
asking is now done by DownloadManager.fetch. The good part is code
deduplication, the bad part is slightly modified behavior: The new code
doesn't wait for a filename to start the download, instead it tries to
fill the buffer immediately. This made the test fail because qute:// has
no registered handler, so in order for the test to pass now, the "no
crash" part is not enough, we also need to expect the "No handler"
error.
Secondly, and a rather rare (race) condition was the handling of errors
in the DownloadItem. If an error occured after the registration of
self.on_reply_error as error handler and before the check
reply.error() != QNetworkReply.NoError
at the end of the function, the error signal would be emitted twice:
Once by _die() (called by on_reply_error), and once by the init_reply
function directly (in the last if block). This lead to duplicated error
messages. This is also explained in a comment in the file (with small
"stack traces").
2016-07-12 16:52:01 +02:00
Daniel Schadt
b130c2a284
keybindings: add default for prompt-open-download
2016-07-12 16:52:01 +02:00
Daniel Schadt
81b2688c70
downloads: use global TempDownloadManager
...
This way, all temporary downloads will end up in the same directory and
everything is cleaned up at program exit, not when the corresponding
window is closed.
2016-07-12 16:52:01 +02:00
Daniel Schadt
c060f9e5c2
allow downloads to be openened directly
...
The file is saved in a temporary directory, which is cleaned up when the
window is closed.
2016-07-12 16:52:01 +02:00
Jan Verbeek
cafe7181c7
Blacklist command-accept, hide repeat-command
...
prompt-accept was blacklisted instead of command-accept.
2016-07-12 16:48:33 +02:00
Florian Bruhin
64b32ec87d
Remove general -> wrap-search
2016-07-12 16:47:57 +02:00
Florian Bruhin
f0da508c21
Move searching out of WebView subclass
...
This also makes it work for QtWebEngine.
It also seems to fix #1050 though I'm not 100% sure why.
2016-07-12 16:29:50 +02:00
Florian Bruhin
cd4eff364a
Add printing to tab API
...
This fixes printing for QtWebKit, and hopefully will make printing to
PDF work with QtWebEngine with Qt >= 5.7
2016-07-12 12:54:11 +02:00
Jan Verbeek
ee4b24a5dc
Blacklist leave-mode, use "not in"
2016-07-12 11:03:36 +02:00
Florian Bruhin
7a39021d41
Merge branch 'issues/1630' of https://github.com/jdkaplan/qutebrowser into jdkaplan-issues/1630
2016-07-12 10:07:59 +02:00
Jeremy Kaplan
6b2b096f3c
Add test for :print --pdf
2016-07-11 20:08:24 -04:00
Jeremy Kaplan
62ae793a24
Generate docs
2016-07-11 20:07:54 -04:00
Jan Verbeek
508c0f21fa
Blacklist prompt-accept, remove mode_allowed
2016-07-12 00:23:34 +02:00
Florian Bruhin
d315a3131d
Require QtWebEngine with --backend webengine
2016-07-11 22:51:05 +02:00
Florian Bruhin
4f9be56d7d
Merge branch 'add-bookmark-by-url' of https://github.com/ismail-s/qutebrowser into ismail-s-add-bookmark-by-url
2016-07-11 20:54:09 +02:00
Florian Bruhin
3d4cf1fc92
QtWebEngine: Fix icon access on Qt < 5.7
2016-07-11 18:24:38 +02:00
Florian Bruhin
ed5af29ac9
Fix lint
2016-07-11 16:43:06 +02:00
Florian Bruhin
f2c52f96a1
Fix _on_url_changed
2016-07-11 16:33:19 +02:00
Florian Bruhin
8b67d68d4a
Move qtutils.ensure_valid in WebView.openurl
2016-07-11 16:32:24 +02:00
Florian Bruhin
e80475ed57
Remove support for showing JS statusbar messages
...
Closes #1579 .
2016-07-11 16:19:44 +02:00
Florian Bruhin
d0aea24568
Remove WebView.linkHovered signal
2016-07-11 16:09:17 +02:00
Florian Bruhin
914f9db8ca
Actually connect _on_url_changed slot
2016-07-11 16:05:09 +02:00
Florian Bruhin
f46d6cbe27
Fix url_text, take 3
2016-07-11 15:06:36 +02:00
Florian Bruhin
9b75e661e2
Fix missed url_text substitutions
2016-07-11 14:59:35 +02:00
Florian Bruhin
5d6eedcd49
Move URL/title handling to AbstractTab
2016-07-11 14:36:57 +02:00
Florian Bruhin
a470bfc3f3
Get rid of url_text_changed signal
...
Instead we simply use url_changed which (similar to Qt's urlChanged)
simply has a QUrl argument.
2016-07-11 14:28:51 +02:00
Florian Bruhin
5cbd540e15
Get rid of WebView.cur_url attribute
...
The only thing which differs from url() is that it got set immediately
after openurl() was called, which might or might not have improved
something.
Let's see if things still work the same without it.
2016-07-11 14:20:46 +02:00
Florian Bruhin
7e36884cbd
Add some debug logging to early QWEW import
...
See #1640
2016-07-11 13:49:24 +02:00
Florian Bruhin
6a07d231f4
pykint: Add some disable=unused-variable
2016-07-11 13:18:31 +02:00
Florian Bruhin
a64937122d
Drop unneeded .keys()
2016-07-11 13:13:16 +02:00
Florian Bruhin
1d237b0569
pylint: ignore wrong-import-position project-wide
...
While it's more accurate with isort now, we get a wrong-import-position
for everything in scripts/ where we have to do the sys.path magic first.
2016-07-11 13:00:37 +02:00
Florian Bruhin
c558a8b4ad
Add missing docstring
2016-07-11 12:42:51 +02:00
Florian Bruhin
e9d606a782
Move load_status / SSL errors to AbstractTab
2016-07-11 12:09:41 +02:00
Florian Bruhin
6ae232d8fc
Move 'progress' to AbstractTab
...
This makes load progress work with QtWebEngine.
2016-07-11 11:31:59 +02:00
Florian Bruhin
8567fffdad
Merge branch 'qtwebengine'
2016-07-11 10:56:20 +02:00
Florian Bruhin
b4f993e2ab
Add an early-import for QtWebEngineWidgets
2016-07-11 09:18:05 +02:00
Jeremy Kaplan
a6a030e92f
Add :print --pdf flag to skip printing dialog
2016-07-10 21:58:54 -04:00
Florian Bruhin
01b7b27bda
Fix lines which are now too long
2016-07-10 17:33:36 +02:00
Florian Bruhin
b791095324
Rename browser.tab module and classes
2016-07-10 17:27:02 +02:00
Florian Bruhin
d2ece6b542
Move Backend enum to usertypes
...
Otherwise we have a cyclic import
2016-07-10 17:04:26 +02:00
Florian Bruhin
34e39bed4e
Add a test for cmd instance with wrong backend
2016-07-10 17:04:25 +02:00
Florian Bruhin
b07cca023b
Fix Command.run with no arguments
2016-07-10 17:04:25 +02:00
Florian Bruhin
0ab601aaf3
Make it possible to limit commands to backends
2016-07-10 16:57:02 +02:00
Florian Bruhin
11cd5f8653
Don't register webview in objreg
...
All places now should use the tab API instead.
2016-07-08 17:21:33 +02:00
Florian Bruhin
67eea1678e
Move tab registry from webview to tab
2016-07-08 17:13:18 +02:00
Florian Bruhin
dcf39538a3
Improve objreg error message if no window is given
2016-07-08 17:09:20 +02:00
Ismail S
fd7342b055
Move """ to separate line
2016-07-08 15:58:47 +01:00
Ismail S
5ad66c29e1
Update docstring
2016-07-08 15:38:58 +01:00
Ismail S
babbd0771c
Refactor code
2016-07-08 15:33:13 +01:00
Florian Bruhin
7360ea69ba
Fix lint
2016-07-08 13:08:31 +02:00
Florian Bruhin
06a6daee34
Add stubs for QtWebEngine
2016-07-08 12:53:48 +02:00
Florian Bruhin
cc11af5e28
Fix lint
2016-07-08 11:21:00 +02:00
Florian Bruhin
b1fda1b0ef
Get rid of tab.run_webaction
...
As mentioned here:
e4b0b7fffd (r70002693)
It makes no sense to add a backend-specific run_webaction method to
AbstractTab - better to just access _widget directly in this one place
instead of adding something backend-speficic to the API.
2016-07-08 10:42:54 +02:00
Florian Bruhin
55784f9783
Add tab.create() helper function
2016-07-08 10:38:52 +02:00
Florian Bruhin
334f6cda4f
tab: Rename modeman to mode_manager
...
To avoid it being mixed up with the modeman module
2016-07-08 10:38:51 +02:00
Florian Bruhin
f9eecaf584
Fix typo
2016-07-08 10:09:49 +02:00
Florian Bruhin
09f4c2199e
Rename widget to tab in some places
...
This also fixes the cur_url access.
2016-07-08 10:08:44 +02:00
Florian Bruhin
b8086d1d13
mhtml: web_view -> tab rename
...
Otherwise this sounds like we still have a QWebView.
This also fixes the cur_url access.
2016-07-08 10:08:11 +02:00
Florian Bruhin
2befebaf3a
Don't use properties for AbstractTab
...
Otherwise exceptions in there could be hidden by Python/PyQt.
Some places are not changed yet, as there are also other renames in the
next commits.
2016-07-08 10:05:46 +02:00
Florian Bruhin
ecd399181d
Fix AbstractSearch attribute docs
2016-07-08 09:15:28 +02:00
Jan Verbeek
a8c55ffe08
Stop downloads bar from pushing away status bar
2016-07-07 23:11:08 +02:00
Ismail S
3b0fb84c47
Allow adding bookmarks by url
2016-07-07 20:16:19 +01:00
Florian Bruhin
e4b0b7fffd
Fix lint
2016-07-07 20:12:17 +02:00
Florian Bruhin
dde8ac6844
Use __slots__ for tab.TabData
2016-07-07 19:36:27 +02:00
Florian Bruhin
b999090a51
Hide --backend argument for now
2016-07-07 19:28:00 +02:00
Florian Bruhin
0207f8758b
Only disable reports with --backend webengine
2016-07-07 18:32:52 +02:00
Florian Bruhin
2fd01e57e6
Add default value for --backend argument
2016-07-07 18:32:52 +02:00
Florian Bruhin
ee7b4256a9
Fix AbstractTab repr() with no URL available
2016-07-07 18:32:52 +02:00
Florian Bruhin
d9516b9c1d
Adjust various comments
2016-07-07 18:32:52 +02:00
Florian Bruhin
3c99436950
Make on_* methods in tab private
2016-07-07 18:32:52 +02:00
Florian Bruhin
868f781f4d
Rename zoom._set_default_zoom to zoom.set_default
2016-07-07 18:32:52 +02:00
Florian Bruhin
1c9d0857cb
Various cleanups
2016-07-07 18:32:52 +02:00
Florian Bruhin
40f0aa0023
Fix pylint without QtWebEngine available
2016-07-07 18:32:52 +02:00
Florian Bruhin
7e3e9618b2
Revert "Adjust QtWebKit _key_press to QtWebEngine one"
...
This reverts commit f52326c5eea83e58d95afb696480600c6a8a5b7b.
For some reason this causes a lot of segfaults...
2016-07-07 18:32:52 +02:00
Florian Bruhin
e1bad17f2a
Split up SessionManager._save_tab_item
2016-07-07 18:32:52 +02:00
Florian Bruhin
b23ddb31c9
Fix lint
2016-07-07 18:32:52 +02:00
Florian Bruhin
be02bfb37d
Unify arguments for on_mode_* slots in Caret
2016-07-07 18:32:52 +02:00
Florian Bruhin
df2c50aa60
Add class docstrings for webkittab/webenginetab
2016-07-07 18:32:52 +02:00
Florian Bruhin
de60ad04dc
Fix mouse wheel zooming
2016-07-07 18:32:52 +02:00
Florian Bruhin
f72f82fb0c
QtWebEngine: Fix userData() call on session saving
2016-07-07 18:32:52 +02:00
Florian Bruhin
b78de501c2
Adjust QtWebKit _key_press to QtWebEngine one
2016-07-07 18:32:52 +02:00
Florian Bruhin
47ce6aff89
Send QtWebEngine fake key events to focus proxy
...
This fixes simple scrolling with QtWebEngine.
2016-07-07 18:32:52 +02:00
Florian Bruhin
ec053f8007
Simplify TabData implementation
...
This uses direct attributes instead of self._data which means we can
only override __setattr__, and pylint will better understand what's
happening.
2016-07-07 18:32:52 +02:00
Florian Bruhin
40d28b80bf
Fix typo
2016-07-07 18:32:52 +02:00
Florian Bruhin
2bd07937e5
Remove unnecessary TabData.__getattr__ code
...
__getattribute__ is used in that case; see
https://github.com/PyCQA/pylint/issues/979
2016-07-07 18:32:52 +02:00
Florian Bruhin
09f025628f
Use tab.AbstractTab for signals/slots
2016-07-07 18:32:52 +02:00
Florian Bruhin
7444f83dbf
Fix importing of QtWebEngine specific code
2016-07-07 18:32:52 +02:00
Florian Bruhin
17466b4f26
Fix some lint
2016-07-07 18:32:52 +02:00
Florian Bruhin
7b37d85150
Pass modeman as argument to AbstractTab
2016-07-07 18:32:52 +02:00
Florian Bruhin
e0cd878606
Fix/tunnel mhtml downloads
2016-07-07 18:32:52 +02:00
Florian Bruhin
0719101b6f
Also tunnel :paste-primary
2016-07-07 18:32:52 +02:00
Florian Bruhin
21b282ce29
Get rid of _DummyUserscriptRunner
...
This simplifies the code a bit and only provides
userscript.run_async (and not the UserscriptRunner class) as entrypoint.
2016-07-07 18:32:52 +02:00
Florian Bruhin
a6307497c0
Rewrite userscripts to work with async dumping
2016-07-07 18:32:52 +02:00
Florian Bruhin
edafa7c99f
Tunnel a few features until we have a proper API
2016-07-07 18:32:52 +02:00
Florian Bruhin
3c71337698
Handle OverflowError when scrolling
2016-07-07 18:32:52 +02:00
Florian Bruhin
0937a64f1c
Fix :inspect
2016-07-07 18:32:52 +02:00
Florian Bruhin
675f95a2e4
Add stubs for on_mode_{entered,left} for WebEngine
...
This means at least we won't get a crash when using the commandline.
2016-07-07 18:32:52 +02:00
Florian Bruhin
12fc0821c0
Try to implement some QtWebEngine scrolling
2016-07-07 18:32:52 +02:00
Florian Bruhin
9c5143786c
Implement scroll.pos_perc for QtWebEngine
2016-07-07 18:32:52 +02:00
Florian Bruhin
a1f4dcd542
Add QWebEngineView subclass
2016-07-07 18:32:52 +02:00
Florian Bruhin
822e193682
Fix :view-source
2016-07-07 18:32:52 +02:00
Florian Bruhin
04ee021bdb
Add AbstractTab.set_html
2016-07-07 18:32:52 +02:00
Florian Bruhin
78f425c98b
Add AbstractTab.data
2016-07-07 18:32:52 +02:00
Florian Bruhin
70b7314b76
Fix :debug-webaction
2016-07-07 18:32:52 +02:00
Florian Bruhin
deb0a10973
Add AbstractTab.backend attribute
2016-07-07 18:32:52 +02:00
Florian Bruhin
4de48620e3
Fix loading of sessions
2016-07-07 18:32:52 +02:00
Florian Bruhin
a62e2a0c27
Fix :undo
2016-07-07 18:32:52 +02:00
Florian Bruhin
09c3528585
Fix loading of marks
...
This probably broke when merging from master.
2016-07-07 18:32:52 +02:00
Florian Bruhin
5dfd8d68bf
Set focus proxy for AbstractTab
...
By default, the AbstractTab object got the focus, which means things
like key events passed to it didn't actually get passed through to the
web view, causing these tests to fail:
tests/end2end/features/test_keyinput_bdd.py::test_forwarding_all_keys
tests/end2end/features/test_keyinput_bdd.py::test_forwarding_special_keys
Now we make sure the real underlying WebView always gets the keyboard
focus.
2016-07-07 18:32:52 +02:00
Florian Bruhin
3c3043eeae
Add tab.clear_ssl_errors()
...
This fixes :debug-clear-ssl-errors
2016-07-07 18:32:52 +02:00
Florian Bruhin
86f63e1ae6
Add tab.new_tab_requested signal
2016-07-07 18:32:52 +02:00
Florian Bruhin
4d650c8dfd
Add tab.caret.follow_selected()
2016-07-07 18:32:52 +02:00
Florian Bruhin
1148184892
Add tab.set_open_target
...
This fixes :follow-selected
2016-07-07 18:32:52 +02:00
Florian Bruhin
5dd4b2d56a
Fix :buffer completion
2016-07-07 18:32:52 +02:00
Florian Bruhin
52efa9f185
Make AbstractHistory.history private
2016-07-07 18:32:52 +02:00
Florian Bruhin
b0ba2125a3
Fix :undo
2016-07-07 18:32:52 +02:00
Florian Bruhin
aebc29337a
Move __iter__ to AbstractHistory
2016-07-07 18:32:52 +02:00
Florian Bruhin
59c9ee88e5
Quick fix for createWindow
2016-07-07 18:32:52 +02:00
Florian Bruhin
94b856c565
Make self._widget private in wrappers
...
While we need to set it from the outside (from AbstractTab) this still
is not considered public API for the rest of the code, so let's make it
private.
2016-07-07 18:32:52 +02:00
Florian Bruhin
0b88c5d413
Re-implement searching for QtWebKit
2016-07-07 18:32:52 +02:00
Florian Bruhin
515d16f137
Move selection()/has_selection() to caret
2016-07-07 18:32:52 +02:00
Florian Bruhin
9f130c6b27
Disable crash reports
2016-07-07 18:32:52 +02:00
Florian Bruhin
5c535213ad
Random cleanups
2016-07-07 18:32:52 +02:00
Florian Bruhin
ac4186a0f0
Tunnel :hint and :navigate
2016-07-07 18:32:52 +02:00
Florian Bruhin
5fe2230e1f
Fix various scrolling issues
2016-07-07 18:32:52 +02:00
Florian Bruhin
16c397a9d2
Fix various zooming issues
2016-07-07 18:32:52 +02:00
Florian Bruhin
edb65ecf50
Add run_js_eval and get :jseval to run
2016-07-07 18:32:52 +02:00
Florian Bruhin
cd95f94ac8
Disallow None-callback for dump_async
2016-07-07 18:32:52 +02:00
Florian Bruhin
21753bc65f
Make AbstractCaret a QObject
2016-07-07 18:32:52 +02:00
Florian Bruhin
e21edd3e18
Implement selection
2016-07-07 18:32:52 +02:00
Florian Bruhin
90614d1fe3
Initial caret browsing support
2016-07-07 18:32:52 +02:00
Florian Bruhin
34d3d2cda6
Full scrolling implementation
2016-07-07 18:32:52 +02:00
Florian Bruhin
56852821e8
Try to fix _back_forward
2016-07-07 18:32:52 +02:00
Florian Bruhin
7319ced0bc
Fix history deserializing
2016-07-07 18:32:52 +02:00
Florian Bruhin
67ffa67968
Fix deserialize call
2016-07-07 18:32:52 +02:00
Florian Bruhin
7cbe174f1e
Fix set_zoom_factor call
2016-07-07 18:32:52 +02:00
Florian Bruhin
7e607a0cf2
Add icon()
2016-07-07 18:32:52 +02:00
Florian Bruhin
4fea285740
Add win_id attribute
2016-07-07 18:32:52 +02:00
Florian Bruhin
363f3d7ea7
Replace scroll_pos by scroll_pos_px()/_perc()
2016-07-07 18:32:52 +02:00
Florian Bruhin
ed716b2b90
Make session saving work
2016-07-07 18:32:52 +02:00
Florian Bruhin
2d590c581d
Make :reload and :stop work
2016-07-07 18:32:52 +02:00
Florian Bruhin
6a42e0c96c
Make shutdown work
2016-07-07 18:32:52 +02:00
Florian Bruhin
55753171f1
Make :back/:forward work
2016-07-07 18:32:52 +02:00
Florian Bruhin
3ee58fdea3
Get :debug-dump-page to work
2016-07-07 18:32:52 +02:00
Florian Bruhin
5b9ae8bc85
Initial history implementation
2016-07-07 18:32:52 +02:00
Florian Bruhin
8e5a86fb13
Don't require QtWebEngine
2016-07-07 18:32:52 +02:00
Florian Bruhin
bf286f8c74
Fix some tests
2016-07-07 18:32:52 +02:00
Florian Bruhin
115021b8ea
Get QtWebEngine to start and work somewhat
2016-07-07 18:32:52 +02:00
Florian Bruhin
b0a391932a
Get qutebrowser to run
2016-07-07 18:32:52 +02:00
Florian Bruhin
048f7dcaf5
Refactor signals
2016-07-07 18:32:52 +02:00
Florian Bruhin
4305966f7b
Add WrapperLayout/AbstractTab
2016-07-07 18:32:52 +02:00
Florian Bruhin
ade9b17b22
Remove now unused version.GPL_BOILERPLATE
2016-07-07 08:58:02 +02:00
Florian Bruhin
ebf9bc4e0a
Improve version output
2016-07-06 23:47:59 +02:00
Florian Bruhin
794a275383
Merge branch 'status-position' of https://github.com/blyxxyz/qutebrowser into blyxxyz-status-position
2016-07-06 13:56:55 +02:00
Florian Bruhin
b429b919b5
Merge branch 'completer_tests' of https://github.com/rcorre/qutebrowser into rcorre-completer_tests
2016-07-06 13:35:13 +02:00
Florian Bruhin
ab123b8c80
Merge branch 'userscript_vars' of https://github.com/blyxxyz/qutebrowser into blyxxyz-userscript_vars
2016-07-06 13:25:16 +02:00
Florian Bruhin
70117265d6
Fix some a/an misspellings
...
Thanks to https://github.com/jwilk/anorack
2016-07-05 08:34:03 +02:00
Jan Verbeek
965459ab36
Add status-position option
...
See #1257 .
I can't think of a good way to do widget-packing because tabs can be on
the left or right.
2016-07-04 18:21:09 +02:00
Jan Verbeek
955478799b
Shorten repeat-command description, remove .i, .o
...
If .i and .o exist there's a delay before . gets accepted.
2016-07-04 13:39:00 +02:00
Ryan Roden-Corrent
1ea28890b5
Move completion_item_del to completion widget.
...
It was implemented as a member of the Completer object, but registered
to the CompletionWidget. This led to the weird scenario where self was
actually a CompletionWidget, even though it was declared in Completer.
2016-07-03 17:35:17 -04:00
Florian Bruhin
e3c6a0b766
Handle OSError when closing download fileobj
2016-07-03 18:26:21 +02:00
Florian Bruhin
3a73351779
Merge branch 'patch-2' of https://github.com/edi9999/qutebrowser into edi9999-patch-2
2016-07-01 22:53:49 +02:00
Jan Verbeek
9678fd1e09
Make argument description more clear + style fix
2016-07-01 19:17:50 +02:00
Jan Verbeek
cc67dba9f1
Add and use $QUTE_DATA_DIR, $QUTE_DOWNLOAD_DIR
...
Also fix a few small issues in the userscripts like unquoted variables
and trailing whitespace.
2016-07-01 15:53:21 +02:00
Florian Bruhin
b178099f44
Merge branch 'completion_tests' of https://github.com/rcorre/qutebrowser into rcorre-completion_tests
2016-07-01 14:36:32 +02:00
Florian Bruhin
f1de4cc0cf
Revert "Strip newline char with :edit-url"
...
This reverts commit ac9fee310d
.
2016-07-01 13:52:08 +02:00
Florian Bruhin
ac9fee310d
Strip newline char with :edit-url
2016-07-01 13:50:28 +02:00
Florian Bruhin
af37272246
Merge branch 'edit-url' of https://github.com/blyxxyz/qutebrowser into blyxxyz-edit-url
2016-07-01 13:40:00 +02:00
Florian Bruhin
4ae3df62c5
Handle invalid URLs in :jump-mark
2016-06-30 20:59:18 +02:00
Jan Verbeek
6fbbc3f123
Only load with :edit-url if the URL was changed, remove count argument
2016-06-30 17:48:06 +02:00
Florian Bruhin
ce8315b720
Document :hint input and add default binding
...
See #1607 , #1499
2016-06-30 17:33:51 +02:00
Ryan Roden-Corrent
f50b8bb8e8
Use iter instead of __iter__.
...
Corrent two places this was used.
2016-06-30 07:26:02 -04:00
Florian Bruhin
f6fbb098cc
Remove redundant sentence in docstring
2016-06-30 12:40:52 +02:00
Florian Bruhin
900ad1ba6d
Merge branch 'alias-multi-commands' of https://github.com/mgoral/qutebrowser into mgoral-alias-multi-commands
2016-06-30 12:34:18 +02:00
Florian Bruhin
99d921f169
Merge branch 'scroll' of https://github.com/blyxxyz/qutebrowser into blyxxyz-scroll
2016-06-30 12:18:15 +02:00
Florian Bruhin
0f34e6b374
Merge branch 'fix-dvorak' of https://github.com/Dietr1ch/qutebrowser into Dietr1ch-fix-dvorak
2016-06-30 10:01:34 +02:00
Jan Verbeek
2ab1d35a7c
Remove useless import and global declaration, add missing whitespace
2016-06-30 03:13:40 +02:00
Jan Verbeek
320b9cac3f
Move repeat-command, make it work with multiple modes, improve tests
2016-06-30 02:22:02 +02:00
Jan Verbeek
64731c2053
Fix confusing indent
2016-06-29 21:23:42 +02:00
Jan Verbeek
f9afa190b1
Handle check for allowed mode better
2016-06-29 20:58:29 +02:00
Jan Verbeek
cc1899ebca
Add tests for repeat-command, make compatible with different count methods
2016-06-29 20:29:56 +02:00
Jan Verbeek
980cf5ada1
Documentation, check if config dir exists
2016-06-29 13:39:18 +02:00
Jan Verbeek
5e9fa2b57e
Make gg accept count
2016-06-29 00:12:44 +02:00
Florian Bruhin
87496617a4
Hide QtWebKit image format warning
...
This was hidden for tests in c390c797b2
but should be hidden for normal usage as well.
2016-06-28 20:46:06 +02:00
Patric Schmitz
217b912f3c
revert custom exception throwing in savefile_open
...
instead adapt test_failing_flush to catch correct exception (ValueError).
2016-06-28 15:03:23 +02:00
Patric Schmitz
a33978ee89
fix error handling in savefile_open and tests
2016-06-28 12:59:00 +02:00
Patric Schmitz
69ce9a942c
move savefile flush into try: block
...
it seems flush might throw which will not be caught inside the (try-)
else branch. (hopefully) fixes config corruption when no space
available.
2016-06-28 00:58:56 +02:00
Jan Verbeek
7c350a29d5
Add $QUTE_CONFIG_DIR for userscripts ( #937 )
2016-06-27 22:16:25 +02:00
Jan Verbeek
7a6d26ef86
Fix protected-access for last_command (not sure what to do for _modes and _not_modes)
2016-06-27 18:40:47 +02:00
Jan Verbeek
81f25251a5
Fix singleton-comparison
2016-06-27 18:21:35 +02:00
Jan Verbeek
f654013372
Add repeat-command (.) command
2016-06-27 17:38:11 +02:00
Dietrich Daroch
bd8c576322
Fix Dvorak hint chars
...
- Use the whole home row
- Produce easier chords
- 2-key chords alternate hands first (f[aoeui][dhtns])
- This is indeed a poor patch for easier chords as it should work on
every home-row, but there are not that much homerows around.
2016-06-25 16:34:43 -04:00
Edgar Hipp
bfeba3cee6
Update readline.py
2016-06-22 17:15:03 +02:00
Edgar Hipp
9e1c7e0117
Update readline.py
2016-06-22 16:30:38 +02:00
Florian Bruhin
4fccc89d7d
Split browser into browser/browser.webkit
2016-06-13 11:18:21 +02:00
Florian Bruhin
f70a75978b
Move browser.network.pastebin to misc
2016-06-13 09:48:53 +02:00
Michał Góral
4b883c089e
Fixed linters.
2016-06-12 23:04:14 +02:00
Michał Góral
7ee99ba043
Moved searching for aliases to CommandRunner.parse_all()
...
This addresses issue with having alias for multiple commands splitted by ';;'.
See: The-Compiler/qutebrowser#956 .
2016-06-12 21:09:10 +02:00
Daryl Finlay
bf32c544a2
Refactor tab and window title update methods
2016-06-10 23:36:43 +01:00
Daryl Finlay
054e9ab439
Add host placeholder to window and tab title formats
2016-06-10 21:59:43 +01:00
Florian Bruhin
acf54c5cbe
Release v0.7.0
2016-06-10 15:18:56 +02:00
Florian Bruhin
ff7d6250c6
Improve original URL handling
...
When setting self._orig_url by hand, sometimes on redirects the wrong
URL was picked up.
2016-06-10 14:41:08 +02:00
Florian Bruhin
66938ed44b
Full redirect support for history
...
When a redirect occurs, the item is saved in history with a -r suffix
now. When opening qutebrowser that's picked up and the item is hidden
from completion.
2016-06-10 14:40:42 +02:00
Florian Bruhin
9298fa697b
Allow to pass atime to WebHistory.add_url
...
This makes a lot of tests easier and/or more exact.
2016-06-10 12:12:29 +02:00
Florian Bruhin
f691439149
Make WebHistory parent optional
2016-06-09 21:14:04 +02:00
Florian Bruhin
1d1c71f919
Strip of trailing spaces for history entries
2016-06-09 21:14:04 +02:00
Florian Bruhin
b8fba0a138
Add some documentation to WebHistory
2016-06-09 21:14:04 +02:00
Florian Bruhin
e9e6da6510
Remove WebHistory.__getitem__
2016-06-09 21:14:04 +02:00
Florian Bruhin
33f01d8375
Fix lint
2016-06-09 21:14:03 +02:00
Florian Bruhin
d5abfa3d0d
Check if original URL is valid
2016-06-09 21:14:03 +02:00
Florian Bruhin
9510af9912
Use QUrl with QWebHistory
...
Now that we have our own history implementation, we get the URLs as QUrl
and not as string - so no point in converting them to string and back.
2016-06-09 21:14:03 +02:00
Florian Bruhin
6304565a9a
Refactor browser.history
...
- Rename HistoryEntry to Entry
- Move history line parsing from WebHistory.async_read to Entry.from_str
- Improve errors for invalid history lines
- Pass history directory/filename from the outside to WebHistory
- Clear temp history after reading it when async_read is done
2016-06-09 21:14:00 +02:00
Florian Bruhin
446abefba5
Make sure there is no temp history without datadir
2016-06-09 17:44:04 +02:00
Florian Bruhin
34ba44b0a3
Separate WebHistoryInterface from WebHistory
2016-06-09 17:44:04 +02:00
Florian Bruhin
089131c79d
Improve error message when clicking invalid link
2016-06-09 17:43:33 +02:00
Florian Bruhin
ab8a2f7147
Fix lint
2016-06-09 17:12:23 +02:00
Florian Bruhin
035526848e
Add a hints -> find-implementation setting
...
This makes it possible to switch to an alternative implementation if
there are weird issues like #1568 . Some users might also prefer the
slightly better performance over more accurate hints.
2016-06-09 17:00:08 +02:00
Samuel Loury
8369140b72
Strip the url before processing it
...
This won't hurt and will help with some poorly formatted sites
including blank spaces around the url (e.g. the Previous link in a
dashboard make with CDash 2.0.2).
2016-06-09 08:23:53 +02:00
Florian Bruhin
4fe6935003
Merge branch 'lowercase-toggle' of https://github.com/EliteTK/qutebrowser into EliteTK-lowercase-toggle
2016-06-08 22:39:19 +02:00
Florian Bruhin
01a622bf02
history tests: Sync with :save better
2016-06-08 22:32:39 +02:00
Tomasz Kramkowski
573c25073d
Fix toggle config using capitalised boolean value.
2016-06-08 19:06:00 +01:00
Florian Bruhin
e08c6cb059
Don't save the original URL for redirected pages
...
See #1345
2016-06-08 17:15:08 +02:00
Florian Bruhin
263b5680c7
Improve :history-clear docstring
2016-06-08 16:49:07 +02:00
Florian Bruhin
483a5f8103
Fix sharing of cookie jars with private browsing
...
Fixes #1219
2016-06-08 16:35:43 +02:00
Florian Bruhin
530721522a
Fix lint
2016-06-08 15:38:52 +02:00
Florian Bruhin
34f7b196b7
Merge branch 'toofar-history-title'
2016-06-08 15:28:10 +02:00
Florian Bruhin
1b2c6d30c5
Fix typo
2016-06-08 15:22:21 +02:00
Florian Bruhin
f17d4388fd
Use fully encoded URL for history
...
Otherwise e.g. spaces are literal spaces instead of %20 and the history
breaks.
2016-06-08 15:15:54 +02:00
Florian Bruhin
e1fd9fc408
Also add title to history for redirected URLs
2016-06-08 13:30:40 +02:00
Florian Bruhin
9beb68bb5c
Ignore symlinks when recompiling for :restart
...
Otherwise broken symlinks (*cough* emacs *cough*) cause this to fail
with FileNotFoundError.
2016-06-08 12:56:37 +02:00
Florian Bruhin
79e0aa2418
Merge branch 'history-title' of https://github.com/toofar/qutebrowser into toofar-history-title
2016-06-08 12:53:07 +02:00
Florian Bruhin
c686008325
LineParser: Don't write anything without data
2016-06-08 10:36:30 +02:00
Florian Bruhin
cca26f0f13
Fix lint
2016-06-08 09:45:05 +02:00
Florian Bruhin
4b78b22b9a
Remove unnecessary method
...
This is already inherited from LineParser
2016-06-08 09:30:18 +02:00
Florian Bruhin
21d53b0265
Merge branch 'history-clear' of https://github.com/EliteTK/qutebrowser into EliteTK-history-clear
2016-06-08 09:28:36 +02:00
Florian Bruhin
1104a731a5
Fix filtering of all hints in number mode
...
Fixes #1559
2016-06-07 18:34:46 +02:00
Florian Bruhin
9880f5bd5f
Handle FileNotFoundError in ipc.listen
...
Fixes #1530
2016-06-07 16:48:43 +02:00
Florian Bruhin
299fea830e
Simplify some bool conditions
2016-06-07 15:42:59 +02:00
Florian Bruhin
5ddc57566d
Refactor HintManager.filter_hints
2016-06-07 15:14:57 +02:00
Florian Bruhin
db0a67766d
Ignore hints -> scatter for number hints
...
See https://github.com/The-Compiler/qutebrowser/issues/308#issuecomment-167091450
2016-06-07 15:13:30 +02:00
Florian Bruhin
20636a2343
Get normal parser via objreg
2016-06-07 14:30:46 +02:00
Jakub Klinkovský
de66b68b75
Fix problems reported by pylint
2016-06-07 14:27:37 +02:00
Jakub Klinkovský
1b32444256
Rename variables for consistency with other code and docstrings
...
As described in [1], the naming of some variables has become
inconsistent with the original code and even docstrings. This commit
corrects some of these problems, with the following terminology:
- hint text: informative message (see HINT_TEXTS)
- hint string: the text displayed on the hint (as instance of str)
- hint label: the element representing the hint, added to the DOM
- hint: too abstract, sensibly used only in docstrings to refer to the
"visual result"
This commit amends b89e0f8803
and
8873aba09f
.
[1] https://github.com/The-Compiler/qutebrowser/pull/1178#issuecomment-178795190
2016-06-07 14:27:06 +02:00
Jakub Klinkovský
e4d5b550a3
Filter hints using a multi-word matching
...
(addresses https://github.com/The-Compiler/qutebrowser/issues/674#issuecomment-165101219 )
2016-06-07 14:24:17 +02:00
Florian Bruhin
7f3991a8ca
Set _filterstr in HintManager
...
This is also fixed in
fd12c7567e
But we need the fix in to make tests run.
2016-06-07 13:23:51 +02:00
Jakub Klinkovský
82da79d05a
Renumber hints when filtering in numeric mode
...
(addresses #308 )
2016-06-07 13:07:56 +02:00
Jakub Klinkovský
9d20280573
Save the filter string in HintManager
...
This allows restoring the filter during rapid hinting in numeric mode (addresses #576 )
2016-06-07 11:57:31 +02:00
Jakub Klinkovský
3690ead5e0
Fix backspace handling in numeric hint mode
...
addresses #1186
2016-06-07 11:37:47 +02:00
Jakub Klinkovský
87faafd910
Fixed type of auto-follow-timeout option
2016-06-07 10:30:10 +02:00
Jakub Klinkovský
6e494605dd
Add timeout after auto-followed hint
2016-06-07 10:30:08 +02:00
Florian Bruhin
e8123bb68a
Fix pdfjs version parsing for never versions
2016-06-07 07:42:34 +02:00
Florian Bruhin
b0df87842e
Show BDD scenario on failed tests
...
See #1552
2016-06-06 23:09:19 +02:00
Florian Bruhin
ef82076819
Ignore pdbpp ResourceWarning
...
E Failed: Logged unexpected errors:
E
E 22:30:18 WARNING py.warnings pdb:<module>:4 /home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pdbpp_path_hack/pdb.py:4: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/pdb.py' mode='r' encoding='UTF-8'>
E os.path.dirname(os.path.dirname(__file__)), 'pdb.py')).read(), os.path.join(
2016-06-06 22:37:29 +02:00
Florian Bruhin
009fbe8213
Clean up CommandRunner.parse
2016-06-06 17:10:29 +02:00
Florian Bruhin
3e22f64a20
Get tab indicator fix from #697
2016-06-06 16:49:29 +02:00
Florian Bruhin
7651b3a9f5
Fix userscript CommandRunner
2016-06-06 16:39:10 +02:00
Florian Bruhin
35c7e2b768
Remove unreachable NeighborList code
2016-06-06 16:21:05 +02:00
Florian Bruhin
4a7a2e61d3
Only do partial matching with main CommandParser
2016-06-06 15:56:56 +02:00
Florian Bruhin
ec869686c2
Get rid of TabbedBrowser.got_cmd
...
Seems like it's not used anywhere anymore
2016-06-06 15:53:33 +02:00
Florian Bruhin
5b396dab26
Merge branch 'modifcation-for-issue-1386' of https://github.com/adamwethington7/qutebrowser into adamwethington7-modifcation-for-issue-1386
2016-06-06 15:44:56 +02:00
Florian Bruhin
88debe4f5e
Fix zoom adjusting in rect_on_view
...
We now make sure we move the rect without adjusting its size, and then
also adjust the size based on the zoom.
2016-06-06 15:18:53 +02:00
Florian Bruhin
b0e9d2aca5
webelem.rect_on_view: Actually use passed geometry
2016-06-06 13:26:46 +02:00
Florian Bruhin
abfd789f9e
Fix zooming with a too big count
...
Fixes #1118
Supersedes #1140
2016-06-06 13:25:01 +02:00
Florian Bruhin
8d5fdf2833
Remove wrap mode for NeighborList
2016-06-06 13:10:14 +02:00
Florian Bruhin
d50af52d1a
Fix webelem.is_visible with zoom
2016-06-06 12:54:24 +02:00
Florian Bruhin
10630e30ab
hints: Integrate _get_first_rectangle into webelem
2016-06-06 11:56:15 +02:00
Florian Bruhin
b262580b22
Fix hint position when zoom is used
2016-06-06 10:41:59 +02:00
Florian Bruhin
0e4dbd646c
Merge branch 'hints_positioning' of https://github.com/lahwaacz/qutebrowser into lahwaacz-hints_positioning
2016-06-06 10:22:06 +02:00
Florian Bruhin
9f3c2dfada
Merge branch 'bind_case_fix' of https://github.com/rcorre/qutebrowser into rcorre-bind_case_fix
2016-06-04 23:30:50 +02:00
Ryan Roden-Corrent
68faf2b873
Allow hint --rapid in normal mode.
...
This was disallowed by an assertion, but has a legitimate use case for
clicking multiple buttons or ticking multiple checkboxes.
Resolves #1541 .
2016-06-04 15:32:58 -04:00
Ryan Roden-Corrent
9f660a98f2
Default mode='normal' for bind/unbind.
...
Both set mode=None, then later checked if mode == 'None' and set it to
'normal'.
This reduces the function complexity just enough that pylint will stop
complaining.
2016-06-04 07:39:09 -04:00
Ryan Roden-Corrent
1dc20f4d02
Handle special keystrings case-insensitively.
...
Load all special keystrings (e.g. <ctrl-a>) into memory as lowercase,
and automatically lowercase any special keystring given to bind/unbind.
This prevents <ctrl-a> and <Ctrl-A> from being treated differently.
Resolves #816 .
Also resolves #1544 (dupe).
2016-06-04 07:39:09 -04:00
Daniel Schadt
44b1344467
typo used -> user
2016-06-03 15:52:29 +02:00
Daniel Schadt
1cabae0583
mhtml: don't crash when user cancels a download
...
Fixes 1535
The browser crashed because both callbacks were called (finished and
error), trying to remove the item twice from the list of downloads.
2016-06-02 21:23:11 +02:00
Florian Bruhin
fcba6beecf
Merge branch 'json-logging' of https://github.com/Kingdread/qutebrowser into Kingdread-json-logging
2016-06-01 13:07:52 +02:00
Florian Bruhin
a39c662633
Merge branch 'hint_spawn_fix' of https://github.com/rcorre/qutebrowser into rcorre-hint_spawn_fix
2016-05-30 16:09:28 +02:00
Daniel Schadt
5f2d5feb58
message: don't indent the traceback
...
This shouldn't be needed anymore with json-logging.
2016-05-30 16:00:10 +02:00
Daniel Schadt
cea32ea333
log: embed traceback in json object
2016-05-30 16:00:10 +02:00
Daniel Schadt
4a59a1f112
log: implement JSON as logging output
...
Fixes #1501
Enabled via the --json-logging parameter.
2016-05-30 16:00:10 +02:00
Florian Bruhin
9efcddf727
Add missing import
2016-05-29 22:47:44 +02:00
Florian Bruhin
86be7ad82c
Move file_url from utils.jinja to utils.urlutils
2016-05-29 22:44:40 +02:00
Florian Bruhin
5b84fc93df
Do a final userscript command read on cleanup
...
On OS X, sometimes the userscript exited before the QSocketNotifier was
triggered. By doing a final read when cleaning up we make sure we don't
miss anything.
Fixes #1533 .
2016-05-29 18:42:56 +02:00
Florian Bruhin
6caa89a622
Merge branch 'empty_uri' of https://github.com/hcraT/qutebrowser into hcraT-empty_uri
2016-05-29 00:37:12 +02:00
Florian Bruhin
1d87eee4d7
Fix starting when sys.stderr is None
2016-05-27 14:48:46 +02:00
Florian Bruhin
afcb018ee2
Fix some spelling mistakes
...
Found via http://jwilk.net/software/mwic
2016-05-27 12:07:00 +02:00
Florian Bruhin
29aedef420
Fix :debug-console with PyQt 5.6
2016-05-27 00:18:23 +02:00
Tarcisio Fedrizzi
7da6faa7af
Changes fuzzy_url to force search even when paths are passed
2016-05-26 18:01:01 +02:00
Tarcisio Fedrizzi
462f9d7e4c
Refators discussed in the review
...
- refactors what discussed in the review
- adds unit tests for schemas without host and path
2016-05-26 18:01:01 +02:00
Florian Bruhin
a589c09f2e
Merge branch 'singleoptioncrash' of https://github.com/nginth/qutebrowser into nginth-singleoptioncrash
2016-05-26 07:41:09 +02:00
Florian Bruhin
9d018b8fbd
pylint: Disable too-many-return-statements
2016-05-26 07:39:47 +02:00
Nick Ginther
2065f292ab
fix crash on empty parts[] ( #1523 )
2016-05-25 16:45:06 -05:00
Florian Bruhin
824e662154
Merge branch 'tabindexfix' of https://github.com/nginth/qutebrowser into nginth-tabindexfix
2016-05-25 22:09:01 +02:00
Florian Bruhin
c96722f169
Merge branch 'better_keyhints' of https://github.com/rcorre/qutebrowser into rcorre-better_keyhints
2016-05-25 22:04:51 +02:00
Nick Ginther
c70accda22
restructure code
2016-05-25 13:46:31 -05:00
Florian Bruhin
5a82bf3357
Add some more logging for SSL errors
2016-05-25 20:45:54 +02:00
Tarcisio Fedrizzi
73c200fb14
Tweaks the multi-line heuristic to handle scheme-like text
...
Adds some options to implement a way to treat multiline text that starts
with a scheme-like line as text instead as an URL.
2016-05-25 08:05:57 +02:00
Ryan Roden-Corrent
f58e2d91dc
Add a keyhint blacklist.
...
Replace the setting ui.show-keyhints with ui.keyhint-blacklist, which
is a list of globs for keychains that shouldn't be hinted. This allows
users to prevent showing keyhints for keychains they already know.
keyhint-blacklist='*' is equivalent to show-keyhints=False.
Resolves #1515 .
2016-05-24 20:46:39 -04:00
Nick Ginther
8c487e9a5f
fix tabindex statusbar not updating ( #1247 )
2016-05-24 15:18:22 -05:00
Florian Bruhin
ea1d8902d5
Add logging for #1484
2016-05-24 21:35:48 +02:00
Florian Bruhin
0fb6e508e6
Merge branch 'master' of https://github.com/Yatekii/qutebrowser into Yatekii-master
2016-05-24 21:32:24 +02:00
Florian Bruhin
c6cb8e5099
Remove unneeded "# pragma: no branch" comments
...
Those are not needed anymore with coverage 4.1.
2016-05-24 15:40:50 +02:00
Florian Bruhin
11363b9533
Fix some invalid "# pragma: no cover" comments
...
We accidentally used "# pragma: no coverage" instead.
2016-05-24 15:40:18 +02:00
Ryan Roden-Corrent
b1aaf0f10f
Only show keyhints after a short delay.
...
If a user knows the keychain and can type it quickly, we shouldn't
annoy them with a popup. Only show the keyhint if the user doesn't
complete their keychain in 500ms.
The isVisible() check in the tests is somewhat invalid now because it
is never immediately visible and I don't want to add a delay to unit
tests. I added a check that text() is not set for one test that was
only checking isVisible().
Addresses part of #1515 .
2016-05-23 21:21:03 -04:00
Noah Huesser
299c66b82c
Possibly fixed issue: #1484
2016-05-23 11:32:27 +02:00
Florian Bruhin
002e5801f1
Improve logging in add_js_bridge
2016-05-22 14:55:53 +02:00
Ryan Roden-Corrent
f025394e04
Set maxsplit=2 for :hint.
...
This supports things like :hint all spawn -v echo as '-v echo' will be
passed as a single unit to spawn rather than -v being interpreted as a
flag for :hint.
Resolves #797 .
Note that, while `:hint --rapid all spawn -v` echo works,
`:hint all --rapid spawn -v echo` does not (this did not work before
either).
2016-05-20 22:11:58 -04:00
Ryan Roden-Corrent
0300f03ebc
Allow passing args to spawn from :hint.
...
Instead of creating a new guiprocess manually, just pass the args along
to the spawn command so it can accept args like -v.
Addresses part of #797 by allowing `hint -- all spawn -v echo`.
`hint all spawn -v echo` is still not supported.
2016-05-20 22:11:58 -04:00
Jakub Klinkovský
c919fcba35
hints: position according to getClientRects()
2016-05-20 21:26:29 +02:00
Jakub Klinkovský
4c06e34074
hints: change click position to the center of the largest square fitting to the top/left corner of the rectangle
2016-05-20 21:26:29 +02:00
Florian Bruhin
ea1f46d542
Merge branch 'hints_clicking' of https://github.com/lahwaacz/qutebrowser into lahwaacz-hints_clicking
2016-05-20 17:09:16 +02:00
Florian Bruhin
2c42219b23
Don't autofollow hint when unfiltering w/ rapid
...
When we are in rapid mode with only one link, after following the hint, fire()
called filter_hints(None) to display all hints again. Then filter_hints tried
to follow that link, fire() tried to show all again, etc., leading to a
RecursionError.
Fixes #1513 .
A test will be added via #1510 .
2016-05-20 16:41:51 +02:00
Ryan Roden-Corrent
b1440a1804
Implement utils.is_special_key.
...
The check `key.startswith('<') and key.endswith('>') is repeated many
times in code to check for a special key. Replace all these with a call
to the same function.
2016-05-19 20:48:48 -04:00
Ryan Roden-Corrent
5992b81850
Don't show keyhint if there are no hints.
...
Currently, the keyhint window is shown even if the keystring matches no
possible bindings. This causes an empty keyhint window to hang around
after entering hinting mode.
Instead, the window is now hidden if no bindings match the current
keystring.
Resolves #1507 .
2016-05-19 07:02:23 -04:00
Florian Bruhin
2b0f780500
Merge branch 'master' of https://github.com/rumpelsepp/qutebrowser into rumpelsepp-master
2016-05-18 23:55:34 +02:00
Florian Bruhin
b5f8e7306f
Merge branch 'command_binding_completion' of https://github.com/rcorre/qutebrowser into rcorre-command_binding_completion
2016-05-18 18:47:13 +02:00
Stefan Tatschner
1c238152f7
Fix crash when hovering over an invalid URL
2016-05-18 16:20:03 +02:00
Ryan Roden-Corrent
4dd1478d2c
Use ', '.join instead of str.join(', ', ...).
2016-05-18 08:55:17 -04:00
Ryan Roden-Corrent
0a0f0feaec
Update command completions when keyconf changes.
...
When a user changes keybindings, update the command completion model so
the new keybindings are shown.
2016-05-18 08:00:21 -04:00
Ryan Roden-Corrent
c050b4973b
Show special keys last in command completion.
...
When showing the currently bound key in the misc column for command
completion, if the command has multiple bindings, show special bindings
(e.g. <ctrl-a>) after non-special bindings.
2016-05-18 07:54:06 -04:00
Ryan Roden-Corrent
06caee41b8
Clean up command_binding_completion.
...
- Add a space after the comman for multiple binding suggestions.
- Use defaultdict(list) instead of defaultdict(lambda: [])
- Move the pylint comment back to the top of the class
2016-05-18 07:46:27 -04:00
Florian Bruhin
5b65ec17fd
Set Qt.RichText textFormat for KeyHintView
2016-05-18 07:35:56 +02:00
Florian Bruhin
d0af80fbd5
Merge branch 'keystring' of https://github.com/rcorre/qutebrowser into rcorre-keystring
2016-05-18 07:33:17 +02:00
Florian Bruhin
324fcfadb0
Merge branch 'hint_inputs' of https://github.com/Liambeguin/qutebrowser into Liambeguin-hint_inputs
2016-05-18 07:30:46 +02:00
Florian Bruhin
02cbc2f986
Merge branch 'pretty-hover-url' of https://github.com/forkbong/qutebrowser into forkbong-pretty-hover-url
2016-05-18 07:27:30 +02:00
Florian Bruhin
43518a4624
Merge branch 'timeout_docs' of https://github.com/rcorre/qutebrowser into rcorre-timeout_docs
2016-05-18 07:26:12 +02:00
Florian Bruhin
e4d84b0bfc
Simplify argparser.type_check
...
If the value isn't param.default, it will always be a string or a flag, as
type_conv never gets called when the function is called from Python.
2016-05-18 07:16:17 +02:00
Florian Bruhin
284d4e4b97
Only pass is_bool to Command._param_to_argparse_*
2016-05-18 06:55:27 +02:00
Florian Bruhin
a83bf9c3ee
Simplify argparser.type_conv
...
Since we're not using those functions as argparse callbacks anymore, we
can write a normal function instead of factories, which simplifies
things a lot.
2016-05-18 06:55:27 +02:00
Florian Bruhin
c0d044447d
Add tests for qutebrowser.utils.typing
2016-05-18 06:55:17 +02:00
Florian Bruhin
6ed9b6b13f
Make sure typing.Union[str, int] gets handled
...
str always needs to be the last element checked as otherwise it'd always
win.
2016-05-18 06:55:17 +02:00
Florian Bruhin
a0d0b6464f
Use typing.py-like annotations for command args
...
This means:
- An annotation like (int, str) is now typing.Union[int, str].
- utils.typing got expanded so it acts like the real typing.py, with
issubclass() working properly with typing.Union and __union_params__
being set.
- A literal string doesn't exist anymore as annotation, instead
@cmdutils.argument now has a 'choices' argument which can be used like
@cmdutils.argument('arg', choices=['val1', 'val2']).
- Argument validating/converting is now entirely handled by
argparser.type_conv instead of relying on python's argparse, i.e.
type/choices is now not passed to argparse anymore.
2016-05-18 06:55:17 +02:00
Florian Bruhin
cdcd276a1a
Also use @cmdutils.argument
for :bind
...
This was added in master and not updated when this branch was rebased on
master.
2016-05-18 06:55:17 +02:00
Florian Bruhin
3a33bc42a6
Add initial support for the typing module
2016-05-18 06:55:17 +02:00
Florian Bruhin
bb8d0a8ee4
Fix long lines
2016-05-18 06:55:17 +02:00
Florian Bruhin
c33f0c3512
Use @cmdutils.argument for completions
2016-05-18 06:55:17 +02:00
Florian Bruhin
3ab40bbc23
Clear globals correctly for all cmdutils tests
...
TestArgument didn't clear the globals as the fixture was inside
TestRegister.
This means test_run_vulture failed in funny ways because run_vulture.py
generated a whitelist containing "<locals>" for commands:
tests/unit/scripts/test_run_vulture.py:55: in run
return run_vulture.run([str(e.basename) for e in files])
scripts/dev/run_vulture.py:146: in run
vult.scavenge(files + [whitelist_file.name])
.tox/py35/lib/python3.5/site-packages/vulture.py:107: in scavenge
self.scan(module_string)
.tox/py35/lib/python3.5/site-packages/vulture.py:75: in scan
node = ast.parse(node_string, filename=self.file)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
source = 'qutebrowser.browser.commands.CommandDispatcher.buffer\nqutebrowser.misc.savemanager.SaveManager.save_command\nqutebro...iidoc.UsageFormatter._get_default_metavar_for_positional\nscripts.dev.src2asciidoc.UsageFormatter._metavar_formatter\n'
filename = '/tmp/tmp_ein2umn', mode = 'exec'
def parse(source, filename='<unknown>', mode='exec'):
"""
Parse the source into an AST node.
Equivalent to compile(source, filename, mode, PyCF_ONLY_AST).
"""
> return compile(source, filename, mode, PyCF_ONLY_AST)
E File "/tmp/tmp_ein2umn", line 16
E test_cmdutils.TestArgument.test_wrong_order.<locals>.fun
E ^
E SyntaxError: invalid syntax
2016-05-18 06:55:17 +02:00
Florian Bruhin
1611562271
Get rid of dict annotations
2016-05-18 06:55:17 +02:00
Florian Bruhin
d990032a2e
Remove leftovers of 'name' annotation key
2016-05-18 06:55:17 +02:00
Florian Bruhin
77151d394a
Use @cmdutils.argument for metavar
2016-05-18 06:55:17 +02:00
Florian Bruhin
c14db202d6
Use @cmdutils.argument to hide arguments
2016-05-18 06:55:17 +02:00
Florian Bruhin
2fc4f408cd
Fix src2asciidoc
2016-05-18 06:55:17 +02:00
Florian Bruhin
2370793f38
Make win_id/count mutually exclusive for ArgInfo
2016-05-18 06:55:17 +02:00
Florian Bruhin
35135c4b0d
Use @cmdutils.argument for win_id/count
2016-05-18 06:55:17 +02:00
Florian Bruhin
04367851c3
Refactor how cmdutils.ArgInfo works
...
It's now a real class, and some other aspects about how it's handled
were cleaned up as well.
2016-05-18 06:55:17 +02:00
Florian Bruhin
9eeaeb95c3
Make sure @cmdutils.argument after @register fails
2016-05-18 06:55:17 +02:00
Florian Bruhin
3c586f34ff
Add a @cmdutils.argument decorator
...
For now the only available keyword argument is 'flag' which customizes
the flag an argument will get.
See #637 .
2016-05-18 06:55:17 +02:00
Liam BEGUIN
c3dfd62172
broke line to fit properly
2016-05-17 23:39:24 -04:00
Ryan Roden-Corrent
52641e25f5
Show currently bound keys in command completion.
...
The command completion menu now uses the misc colum to show a
comma-separated list of normal-mode keybindings for each command.
2016-05-17 20:25:09 -04:00
Ryan Roden-Corrent
acdeb0f57c
Bump default for partial-timeout to 5000ms.
...
Give more time to read the keyhint widget.
2016-05-17 20:13:25 -04:00
Ryan Roden-Corrent
e810317057
Restore bottom padding of keyhint widget.
...
Previously, negative bottom padding was used (probably to compensate
for a trailing <br>). With the table format, this is no longer
necessary and causes the last line to be drawn too low.
2016-05-17 20:10:52 -04:00
Liam BEGUIN
b66d5e1ce9
Fixed indentations
2016-05-17 19:58:27 -04:00
Panagiotis Ktistakis
959f777f92
Assert that hovered link generates a valid QUrl
2016-05-17 10:28:33 +03:00
Jimmy
cd21f6326e
Save redirect links that are clicked on to history.
...
This allows webkit to color links that are clicked on but never rendered as
visited too. It also means if you get redirected from eg http://site.com to
http://site.com/ you have essentially duplicates in your history. This makes
the history completion a bit noisier. I suppose normalising paths before
checking for duplicates might help. Also note that otter has an isTypedIn flag
which might be used for dealing with this.
2016-05-17 17:15:22 +12:00
Jimmy
b48b36a88d
fixup! Switch browsing history away from QWebHistoryInterface.
2016-05-17 17:15:22 +12:00
Jimmy
33fbe97863
Switch browsing history away from QWebHistoryInterface.
...
Now adds a url to browser history once we have connected and got enough data
to start rendering the page. The previous approach saved urls as soon as
navigation was initiated, so upon encountering a redirect the final url wasn't
saved.
Using layout started rather than load finished means that pages whose contents
manage to load minus one troublesome asset will still be saved.
2016-05-17 17:15:22 +12:00
Jimmy
1524f29f71
Add titles to history entry.
...
Adds a title to the HistoryEntry class and includes it in the serialization
stuff. Not currently set from anywhere.
Not sure if anything more needs to be done to support non-ascii characters.
Everything works fine for me with unicode chars in url and title but
everything in my stack is utf-8.
2016-05-17 17:15:22 +12:00
Liam BEGUIN
531a5071f6
updated inputs-group
2016-05-17 00:38:23 -04:00
Ryan Roden-Corrent
86f95c302d
Explain timeout vs partial-timeout better in docs.
2016-05-16 21:40:30 -04:00
Felix Van der Jeugt
acb60a1bf4
align using a table
2016-05-16 07:14:34 -04:00
Liam BEGUIN
3b0354518b
Added basic inputs-group to :hint
2016-05-15 22:46:12 -04:00
Ryan Roden-Corrent
3cd252ef82
Clean up html for keyhint text.
...
The \t was behaving the same as a space and the <b> was doing nothing.
2016-05-15 22:33:53 -04:00
Ryan Roden-Corrent
d506d7793f
Further clean up keyhints.
...
Don't show special keys in the keyhint window as these currently cannot
be part of keychains.
Use a rounded border on the top-right corner and square on the rest.
2016-05-15 12:32:36 -04:00
Panagiotis Ktistakis
224c877fec
Hide passwords in hovering URLs
2016-05-15 19:07:10 +03:00
Florian Bruhin
0c1e82a103
Fix lint
2016-05-15 11:53:58 +02:00
Florian Bruhin
9b28d90543
Improve output if :messages is used without errors
2016-05-15 11:50:29 +02:00
Florian Bruhin
b704c911ae
Fix running qute:log and qute:plainlog
...
This failed because dict.get('level') returned None with no level
parameter, and the subsequent [0] raised:
Traceback (most recent call last):
File ".../qutebrowser/utils/utils.py", line 624, in wrapper
return func(*args, **kwargs)
File ".../qutebrowser/browser/network/networkmanager.py", line 445, in createRequest
op, req, outgoing_data)
File ".../qutebrowser/browser/network/qutescheme.py", line 107, in createRequest
data = handler(self._win_id, request)
File ".../qutebrowser/browser/network/qutescheme.py", line 189, in qute_log
level = urllib.parse.parse_qs(request.url().query()).get('level')[0]
TypeError: 'NoneType' object is not subscriptable
2016-05-15 11:33:30 +02:00
Florian Bruhin
e21039094d
Merge branch 'messages' of https://github.com/rcorre/qutebrowser into rcorre-messages
2016-05-15 11:20:06 +02:00
Florian Bruhin
a9ab6abafd
Document {url} and {url:pretty} for :set-cmd-text
2016-05-15 11:09:16 +02:00
Florian Bruhin
0888f676f3
Change go/gO/xO/wO bindings to use {url:pretty}
...
This is now possible with #1494 .
See #1483 .
2016-05-15 11:06:54 +02:00
Florian Bruhin
b75d1629a8
Merge branch 'set-cmd-text-variables' of https://github.com/forkbong/qutebrowser into forkbong-set-cmd-text-variables
2016-05-15 11:01:58 +02:00
Florian Bruhin
6b4efc1822
Fix log output in crash report
...
With the changes to get rid of colorlog, we broke this, as e.g. {green}
was an undefined key for the vanilla logging.Formatter used for the
in-RAM log. Now we instead use a ColoredFormatter with colors turned
off.
2016-05-15 10:46:46 +02:00
Ryan Roden-Corrent
231950aa88
Increase default value for input.partial-timeout.
...
Increase from 500 to 2500.
This allows the user more time to read hints shown in the new keyhint
popup.
2016-05-14 19:30:39 -04:00
Ryan Roden-Corrent
d592a3e764
Clean up keyhint implementation.
...
From code review:
- escape all strings used in the keyhint html
- read the prefix color each time the hint is shown
- use show/hide instead of setVisible
- clean up pylint/flake8 errors
- use CssColor instead of QssColor for keyhint.fg.suffix
- add some padding to the keyhint popup
2016-05-14 19:30:28 -04:00
Panagiotis Ktistakis
c88883fcb3
Decode URL in statusbar when hovering over it
2016-05-14 19:52:24 +03:00
Ryan Roden-Corrent
e7ff717d52
Show key hints for all modes, not just normal.
2016-05-14 12:50:26 -04:00
Ryan Roden-Corrent
8406746889
Show possible keychains from current input.
...
When the current keystring is a partial match for one or more bindings,
show the possible bindings in a small overlay.
The overlay is partially transparent by default, but the background
color is configurable as ui->keystring.bg.
2016-05-14 12:50:26 -04:00
Ryan Roden-Corrent
fcd233a675
Clean up :messages implementation.
...
- Add log.LOG_LEVELS to map names to levels (instead of using
logging._levelToName)
- Test that log pages do not contain messages below the requested level
- Use pythons urllib.parse.parse_qs instead of Qt's UrlQuery
- Document tab, bg, window args for :messages
- Clean up style
2016-05-14 12:45:22 -04:00
Ryan Roden-Corrent
800c1c3cf8
Add :messages command to show past messages.
...
This adds a 'level' query parameter to qute://log and qute://plainlog.
For example, qute://log?level=warning will show an html page containing
log entries with severity warning or greater.
If the query is omitted, the original behavior of qute://log is
preserved.
:messages [level] is a command that opens qute://log?level=<level>.
By default, level defaults to 'error' as an easy way to see missed
error messages.
2016-05-14 07:10:58 -04:00
Florian Bruhin
c64e5c9bd5
Get rid of the colorlog dependency
...
colorlog was problematic for various reasons:
- Not commonly packaged for Linux distributions
- Calling colorama.init() automatically on import
- Not supporting {foo} log formatting
- Not supporting an easy way to turn colors off
Instead we now do the log coloring by hand, which is simpler and means
everyone will have colored logs.
2016-05-13 21:19:33 +02:00
Panagiotis Ktistakis
bb45392c1b
Use the right split function
2016-05-13 19:32:35 +03:00
Panagiotis Ktistakis
ecfa6cfc63
Split arguments using qutebrowser.utils.split
2016-05-13 18:59:24 +03:00
Panagiotis Ktistakis
7488f2a5cb
Remove unused imports
2016-05-13 18:58:42 +03:00
Panagiotis Ktistakis
38edb1b16d
Properly replace variables in set-cmd-text command
...
This fixes #123 and allows variables like {url:pretty} to be used with
set-cmd-text
2016-05-13 18:12:53 +03:00
Florian Bruhin
a9a853baf0
Improve message stack output
...
The output failed the tests as it was parsed as invalid. Indenting helps
with that.
This also simplifies things a bit by having a _log_stack function and
shows the type of stack we're printing.
2016-05-13 08:27:11 +02:00
Florian Bruhin
4a551a6758
Show exception stack when handling cmdexc errors.
2016-05-13 07:43:44 +02:00
Florian Bruhin
aea30e810a
Fix lint
2016-05-12 21:11:45 +02:00
Florian Bruhin
37a1d0cb6f
Log stacktrace of error messages to debug log
2016-05-12 20:30:07 +02:00
Florian Bruhin
24d16dd0a7
Merge branch 'show_binding2' of https://github.com/rcorre/qutebrowser into rcorre-show_binding2
2016-05-10 23:39:32 +02:00
Florian Bruhin
5eff35ba30
cmdutils.register: annotation -> arg for flags
...
Instead of using a 'flag' key in the annotation dict, we now use a flags
argument to @cmdutils.register which is a {argument: flag} dict.
See #637 .
2016-05-10 07:35:41 +02:00
Florian Bruhin
73fbfb9731
Replace 'nargs' annotation by star_args_optional
...
Before we used a {'nargs': '*'} annotation for the respective argument
to tell qutebrowser it's optional for the commandline. Now we instead
use a star_args_optional argument for @cmdutils.register as a first step
towards freeing up argument annotations for PEP 484.
See #637 .
2016-05-09 22:49:24 +02:00
Florian Bruhin
e4e98c6c23
Delete QTextDocument properly in completion.
...
The CompletionItemDelegate gets reused by Qt for various items in the
completion. Every time _get_textdoc() was called we created a new
QTextDocument, but since it has a long-living parent set (the delegate)
the old one was never actually garbage collected.
We now explicitly delete the old QTextDocument as it's not needed
anymore by either Qt or Python.
See #1476 .
2016-05-09 09:11:14 +02:00
Daniel Schadt
1fa50021c1
downloads: use right index for beginInsertRows
...
len(self.downloads) is already the index of the item in the download
list, this should be used for beginInsertRows(). The +1 is only for the
human readable part.
2016-05-08 23:36:31 +02:00
Daniel Schadt
99182e3e79
downloads: change len() to sum()
2016-05-08 23:36:31 +02:00
Daniel Schadt
643d2cc6dd
fix confirm-quit=downloads with finished downloads
...
Issue #846
.rowCount() returns all downloads, even the finished ones that have not
yet been removed from the list. For confirming the quit event, we should
only consider downloads that are still running.
2016-05-08 23:36:31 +02:00
Florian Bruhin
89c7b0e7f8
Simplify if-statement
2016-05-08 22:18:14 +02:00
Florian Bruhin
59ec5fa947
Show debug instead of warning for #670
...
The user can't do much about this anyways, and I have no idea what
triggers it, so let's not annoy them about it.
2016-05-08 22:08:08 +02:00
Florian Bruhin
b9b6f357da
Add utils.supports_selection()
2016-05-08 22:06:59 +02:00
Florian Bruhin
3e6ac28c66
Fix ;Y on systems not supporting primary selection
...
Instead we paste clipboard like we already do with some other commands
when primary selection is not supported.
Fixes #1336
2016-05-08 21:59:25 +02:00
Florian Bruhin
4d9a98a11d
Paste clipboard with :paste-primary on Windows
2016-05-08 21:18:57 +02:00
Florian Bruhin
4403f02ac5
Fix HostBlocker.on_config_changed with no datadir
2016-05-07 23:35:30 +02:00
Florian Bruhin
6d1764e732
Clear blocked hosts on start correctly
2016-05-07 23:31:35 +02:00
Florian Bruhin
b6add69705
Improve exception handling in HostBlocker
...
In on_config_changed, we now ignore FileNotFoundError as that's a common
occurence and not something worth logging.
In case of other OSError's we now also log the exact error message.
2016-05-07 23:30:32 +02:00
Florian Bruhin
f90776f75c
Add documentation for default_window_icon
2016-05-07 21:37:01 +02:00
Florian Bruhin
2ea76c282e
Merge branch 'feature-#1349' of https://github.com/haitaka/qutebrowser into haitaka-feature-#1349
2016-05-07 21:32:05 +02:00
Daniel Schadt
2918c5cd57
downloads: close fileobject in DownloadItem._die
...
Otherwise we will get a unclosed resource warning.
2016-05-06 18:01:45 +02:00
Daniel Schadt
dcac832f5e
netmanager: fix crash when asking with no tab_id
...
Issue 1413
This happens when the networkmanager is used by something that has no
tab_id, like the generic DownloadManager. In this case, we should just
skip the webview connection (as it makes no sense) instead of crashing
(which is the last thing we want to do).
2016-05-05 00:34:16 +02:00
Florian Bruhin
d2be8a28ca
Also ignore segfaults in paintEvent
2016-05-04 23:06:26 +02:00
Florian Bruhin
2d0604ec08
Remove unused imports
2016-05-04 22:15:47 +02:00
Florian Bruhin
034f8585a6
Disable segfault reports for Qt mainloop crashes
2016-05-04 21:50:44 +02:00
Florian Bruhin
0efd87af12
Clean up formatting of num
2016-05-04 07:07:24 +02:00
Ryan Roden-Corrent
b8a593cac5
Show command completions for :bind.
...
All commands will be offered as completions for the <command> argument
of :bind.
Due to the way completers parse the command line, the following
bind --mode caret j
will throw off completions as 'caret' is treated as a positional arg in
terms of the argument count for completions.
In the above example, completion will be triggered for 'j' and no
completions will be given for the actual command.
bind --mode=caret j will complete correctly, though completions are not
filtered by the given mode.
I attempted an approach to filter the commands based on the mode but it
ended up being messy and flaky.
2016-05-03 23:29:34 -04:00
Ryan Roden-Corrent
2536766cac
Run :bind <key> to print the current binding.
...
The <command> arg is now optional. If omitted, :bind prints the current
binding as a message. If --mode is given, the binding for that mode is
printed.
2016-05-03 23:29:34 -04:00
Ryan Roden-Corrent
98508bdd26
Allow flexible whitespace in color strings.
...
Allow a variable amount of whitespace for rgb, rgba, hsv, and hsva
strings in the config.
Previously only 'rgb(0, 0, 0)' was allowed. Now things like
'rgb(0,0,0)' are permitted.
The repeated 3-digit segments of the regexes were separated out to
reduce repetition and line length.
2016-05-03 23:15:39 -04:00
Florian Bruhin
a6cd91c386
Turn off WebGL by default
...
This was mainly turned on because that's Qt's upstream default, but
there's no reason for it to be turned on.
2016-05-03 06:33:08 +02:00
Florian Bruhin
e5630e9518
Fix lint
2016-05-01 23:03:27 +02:00
Florian Bruhin
3eeacd7e09
Fix userscripts on Windows
...
If the process emitted error() and then finished(), we already set
self._filepath to None and did other cleanup.
Instead we do the file reading inside _cleanup and call that from
on_process_error and on_process_finished.
2016-05-01 22:47:03 +02:00
Florian Bruhin
0b24916fc7
Add missing attribute
2016-05-01 22:34:04 +02:00
Florian Bruhin
c76746ca32
Refine Logjam cipher blacklisting
...
- The OS check was wrong
- EDH ciphers are (hopefully) not affected and break e.g. gnupg.org
2016-05-01 22:19:11 +02:00
Florian Bruhin
4e333d61cd
Clean up failed userscripts correctly
2016-05-01 22:13:52 +02:00
Florian Bruhin
73d5d24cb4
Fix lint
2016-05-01 17:48:35 +02:00
Florian Bruhin
6bd2591681
Disable all Diffie-Hellman ciphers on Windows
2016-05-01 17:42:20 +02:00
Florian Bruhin
0124354b91
Disable more bad SSL ciphers with old Qt/OpenSSL
...
See #594
2016-05-01 17:31:00 +02:00
Florian Bruhin
b7225924e3
Fix lint
2016-04-30 18:39:26 +02:00
Florian Bruhin
48c7eee6f6
Release v0.6.2
2016-04-30 18:16:43 +02:00
Florian Bruhin
528e303d6e
Add a --force-color argument for logging
2016-04-30 17:01:45 +02:00
Florian Bruhin
48d7185c94
log: Don't use colorama on POSIX
2016-04-30 16:59:59 +02:00
Florian Bruhin
b5aad7d1b9
Merge branch 'issue-1393' of https://github.com/NoctuaNivalis/qutebrowser into NoctuaNivalis-issue-1393
2016-04-30 14:06:54 +02:00
Florian Bruhin
4807746e8f
Add @pyqtSlot for qApp.focusChanged slot
2016-04-29 22:25:27 +02:00
Florian Bruhin
2d5ffbfd02
Revert "Handle counts for special keys."
...
This reverts commit c881730fad
.
This is just a temporary solution until we can properly fix this.
See #1464
2016-04-29 14:20:11 +02:00
Florian Bruhin
60f8681b41
Improve name of unused variable
2016-04-28 22:28:12 +02:00
Florian Bruhin
8b227f4ba4
Merge branch 'special_key_count' of https://github.com/rcorre/qutebrowser into rcorre-special_key_count
2016-04-28 22:22:23 +02:00
adam
5eea9d0605
Cleanup for flake8/pylint
2016-04-28 09:20:16 -04:00
Florian Bruhin
2f10ab4e9a
Clean up coding style
2016-04-28 07:07:49 +02:00
Florian Bruhin
15a145cf92
Merge branch 'buffer_completion_delete_item-1443' of https://github.com/toofar/qutebrowser into toofar-buffer_completion_delete_item-1443
...
Merge conflict in qutebrowser/completion/models/miscmodels.py due to a simple
style fix in the old code.
2016-04-28 07:03:27 +02:00
adam
8fd371d836
Proposed addition for issue #1386
2016-04-27 16:47:36 -04:00
Florian Bruhin
076b486368
Merge branch 'issue-1412' of https://github.com/Kingdread/qutebrowser into Kingdread-issue-1412
2016-04-27 21:19:04 +02:00
Florian Bruhin
24cde47881
Merge branch 'marks_invalid_url' of https://github.com/rcorre/qutebrowser into rcorre-marks_invalid_url
2016-04-27 21:00:21 +02:00
Florian Bruhin
2a343cb3a1
Various code style improvements
2016-04-27 20:25:27 +02:00
Ryan Roden-Corrent
88f66874a1
Don't crash when setting mark on invalid url.
2016-04-27 08:10:53 -04:00
Daniel Schadt
dcad81a78f
cache: fix crash when cache_dir is None
...
Issue #1412
When passing --cachedir="" on the command line, standarddir.cache()
returns None, which stands for "deactivate cache" and has to be
properly handled in DiskCache.__init__() (i.e. don't pass it to
os.path.join)
2016-04-26 23:14:55 +02:00
Florian Bruhin
fd20b46b33
Split IPCServer.on_ready_read into two methods
2016-04-26 23:14:03 +02:00
Florian Bruhin
7c3361d8da
Stabilize :download-delete test
2016-04-26 22:56:06 +02:00
Felix Van der Jeugt
b7ba3cd53e
fix flake and pep remarks
2016-04-26 22:52:29 +02:00
Felix Van der Jeugt
2d71c541c6
allow swapping dict at runtime
2016-04-26 22:52:29 +02:00
Felix Van der Jeugt
fdb630555d
make robust against short dicts
2016-04-26 22:52:29 +02:00
Felix Van der Jeugt
fe4800b68f
prevent words from the dictionary prefixing smart hints
2016-04-26 22:52:29 +02:00
Florian Bruhin
3c8598f691
Work around PyQt 5.6 segfault when using IPC
...
PyQt 5.6 seems to segfault when emitting None with a signal which is
declared as emitting a string:
https://www.riverbankcomputing.com/pipermail/pyqt/2016-April/037375.html
We now avoid this by using an empty string explicitly instead of None.
2016-04-26 22:30:27 +02:00
Florian Bruhin
48b069e89c
Remove @pyqtSlot for on_new_window
...
This worked fine with Python 3.5 but causes a circular import which is
hard to break with Python 3.4.
The original solution was to do @pyqtSlot(object), but that doesn't work
with PyQt 5.6 anymore...
2016-04-26 22:16:04 +02:00
Florian Bruhin
59c4cdd1c2
Revert "Break up circular import on Python 3.4"
...
This reverts commit e5be48fcc0
.
There are other circular imports as well.
2016-04-26 22:14:59 +02:00
Florian Bruhin
e5be48fcc0
Break up circular import on Python 3.4
2016-04-26 21:44:30 +02:00
Florian Bruhin
37b5f49c85
Fix types in @pyqtSlot decorations
...
PyQt 5.5 enforces correct type signatures, and there were a lot of
places where we were simply wrong, causing qutebrowser to not start at
all...
2016-04-26 20:34:38 +02:00
Florian Bruhin
da24e43fa5
Remove crowdfunding notes
2016-04-25 22:32:29 +02:00
Florian Bruhin
32d64b1a9a
Merge branch 'undo_crash' of https://github.com/rcorre/qutebrowser into rcorre-undo_crash
2016-04-25 19:19:08 +02:00
Florian Bruhin
341dae0b3f
Simplify deleting fragment
2016-04-25 19:05:20 +02:00
Florian Bruhin
d6c72c5821
Merge branch 'develop' of https://github.com/kanikaa1234/qutebrowser into kanikaa1234-develop
2016-04-25 19:03:20 +02:00
Florian Bruhin
6349c00c72
Fix crash with :tab-{prev,next,focus} with 0 tabs
...
When using :tab-prev/:tab-next (or :tab-focus which uses :tab-next
internally) immediately after the last tab, those functions could be
called with 0 tabs open, which caused a ZeroDivisionError when trying to
do % 0.
Fixes #1448 .
2016-04-25 18:55:15 +02:00
kanikaa1234
22ad416f35
Addressing test
2016-04-24 19:33:31 +05:30
Jimmy
32edd35c7a
buffer completion: handle deleting items see issue #1443
...
Allows to use ctrl+d to close tabs from the buffer completion widget
when they are selected. Respects current tab settings like whether you
can close the last tab in a window.
Had to change the `rebuild()` method to use `setData()` when possible
because the selection was being lost if the whole model was being rebuilt.
Current problems are:
1) When opening a new window while you already the tab completion open on
one window a category is added for the new window but new rows in
that category aren't picked up. Interesting if you open a third
window then close the second window the completion display is now
correct... I can see that the model is being updated correctly but I
am not sure why that isn't propagating to the view. Not sure whether
it is worth looking into (further) either.
2) Bit of duplication of code, it iterates over the window registry
twice. Could put everything in one loop but then that would be
dependant on the current behaviour of the `tab_closed` signal being
called with the relevant `tabbed_browser` still existing but with the
`shutting_down` flag set.
3) I'm still using just the one `rebuild()` method and removing items from
the end then calling `setData` on everything rather than having special
`on_tab/window_closed` methods (or partial functions) that delete the
actual corresponding item. Because if I did that I would also have to
special case tab moves etc.
2016-04-23 02:55:53 +12:00
Florian Bruhin
77a9bbb4b4
Fix accidental double-import
2016-04-21 23:12:54 +02:00
Florian Bruhin
5b34f1b429
Fix ModeManager.leave docstring
2016-04-21 20:12:02 +02:00
Florian Bruhin
e0aa35b05a
Fix type in @pyqtSlot for ModeManager.leave
...
For some reason it worked with str as well, but the signal emits a
KeyMode member.
2016-04-21 20:10:58 +02:00
Florian Bruhin
ef91fa3821
Merge branch 'marks' of https://github.com/rcorre/qutebrowser into rcorre-marks
2016-04-21 20:05:41 +02:00
Ryan Roden-Corrent
ccd04ca548
Don't crash when undoing twice on default page.
...
Avoid a crash when undoing twice on the default page with last-close set to
default-page.
This was caused by logic to reuse the current tab if it is on the default page
and has no history. The fix is using openurl rather than removeTab/tabopen.
2016-04-21 08:04:20 -04:00
Ryan Roden-Corrent
600b5082a9
Touch up tests and add pyqtSlot for marks.
...
Small code review changes.
2016-04-20 21:53:12 -04:00
Florian Bruhin
e18b056877
Merge branch 'pretty_url' of https://github.com/forkbong/qutebrowser into forkbong-pretty_url
2016-04-20 22:15:54 +02:00
Florian Bruhin
6a6285495a
Merge branch 'pretty_url_2' of https://github.com/forkbong/qutebrowser into forkbong-pretty_url_2
2016-04-20 20:56:24 +02:00
Panagiotis Ktistakis
1ef2f042cf
Mention {url:pretty} in the docs
2016-04-20 19:39:18 +03:00
Panagiotis Ktistakis
6c3b0219e7
Style fix
2016-04-20 17:25:26 +03:00
Ryan Roden-Corrent
c881730fad
Handle counts for special keys.
...
Now 3<ctrl-o> will execute whatever <ctrl-o> is mapped to with count=3.
2016-04-19 23:39:02 -04:00
Ryan Roden-Corrent
0755e163bb
Only set the ' mark on normal/current hinting.
...
Don't set ' for downloading, hovering, or opening a link in a tab.
2016-04-19 21:18:20 -04:00
Ryan Roden-Corrent
268d490e25
Return False when MarkKeyParser gets special key.
2016-04-19 17:30:57 -04:00
Jan Verbeek
3788eeb10b
Add a few common generic browser keybindings
2016-04-19 22:24:24 +02:00
kanikaa1234
fae005ab7f
:navigate: command and test feature
2016-04-19 20:30:20 +05:30
Panagiotis Ktistakis
c7534bd4a3
Allow {url:pretty} variable in commands
2016-04-19 16:37:05 +03:00
Ryan Roden-Corrent
6466ff919a
Don't limit marks to alpha characters.
2016-04-19 08:28:11 -04:00
Ryan Roden-Corrent
ae267c466f
Small fixes for marks.
...
Mark two callbacks with pyqtSlot as appropriate.
Return False instead of raising NotImplementedException to avoid pylint
identifying MarkKeyParser as abstract.
2016-04-19 08:28:02 -04:00
Florian Bruhin
5c97ec1659
Fix HeaderDict lint
2016-04-19 09:50:53 +02:00
Florian Bruhin
6aaea2aa31
Fix HeaderDict with an empty value
2016-04-19 09:43:54 +02:00
Florian Bruhin
e860d8cfea
Add a custom-headers setting
...
Supersedes #1132
Closes #1020 .
2016-04-19 06:35:32 +02:00
Florian Bruhin
c5999443a1
Implement a HeaderDict config type
...
Supersedes #1132 .
Fixes #1022 .
2016-04-19 06:35:20 +02:00
Panagiotis Ktistakis
045b54b94b
Add commands to yank pretty decoded URLs
...
yp and yP, yank to the clipboard and primary selection respectively
2016-04-18 23:11:27 +03:00
Panagiotis Ktistakis
bd6783c7e6
Add --pretty flag to :yank
...
With --pretty, the URL is yanked in a "pretty form", with most
percent-encoded characters decoded. Partially fixes #1372 .
2016-04-18 23:10:53 +03:00
Ryan Roden-Corrent
a924144d9a
Set ' mark after searching.
...
Allow jumping back to the previous position after a search jumps you around.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
4b00a17d71
Fix MarkKeyParser crash when changing keyconfig.
...
Ensure MarkKeyParser implements on_keyconfig_changed, so it doesn't fail when
rebinding a key. It doesn't have keybindings, so the implementation is just
`pass`.
This also fixes a few flake8 style errors.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
be6308534f
Store both x and y position for marks.
...
Previously only stored/used y.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
f4b9573744
Remove cyclic dependency from MarkKeyParser.
...
Rather than calling modeman.leave directly, modeman hooks into a request_leave
signal that is fired when MarkKeyParser wants to exit mark mode.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
49b2f6e967
Move jump_mark logic to TabbedBrowser.
...
This simplifies the MarkKeyParser by removing its dependency on the
commandrunner. It also removes the need for a new exception type.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
e684cfa03f
Trivial fixes for marks based on code review.
...
- Fix a docstring copy-paste
- Add own name/copyright date to new file
- Simplify a bdd expression (no need for regex)
- Scroll to a pixel position in a single operation
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
540f4af225
Set the ' mark after following a link.
...
This moves mark storage from CommandDispatcher to TabbedBrowser, so it can also
be accessed by the HintManager.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
c7b830d69d
Fix up mistakes caught by pylint.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
84eb30bc9a
Marks are local to urls, not tabs.
...
Rather than binding each set of local marks to a tab, bind them to a
url. Strip the fragment from the url, as two pages that differ only in
fragment are likely the same page.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
4037719a78
Add default bindings for set-mark and jump-mark.
...
Bind set-mark to ` and jump-mark to '.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
7bfea773db
Add set_mark and jump_mark modes.
...
These modes use a custom handler to pass whatever the next keypress is
to either set_mark or jump_mark.
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
9062f5925e
Set the ' mark on a jump.
...
Automatically set the special "'" mark when jumping.
jump-mark "'" will jump to the last position before the previous jump.
A jump could be navigating via a link, jumping to another mark, or
scrolling by percentage (e.g. gg or G).
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
ddcae14ba4
Implement set-mark and jump-mark.
...
set-mark <key> saves your current scroll position as mark <key>.
jump-mark <key> jumps to the position previously set for mark <key>.
If <key> is lowercase, it is local to the current tab. Each tab has its
own set of lowercase marks.
If <key> is uppercase, it is global across tabs, and stores a url and a
scroll position. Jumping to an uppercase mark navigates to that url,
then scrolls to the saved position.
Resolves #310 .
2016-04-17 21:04:08 -04:00
Ryan Roden-Corrent
f5bb75a186
Fix docstring in scroll_px.
2016-04-17 21:04:08 -04:00
Jakub Klinkovský
3265601eab
Merge remote-tracking branch 'upstream/master' into hints_clicking
...
* upstream/master: (327 commits)
Remove unused import
tox: Update Werkzeug to 0.11.8
Regenerate authors
Use __file__ instead of sys.argv[0]
Regenerate authors
Make update_3rdparty.py install correctly when run from any directory
Open command line urls explicitly.
tox: Update Werkzeug to 0.11.6
Move qutebrowser.rcc to misc/
Regenerate resources
Fix CHANGELOG/link in README
New qutebrowser logo!
www: Add releases link
Release v0.6.1
release checklist: Clarify how to build on Windows
Make sure the cheatsheet PNG is included in sdist
Fix cheatsheet link URL in quickstart
Mark segfault on exit in test_smoke as xfail
Add a xfail test for #797
Add missing file
...
Conflicts:
tests/integration/features/hints.feature
2016-04-15 22:37:47 +02:00
Xitian9
c76d4479ee
Open command line urls explicitly.
2016-04-15 18:50:42 +10:00
Alexey Glushko
2645334425
Indent fixing
2016-04-14 17:20:34 +00:00
Florian Bruhin
8dec54f7d9
Regenerate resources
2016-04-14 17:59:28 +02:00
Florian Bruhin
d3e7be1eb0
New qutebrowser logo!
...
Thanks to http://www.yelostudio.com
2016-04-14 17:44:38 +02:00
haitaka
d61ee2681f
set back to the qutebrowser logo in on_load_started
2016-04-14 20:26:00 +06:00
haitaka
de93e6c7ee
remove trailing whitespace
2016-04-13 19:15:01 +06:00
haitaka
b10c1b063d
Site favicon as window icon when 'tabs-are-windows' is enabled
2016-04-13 19:08:50 +06:00
Florian Bruhin
c690e652dc
Release v0.6.1
2016-04-10 21:25:32 +02:00
Florian Bruhin
6989d4d210
Fix downloading of non-ascii files with LC_ALL=C
...
Fixes #908 .
2016-04-10 20:16:40 +02:00
Florian Bruhin
a33aa524de
Don't crash if data is None while saving session
...
Under some circumstances I can't reproduce (switching/turning off
monitors?) it seems it's possible that SessionManager.save gets called
with last_window=True, without on_last_window_closed being called.
This might be to one of the Qt screen management bugs fixed in Qt 5.6,
which would explain why I can't reproduce it.
Instead of crashing, let's log the error and not save the session.
2016-04-10 17:47:14 +02:00
Florian Bruhin
20f80610be
Add some more logging for standarddir
2016-04-10 17:47:04 +02:00
Florian Bruhin
e6334e196c
Fix #1414 with a weird workaround
2016-04-10 15:26:02 +02:00
Johannes Martinsson
570d8b4abe
Make tab-focus count from end with negative index
...
This makes it possible to jump to the very last tab, as opposed to the
last focused tab, by using -1 as the index. Generally negative indexes
are counted from the end.
Solves issue #1166
2016-04-09 03:40:36 +02:00
kanikaa1234
a2bcf80aae
Fixed the tests
2016-04-08 20:51:07 +05:30
kanikaa1234
5c976d724b
Fixes #1318
2016-04-08 19:40:45 +05:30
Florian Bruhin
642dc46ba9
flake8: Add hacking
2016-04-08 07:35:53 +02:00
Florian Bruhin
f5b9e0ab27
Add Tor/HTTP completions for network -> proxy
2016-04-07 21:25:23 +02:00