Florian Bruhin
88d3e86259
Use "what != 'url-pretty'"
2016-08-07 11:02:50 +02:00
Florian Bruhin
efada0a44c
Merge branch 'yank-refactor' of https://github.com/mlochbaum/qutebrowser into mlochbaum-yank-refactor
2016-08-07 11:02:24 +02:00
Florian Bruhin
0b93272786
Merge branch 'sortfilter_tests' of https://github.com/rcorre/qutebrowser into rcorre-sortfilter_tests
2016-08-07 10:46:28 +02:00
Ryan Roden-Corrent
adc428e525
Perfect coverage for sortfilter.
...
Mark an area of sortfilter with `#pragma no coverage` and add it to
perfect_files.
2016-08-06 20:48:21 -04:00
Jan Verbeek
dc69a90e69
Add :insert-text command
...
See #1790 .
:paste-primary now calls :insert-text and can be deprecated by
:insert-text {primary} after #1791 is merged.
2016-08-07 02:46:10 +02:00
Marshall Lochbaum
006a934913
Migrate yank keybindings
2016-08-06 20:35:49 -04:00
Marshall Lochbaum
28485b0731
Migrate -p to -s for :yank selection keybinding
2016-08-06 20:35:06 -04:00
Marshall Lochbaum
47969362e1
Fix minor conditional issues in yank
2016-08-06 20:15:51 -04:00
Marshall Lochbaum
a90662ef83
Fix combined yank documentation
2016-08-06 20:13:50 -04:00
Jan Verbeek
38508274e0
Improve clipboard exceptions, migrate bindings
2016-08-07 00:46:23 +02:00
Daniel Schadt
9a4655443f
os.unlink -> os.remove
...
The functions do the same, but remove sounds better.
2016-08-07 00:11:58 +02:00
Jan Verbeek
96146c55af
Remove useless clipboard target information
2016-08-06 22:25:08 +02:00
Jan Verbeek
0177dafbd0
Add {clipboard} and {primary} to replace :paste
...
:paste is deprecated and replaced by equivalents using :open and the
new variables, and :open supports opening newline-separated lists of
URLs.
2016-08-06 22:03:50 +02:00
Daniel Schadt
f23a28079c
editor: fix external editor on windows
...
On windows, only one process can open a file in write mode at once. We
didn't close the handle we got (self._oshandle) before _cleanup, which
means that we had the file open the whole time, which means that the
external editor couldn't write back the changes.
This patch closes the file while the external editor is running and only
opens it once the editor is closed. We re-opened the file anyway, so
this shouldn't be a huge change. Additionally, tempfile.NamedTemporaryFile
is used instead of mkstemp, as we don't have to deal with os-level file
handles that way.
2016-08-06 20:04:25 +02:00
Ryan Roden-Corrent
66358e5b0f
Remove usertypes.Completion.empty.
...
Completion.empty existed to fill a slot in the old Command.completions
interface if the first positional arg had no completions but the second
did, as is the case for the `bind` command. Now that
`Command.completions` is replaced by `Command.get_pos_arg_info`, this
is no longer needed.
2016-08-06 12:01:09 -04:00
Ryan Roden-Corrent
c792ffda67
Remove Command.completion.
...
Command completion types are now identified by ArgInfo, so just use
that directly and cut out the middle-man. This shouldn't change any
completion behavior.
Adds a test for get_pos_arg_info to test_cmdutils.
Modifies test_completer to test the use of get_pos_arg_info. Instead of
using FakeCommand, real Command objects are used, to validate that the
Completer works with the real Command interface. This also cleans out
some test cases that were testing things already covered by other cases.
2016-08-06 11:59:04 -04:00
Marshall Lochbaum
54ba27cf77
Merge :yank-selected into :yank ( fixes #820 )
...
Changes :yank's flag arguments to a positional "what" argument
specifying the object to be yanked. Including "selection" as a
possibility allows for the replacement of :yank-selected with
:yank selection.
2016-08-05 22:01:17 -04:00
Jan Verbeek
1e97247c63
Revert spawn's splitting, blacklist from doc
...
Blacklist spawn from getting the no_replace_variables doc note.
2016-08-05 18:04:14 +02:00
Florian Bruhin
778ccad39f
Move most :navigate code to browser.navigate
2016-08-05 17:28:48 +02:00
Florian Bruhin
68595e1736
Make sure base URL for resolve_url is absolute
2016-08-05 17:12:09 +02:00
Florian Bruhin
7a65559cce
Move hints._resolve_url to a WebElement method
2016-08-05 17:09:52 +02:00
Jan Verbeek
8a527b5faf
Make :spawn parse normally without maxsplit
2016-08-05 16:52:47 +02:00
Florian Bruhin
4541f19195
Fix crash when doing :<space><enter>
...
Introduced in #1577 .
Fixes #1773 .
2016-08-05 15:42:03 +02:00
knaggita
d25e1fde04
Add :debug-log-capacity command
2016-08-05 15:05:27 +02:00
Florian Bruhin
e2ae133757
Split up HintActions from HintManager
2016-08-05 12:37:25 +02:00
Florian Bruhin
d8521f43ee
Change tab.find_all_elements() to be async
2016-08-05 12:37:25 +02:00
Florian Bruhin
0169f3a24f
Add _qutebrowser_ prefix for custom JS functions
...
With QtWebKit or QtWebEngine with Qt < 5.7, the functions end up in the
page's namespace. We can't easily avoid this, but at least we can name
them in a way which reduces conflicts.
2016-08-05 10:31:07 +02:00
Florian Bruhin
ab0d9ca499
Remove another unneeded FIXME
...
Closes #112 .
[ci skip]
2016-08-05 09:35:06 +02:00
Florian Bruhin
da6118bd8d
Hide "QXcbClipboard: SelectionRequest too old"
...
Fixes #1287 .
2016-08-05 08:31:44 +02:00
Florian Bruhin
94cf3fa4ff
QtWebEngine: Restore Qt 5.6 compatibility
2016-08-04 21:33:53 +02:00
Florian Bruhin
029ea2e5a7
Add miscwidgets.WrapperLayout.wrap
...
This makes it easier for an user of WrapperLayout to wrap a widget.
2016-08-04 19:22:44 +02:00
Florian Bruhin
7b211e0b65
QtWebEngine: Run javascript in ApplicationWorld
...
This means the JS context will be isolated from the webpage itself, and
the webpage won't be able to access things we define.
2016-08-04 18:14:29 +02:00
Florian Bruhin
a8ef956726
Add quotes for strings in javascript.assemble
2016-08-04 17:58:40 +02:00
Florian Bruhin
08b70f0f4c
Add qutebrowser.utils.javascript
...
webelem.javascript_escape got renamed to javascript.string_escape, and a
new javascript.assemble got added to make it easier to call a function
inside a .js file.
2016-08-04 17:53:13 +02:00
Jan Verbeek
7999c493ac
Remove unnecessary import, split long line
2016-08-04 15:16:35 +02:00
Jan Verbeek
827de1743d
Document no_replace_variables, misc fixes
...
Add no_replace_variables to the asciidoc, improve its description in
the decorator, remove now unnecessary argument parsing in set-cmd-text
2016-08-04 13:21:19 +02:00
Florian Bruhin
6021dc6394
Merge branch 'open-download-fixes' of https://github.com/Kingdread/qutebrowser into Kingdread-open-download-fixes
2016-08-04 12:46:44 +02:00
Florian Bruhin
764c232033
Split inspector into web{engine,kit}inspector
2016-08-04 12:44:46 +02:00
Florian Bruhin
ee68a58001
Hide QtWebEngine web inspector warning
2016-08-04 12:09:16 +02:00
Daniel Schadt
d21b42662d
Minor Text Fixes
...
default (program) -> default application
surround {} with backticks
mention that the filename will be appended in the docstrings
2016-08-04 12:07:51 +02:00
Daniel Schadt
017bfc9b9c
open-download: append filename if no {} is found
...
This allows shortcuts like ":download-open gvim" instead of
":download-open gvim {}" to work.
2016-08-04 11:50:35 +02:00
Jan Verbeek
c7c5a98506
Allow {url} and {url:pretty} as parts of arguments
...
This makes commands like `:open web.archive.org/web/{url}` possible.
This commit also adds a no_replace_variables command register argument
that stops the replacement from happening, which is important for
commands like `:bind` and `:spawn` that take a command as an argument.
2016-08-04 02:43:02 +02:00
Daniel Schadt
5ca8f77fca
lint fixes
2016-08-03 18:16:28 +02:00
Daniel Schadt
71102cceb0
docstring & documentation fixes
2016-08-03 18:06:28 +02:00
Daniel Schadt
e8bfc25bbc
downloads: replace placeholder in cmdline
...
This allows commands like --file={} to work properly.
2016-08-03 17:59:32 +02:00
Daniel Schadt
a85227fa25
download-open: add cmdline parameter
2016-08-03 17:59:32 +02:00
Daniel Schadt
fa6c552d7b
add an application param for prompt-open-download
2016-08-03 17:59:32 +02:00
Daniel Schadt
716ce701f5
utils: move elide_filename to own function
...
Also increase the elide limit in TempDownloadManager to 50, since that's
probably still enough for all systems.
2016-08-03 17:59:32 +02:00
Florian Bruhin
33677a8449
More pylint pragmas for QtWebEngine
2016-08-03 17:43:22 +02:00
Florian Bruhin
54ae106789
default key config: Bind J to :tab-next again
...
This was originally added in #868 , but since then we changed the default
binding for gt (for :buffers).
It also accidentally shadowed the T binding which should be bound to
:tab-focus. See #1753 .
2016-08-03 17:25:53 +02:00
Florian Bruhin
23ce4561c8
Fix lint
2016-08-03 16:48:48 +02:00
Florian Bruhin
0ddb27709d
Re-add geometry saving code to WebEngine inspector
2016-08-03 16:29:46 +02:00
Florian Bruhin
61e0c8327a
Don't access QWES.globalSettings() on module-level
...
Otherwise we implicitly create a webengine context, which means setting
QTWEBENGINE_REMOTE_DEBUGGING won't work anymore.
2016-08-03 15:32:56 +02:00
Florian Bruhin
614893bdd6
Initial broken inspector support for QtWebEngine
2016-08-03 15:23:32 +02:00
Florian Bruhin
9851a13981
Add utils.random_port()
2016-08-03 13:08:55 +02:00
Florian Bruhin
dbccb12b49
Move WrapperLayout to miscwidgets
2016-08-03 13:08:25 +02:00
Florian Bruhin
5f5b395343
pylint: Ignore failing QtWebEngineWidgets import
2016-08-03 12:16:13 +02:00
Florian Bruhin
43c81cc3a4
Fix KeyError with unknown options
2016-08-03 11:58:42 +02:00
Florian Bruhin
11e7f7c334
Remove unused imports
2016-08-03 11:37:05 +02:00
Florian Bruhin
cae7eead6f
QtWebEngine: Basic settings support
2016-08-03 11:35:08 +02:00
Florian Bruhin
2ee95df9e7
Change the default hint implemenation to Python
...
This only affects drawing hints, JS is still used if possible to
actually click them.
It seems like for many people, the JS implementation was a lot slower
than the Python one...
2016-08-03 09:40:05 +02:00
Florian Bruhin
1fb4aa3532
Merge branch 'tab-open-implicit' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-open-implicit
2016-08-03 09:16:49 +02:00
Florian Bruhin
79d2116b18
Remove unneeded 'return'
2016-08-03 09:07:12 +02:00
Florian Bruhin
77dd2a105f
Add cmdutils.check_overflow in _set_current_index
2016-08-03 08:57:05 +02:00
Marshall Lochbaum
af9e956cb6
Remove config update code for --implicit flag
2016-08-02 15:29:18 -04:00
Marshall Lochbaum
299d4865d0
Move --implicit flag argument to the end of _open
2016-08-02 15:26:49 -04:00
Marshall Lochbaum
feed1ccda4
Change gO, xO, and ;O keybindings to open an implicit tab
2016-08-02 14:10:36 -04:00
Marshall Lochbaum
66adbc9323
Add --implicit flag to :open
2016-08-02 13:49:25 -04:00
Marshall Lochbaum
d30da4f905
Update tab_focus docstring
2016-08-02 11:50:21 -04:00
Marshall Lochbaum
8a127f2839
Remove cmdutils.arg_or_count
2016-08-02 11:31:03 -04:00
Florian Bruhin
a3047008dd
Bump up filename length limit to 50
...
The usual limit seems to be 255 bytes, so even when assuming 5-byte
UTF-8 chars for every letter, 50 should be fine.
http://serverfault.com/questions/9546/filename-length-limits-on-linux/9548#9548
2016-08-02 16:12:09 +02:00
Florian Bruhin
b8ef6fa44e
Merge branch 'open-download-fixes' of https://github.com/Kingdread/qutebrowser into Kingdread-open-download-fixes
2016-08-02 16:11:34 +02:00
Florian Bruhin
43ff1b0d97
Tunnel private-browsing to QtWebKit correctly
2016-08-02 14:19:31 +02:00
Florian Bruhin
4a5b5c496f
Fix using a relative path with --basedir
2016-08-02 14:08:28 +02:00
Florian Bruhin
b17296db0d
Return with invalid index
2016-08-02 12:03:29 +02:00
Florian Bruhin
b8aeb9f80e
Fix lint
2016-08-02 12:03:29 +02:00
Ryan Roden-Corrent
a393adc6c7
Don't crash completion with auto-open/show False.
...
If both are false, the selectionModel may be None.
In this case, don't try to move the index.
Resolves #1722 .
2016-08-01 22:36:04 -04:00
Ryan Roden-Corrent
6e2d78b826
Don't crash on tab with no completions.
...
first_item and last_item return an invalid index when there are no
items in the completion, and the completionwidget will throw on an
invalid index. However, setting an invalid index on the selection view
is fine, so just remove the assertion.
Resolves #1731 .
2016-08-01 22:16:55 -04:00
Daniel Schadt
57ceaeeb55
open-download: don't crash on download cancel
...
Fixes #1728 .
2016-08-02 01:10:40 +02:00
Daniel Schadt
b187b680cb
open-download: force encoding for filename
...
Fixes #1726 .
2016-08-02 01:00:57 +02:00
Daniel Schadt
abcdaa9cce
open-download: make sure the name is not too long
...
Fixes #1725 .
Make sure that the temporary filename is not too long by restricting the
suggested part to 20 characters.
2016-08-02 00:57:22 +02:00
Daniel Schadt
9973cd5037
downloads: don't crash on OSError in open-download
...
Fixes the crash in #1725 , but does not provide a solution. The browser
won't crash, but the file won't be downloaded and opened either.
2016-08-02 00:46:59 +02:00
Florian Bruhin
ef439bb916
Fix ;o/;O default bindings
2016-08-01 18:19:34 +02:00
Florian Bruhin
49699be44e
Ignore TypeError on contents_size_changed cleanup
2016-08-01 17:40:41 +02:00
Florian Bruhin
81d0d64731
QtWebEngine: Fix crash when closing/reopening tabs
2016-08-01 17:25:55 +02:00
Florian Bruhin
5ec39b7540
Fix crash when opening http://foo%40bar@baz
2016-08-01 17:18:14 +02:00
Florian Bruhin
68b273de87
Merge branch 'generalize-list-type' of https://github.com/mlochbaum/qutebrowser into mlochbaum-generalize-list-type
2016-08-01 16:22:13 +02:00
Florian Bruhin
4414f5fea9
Merge branch 'tab-move-index' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-move-index
2016-08-01 16:17:09 +02:00
Florian Bruhin
62f9161d03
Merge branch 'completer_tests' of https://github.com/rcorre/qutebrowser into rcorre-completer_tests
2016-08-01 16:02:53 +02:00
Florian Bruhin
86669600ff
Consider input elements without type for hinting
2016-08-01 15:49:50 +02:00
Marshall Lochbaum
5accef963d
Move _show_inner_type class variables before __init
2016-08-01 09:31:59 -04:00
Marshall Lochbaum
aa40ff6dd4
Remove none_ok from startpage config type
2016-08-01 09:30:26 -04:00
Florian Bruhin
c421f44f4e
Specify completion category font in HTML
...
It seems like specifying a font for QTreeView::item in a Qt stylesheet
doesn't actually do anything.
2016-08-01 14:56:51 +02:00
Florian Bruhin
1bba1e3ea9
Remove whitespace
2016-08-01 14:35:57 +02:00
Florian Bruhin
3d1f28ac9c
Merge branch 'master' of https://github.com/nanjekyejoannah/qutebrowser into nanjekyejoannah-master
2016-08-01 14:35:06 +02:00
nanjekyejoannah
3d4e76b1a4
commit resolving issue#1395
2016-08-01 15:20:44 +03:00
nanjekyejoannah
4d3cbe659d
refactor for configdatap.py resolving #1395
2016-08-01 14:30:20 +03:00
nanjekyejoannah
633c95bca6
resolving style things in commit resolving issue #1395
2016-08-01 14:14:15 +03:00
nanjekyejoannah
1e94685653
Refactoring to resolve issue #1395
2016-08-01 14:00:30 +03:00
Florian Bruhin
2baadaf565
Remove now useless pylint suppressions
2016-08-01 12:47:19 +02:00
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