Florian Bruhin
6ccd69dad2
Fix reload for JavaScript support on Qt 5.11
2018-05-17 15:54:17 +02:00
Florian Bruhin
44d26f77a5
Add workaround for the "split page" Qt bug (QTBUG-68224)
...
Fixes #3920
2018-05-17 14:21:14 +02:00
Florian Bruhin
6eadff4a10
Add Python executable to :version
2018-05-14 22:13:15 +02:00
Jay Kamat
71d55e9213
Refocus command prompt after a new tab is opened when in command mode
2018-05-11 08:49:13 -07:00
Jay Kamat
95093b82c9
Refocus webview after spawning a background tab
2018-05-10 10:15:01 -07:00
Jay Kamat
538b4fafdb
Revert "Restore focus to webview after clicking tab-bg"
...
This reverts commit 262cea8e75
.
2018-05-10 09:30:28 -07:00
Jay Kamat
563afb277d
Fix style issues
2018-05-10 08:04:48 -07:00
Jay Kamat
4bb048cb6a
Fix mocked tests
2018-05-09 21:41:59 -07:00
Jay Kamat
ae04da7b78
Upgrade indicator to show recentlyAudible status
2018-05-09 18:57:53 -07:00
Jay Kamat
7a297e2e3f
Add support for muting tabs
2018-05-09 18:28:05 -07:00
Jay Kamat
262cea8e75
Restore focus to webview after clicking tab-bg
2018-05-09 11:05:07 -07:00
Joakim Särehag
dc7f39514d
pull request #3864 , reverted webview changes, fixed regression
2018-05-09 18:28:52 +02:00
Joakim Särehag
72c2962908
removed trailing whitespace
2018-05-09 15:52:22 +02:00
Joakim Särehag
cbf95d76bd
Merge branch 'master' of https://github.com/qutebrowser/qutebrowser
2018-05-09 14:37:27 +02:00
Joakim Särehag
0e756d2f68
changes to pull request 3864, window.print for webengine
2018-05-09 14:36:03 +02:00
Florian Bruhin
48c44e1b4d
Fix and update docs
2018-05-08 15:22:49 +02:00
Florian Bruhin
8531f89ca3
Merge remote-tracking branch 'origin/pr/3789'
2018-05-08 11:45:20 +02:00
Florian Bruhin
89a1c43b4c
Merge remote-tracking branch 'origin/pr/3790'
2018-05-08 11:43:30 +02:00
Florian Bruhin
b718c8b43a
Merge remote-tracking branch 'origin/pr/3899'
2018-05-08 11:40:43 +02:00
Jay Kamat
906da44d70
Simplify visited link clearing by looping over connections
2018-05-07 14:10:20 -07:00
Jay Kamat
ca48f9f100
Clear url from visitedLinks if a single url is deleted
2018-05-07 13:48:38 -07:00
Jay Kamat
d0b2360745
Clear visited links db when running :history-clear on webengine
2018-05-07 13:35:41 -07:00
Pol Van Aubel
f1b481dcc7
Short options for --debug and --debug-flags
2018-05-07 22:35:32 +02:00
Pol Van Aubel
431a52da6c
Short options for --basedir and --temp-basedir
2018-05-07 22:10:08 +02:00
Florian Bruhin
b9fc068af5
Add a log-requests debug-flag
2018-05-07 10:23:56 +02:00
Florian Bruhin
7762017f00
Release v1.3.0
2018-05-03 19:25:04 +02:00
Florian Bruhin
adf2f9860d
Disable spellcheck when it's unneeded.
...
Fixes #3753
2018-05-03 17:58:56 +02:00
Florian Bruhin
f0f1a4a1d1
Merge remote-tracking branch 'origin/pr/3702'
2018-05-03 17:56:03 +02:00
Florian Bruhin
ae295a7f65
Call setFocus() when navigating
...
See #3661 :
https://github.com/qutebrowser/qutebrowser/issues/3661#issuecomment-386308601
This doesn't seem to fully fix this, but at least the top four failed tests
there...
This should not regress #3872 . Might affect #3834 in some way.
2018-05-03 17:43:19 +02:00
Jay Kamat
2663feea2f
Add :hint inputs --first as a default binding to gi
2018-05-03 11:37:31 -04:00
Florian Bruhin
68794cc2e2
Revert "Always set FocusOnNavigationEnabled"
...
This reverts commit fa41af63b6
.
See #3661
Fixes #3872
2018-05-03 15:25:41 +02:00
Florian Bruhin
acdf0a1c60
Call _handle_search before leaving the mode
2018-05-03 15:23:45 +02:00
Florian Bruhin
626abd3c83
Fix lint
2018-05-03 15:18:21 +02:00
Florian Bruhin
979b7cfaba
Add a stop-gap solution for AssertionError when retrying downloads
...
See #3847
2018-05-03 14:52:10 +02:00
Florian Bruhin
2b6b4e82a7
Handle event_target() being None
...
As a stop-gap solution for #3888
2018-05-03 14:45:55 +02:00
Florian Bruhin
6eb8284fe0
Refactor handling search in command.py
2018-05-03 14:04:56 +02:00
Florian Bruhin
49bdcd5a97
Merge remote-tracking branch 'origin/pr/3796'
2018-05-03 13:58:26 +02:00
Florian Bruhin
106e591a36
Refactor matching of Greasemonkey scripts
2018-05-03 13:53:10 +02:00
Florian Bruhin
4932cc4d24
Merge remote-tracking branch 'origin/pr/3804'
2018-05-03 13:33:08 +02:00
Jimmy
19554ba4a1
Update PyPI api URL.
...
Flask 1.0 is out, pip made breaking changes, warehouse is a thing, new
requests soon. So
much fun in python world lately.
2018-05-02 23:08:51 +12:00
toofar
d16d9e403a
Make HTTPClient follow redirects by default.
...
Closes #3875
The autoupdator, which uses `qutebrowser.misc.httpclient` has been failing recently because the URL that it hits to check version information is now serving a 301 moved permanently. By default QNetworkRequest doesn't follow redirects so it was getting back a (non-json, despite the request) body pointing to the new location, instead or version information. This changes fixes that by changing HTTPClient to use a QNetworkRequest subclass which follows redirects by default.
It lookes like HTTPClient is currently only used in autoupdate.py, version.py, and crashdialog.py so I don't expect any breakage.
5.6-5.8 Only had a boolean setting available which allows redirects, but not from the https scheme to http, 5.9 introduces a more nuanced setting. I have tested locally on 5.7.1 and 5.10.
2018-05-02 23:08:51 +12:00
Joakim Särehag
199eac2db8
window.print() support for WebEngine
2018-04-24 14:05:53 +02:00
Florian Bruhin
fa41af63b6
Always set FocusOnNavigationEnabled
...
This fixes some focus issues after Qt 5.11 changes. There might be better ways
to solve them, but for now, this will work.
See https://codereview.qt-project.org/#/c/221408/10 and #3661 :
https://github.com/qutebrowser/qutebrowser/issues/3661#issuecomment-375969315
Might also negatively affect #3834 as it essentially reintroduces QTBUG-52999 on
any Qt version: https://bugreports.qt.io/browse/QTBUG-52999
Might be reverted at a later date, but for now, I want an easy way to make tests
work on Qt 5.11 to spot further issues.
2018-04-23 16:57:10 +02:00
Florian Bruhin
bc9a8dd63f
Handle focusProxy being None
...
This fixes running with Qt 5.11
See https://codereview.qt-project.org/#/c/221408/10 and #3661 :
https://github.com/qutebrowser/qutebrowser/issues/3661#issuecomment-375969315
2018-04-23 16:52:53 +02:00
Florian Bruhin
6640768860
Enable libGL workaround on any system where it's available
...
Fixes #3772
2018-04-23 11:20:56 +02:00
Michal Siedlaczek
c94ea5f8d4
Merge remote-tracking branch 'upstream/master' into filter-dict-names
...
Merging to investigate failed tests that seem unrelated to the PR.
2018-04-21 13:29:18 -04:00
Jay Kamat
1d2dd5bf55
Use CommandDispatcher directly for / searches
2018-04-19 21:16:33 -04:00
rr-
537aa22d64
Change clipboard mocking
2018-04-18 11:00:05 +02:00
Jay Kamat
cbb246fd0b
Update tests for new implementation
2018-04-16 23:28:32 -04:00
Jay Kamat
646e92707a
Call search command directly instead of using arguments
2018-04-16 23:15:56 -04:00
Florian Bruhin
4a93389356
Merge remote-tracking branch 'origin/pr/3813'
2018-04-16 17:04:53 +02:00
rr-
563d9bd097
Fix crash in non-rapid link yanking
2018-04-16 08:52:06 +02:00
Jimmy
c5334fb683
Greasemonkey: use UrlPatterns for match directives
...
The greasemonkey `@match` directive is used to match urls against
chromium url patterns (as opposed to `@include` which treats its
argument as a glob expression). I was using fnmatch for both here
because I am lazy and knew someone else was going to implement chromium
url patterns for me eventually. Now it is done and I should switch to
using them instead. The most common failing case that this will fix is
something matching on `*://*.domain.com/*` because it wouldn't match
the url with no subdomain.
This codepath is only used on webengine 5.7.1 and webkit backends.
2018-04-14 10:31:20 +12:00
Jay Kamat
0829511221
Merge pull request #3803 from toofar/fix/greasemonkey_includes_fallback
...
Greasemonkey: fix default include value
2018-04-13 18:26:46 -04:00
Jay Kamat
3f9099613b
Merge pull request #3807 from slackhead/tabs.mute_messages
...
Add option to mute the Last Tab/First Tab messages when tabs.wrap is false
2018-04-13 12:11:45 -04:00
rr-
d705e600e2
Simplify num
in hinting to first_run
2018-04-13 11:03:39 +02:00
Jay Kamat
77fa0730c8
Merge pull request #3802 from jgkamat/jay/tab-take-completion
...
Fix win_id 0 always being included in :tab-take completion
2018-04-10 16:24:48 -04:00
rr-
46e4aeb3e9
Don't hardcode newline
2018-04-10 08:45:23 +02:00
rr-
945bc44550
Support rapid hinting mode in yanking
2018-04-09 17:20:35 +02:00
Slackhead
62aa9bdbb3
Added debug() logging for next/prev-tab and test scenarios
2018-04-09 02:03:02 +01:00
Slackhead
b7964d9baf
Remove first/last tab messages
2018-04-08 10:31:12 +01:00
Jay Kamat
76dbfa7305
Allow searching for double semicolons
...
Possibly breaks scripts using :search with ;; to split commands. A
workaround is to put the :search command at the end.
2018-04-05 17:20:50 -04:00
Jay Kamat
d0d5ad2eda
Stop read timer when download is cancelled
2018-04-04 01:17:37 -04:00
Slackhead
39c08cb582
Add option to mute the Last Tab/First Tab messages when tabs.wrap is false
2018-04-03 16:27:04 +01:00
Jimmy
164ea98a5b
Greasemonkey: fix default include value
...
Greasemonkey scripts are supposed to default to running on all pages.
@jgkamat and @nemanjan00 repurted some script not running on all pages
unless they either removed (or broke) the metadata block or added an
include directive. Indeed I had a logic error when it only defaulted to
being included on all pages when no metadata block at all was included.
Whoops.
2018-04-03 20:11:15 +12:00
Jay Kamat
3b2c0823af
Fix win_id 0 always being included in :tab-take completion
2018-04-02 20:34:34 -04:00
Jay Kamat
423192e9c9
Join text arguments for :search
2018-04-01 21:00:02 -04:00
Jimmy
1c0616f3ec
Greasemonkey: fix early addstyle with fast sites.
...
nemanjan00 reported this script not having any effect da850e49cc/duckduckgo-deepdark.user.js
It turns out that the previous implementation of GM_addStyle was relying
on `document.onreadystatechange` when the script ran early enough that
there was no `head` element. That event wasn't getting fired for the
main frame of duckduckgo.com for whatever reason. Maybe using
`DOMContentLoaded` or something would have worked but I just copied the
fallback in the above linked script which seems to work just fine.
2018-04-01 12:38:48 +12:00
Ryan Roden-Corrent
707fc1176d
Regen completion if args change.
...
Allow completion functions to react dynamically to args as the user
inputs them. This allows config-cycle to filter out values that were
already provided.
Args provided after the maxsplit do not cause the completion to regen.
For example, successive words typed after `:open` just set the filter
pattern and do not spuriously regenerate the completion model.
2018-03-31 11:45:50 -04:00
Jay Kamat
3d5d679561
Add basic implementation for clicking first hinted element
2018-03-30 15:03:08 -04:00
Florian Bruhin
d438aa15fa
Simplify setting _qute_script_id
2018-03-30 11:48:06 +02:00
Jay Kamat
7f5a79cdfd
Escape strings with string_escape rather than tojson
2018-03-30 01:40:49 -04:00
Florian Bruhin
d7455bcdba
Merge remote-tracking branch 'origin/pr/3765' into adblock
2018-03-28 20:32:47 +02:00
Florian Bruhin
0b667e4701
Merge remote-tracking branch 'origin/pr/3763' into adblock
2018-03-28 20:32:39 +02:00
George Edward Bulmer
1ccb464d1c
Return removed comment about hosts format
2018-03-28 14:17:13 +01:00
Florian Bruhin
14792472db
Merge remote-tracking branch 'origin/pr/3680'
2018-03-28 09:29:54 +02:00
Florian Bruhin
c7e5033eaa
Set MainWindow as parent of TabbedBrowser
...
If we close the MainWindow (and it gets deleted), we need to make sure to delete
the TabbedBrowser as well.
Fixes #3781
2018-03-28 08:58:07 +02:00
Jussi Timperi
046a3dc159
Add option to only show favicons for pinned tabs
...
Closes #3440
2018-03-28 00:45:57 +03:00
Florian Bruhin
9cff0e7367
Merge remote-tracking branch 'origin/pr/3742'
2018-03-27 12:01:18 +02:00
Florian Bruhin
bf4aab79ac
Merge remote-tracking branch 'origin/pr/3751'
2018-03-27 11:11:12 +02:00
Florian Bruhin
a6f6fdf19b
Update docs
2018-03-27 11:09:18 +02:00
Florian Bruhin
e5ffcbd49f
Merge remote-tracking branch 'origin/pr/3750'
2018-03-27 11:07:29 +02:00
Ryan Roden-Corrent
f237a87ad0
Completion for varargs.
...
When a command has positional varargs, keep offering the configured
completion for each successive argument.
Right now this only influences `config-cycle`.
Previously, `config-cycle <option> ` would offer a value completion for
only the first argument after the option. Now it will keep offering
value completion for each successive argument.
This will be useful for passing multiple tags to the new bookmark
commands that will be added for #882 .
2018-03-25 21:59:30 -04:00
Philip Lewis
cecb79cf05
Fix keyhints for special characters
...
`prefix` is a string and `seq` is a key sequence, so removing `len(prefix)`
items from `seq` will remove too many if `prefix` contains a special character
(ex "<Ctrl+x>"). Remove the number of characters from `str(seq)` instead.
2018-03-25 15:18:02 -04:00
Florian Bruhin
12a405965a
Make QtWebEngine inspector work with JS disabled
2018-03-25 14:55:03 +02:00
George Edward Bulmer
8809ef02a1
Add support for more than 1 host on a given line
2018-03-24 20:20:16 +00:00
George Edward Bulmer
3f37fcf8fa
Modify tests, localhost should never be blocked
2018-03-24 20:15:34 +00:00
George Edward Bulmer
c8db9e1c76
Remove WHITELISTED, making file parsing satisfy:
...
1) 'dotless' hosts, e.g. localhost, cannot be blocked by a file
2) hosts ending in '.localdomain' cannot be blocked by a file
2018-03-24 19:42:34 +00:00
George Edward Bulmer
01d8314dd8
Change default blocklist to StevenBlack combined
2018-03-24 18:35:03 +00:00
rien333
fa21d280fa
Remove unnecessary hide operation
2018-03-24 05:09:03 +01:00
rien333
e211801e16
Handle wayland decoration option rename through configdata.yml
2018-03-23 15:24:18 +01:00
rien333
6db1ab0a58
Cosmetic changes
2018-03-23 15:21:02 +01:00
rien333
aa70395925
Merge branch 'master' of https://github.com/rien333/qutebrowser
2018-03-23 15:19:58 +01:00
rien333
880b33fff5
Restore correct window visibility after decoration config change
2018-03-23 15:19:37 +01:00
rien333
1fc0abb064
Delete .#configfiles.py
2018-03-23 02:50:36 +01:00
rien333
ff299c87a8
Reinsert wayland specific code for toggling decoration visibility
2018-03-22 23:32:37 +01:00
rien333
2d2bdad2ca
Do not require restart after decoration option change
2018-03-22 23:26:45 +01:00
Jay Kamat
477da6002a
Fix minimum size for vertical tabs
2018-03-22 12:59:35 -04:00
Jay Kamat
d2c01d7ee6
Always display plain titles in tab tooltips
...
Closes #3741
2018-03-22 12:03:15 -04:00
rien333
764e79e505
Small refactor
2018-03-22 03:44:24 +01:00
rien333
a6b92dbbd3
General window decoration hiding option
2018-03-22 02:23:21 +01:00
George Edward Bulmer
991ba54499
Change the formatting of the numpad keys
...
This makes it consistent with as before
2018-03-21 15:41:08 +00:00
George Edward Bulmer
1cf3d66a22
Revert test and modify returned key
2018-03-21 15:34:32 +00:00
Florian Bruhin
a8bbd5fa4d
Update docs for TimestampTemplate
2018-03-21 10:14:48 +01:00
George Edward Bulmer
4d7f8e4878
Pylint fix
2018-03-21 00:28:52 +00:00
George Edward Bulmer
a5dc8a3025
Fix crash in string representation of key
2018-03-20 23:13:56 +00:00
George Edward Bulmer
d6463d5ade
Remove Qt.KeypadModifier as a special key
2018-03-20 22:33:11 +00:00
Florian Bruhin
f9d976880e
Disable shared web workers on Qt < 5.11
2018-03-20 21:14:04 +01:00
Florian Bruhin
0ee9d73fe2
Merge remote-tracking branch 'origin/pr/3692'
2018-03-20 07:05:43 +01:00
Florian Bruhin
32145d579b
Merge branch 'pyup-scheduled-update-2018-03-19'
2018-03-20 07:00:37 +01:00
Florian Bruhin
a374698693
Fix lint
2018-03-20 06:38:11 +01:00
Florian Bruhin
32df91fbae
Merge remote-tracking branch 'origin/pr/3604'
2018-03-20 06:24:57 +01:00
Jay Kamat
f6c00babbe
Prevent minimumTabsizeHint from being called when booting on mac
...
Move workaround higher up to the start of tabSizeHint
2018-03-19 18:29:51 -04:00
Florian Bruhin
7eaad59be3
caret: Ignore None value from setInitialCursor
...
See #3583
2018-03-19 22:32:26 +01:00
Florian Bruhin
9031b3e535
Remove @pyqtSlot for on_download_requested
...
For some reason, this breaks when test_pac is run...
2018-03-19 20:17:15 +01:00
Florian Bruhin
f5d7605ae0
Add a :scroll-to-anchor command
...
Fixes #2784
2018-03-19 19:18:33 +01:00
Florian Bruhin
e50068021d
Use signals to update statusbar in caret mode
...
This means we don't use objreg anymore to get the status bar, and also makes the
bar more accurately reflect reality.
See #3583
2018-03-19 18:44:06 +01:00
Florian Bruhin
e43f0a61b9
Move all QWebEngineScript related code out of webenginesettings
...
It looks like there's some issue with QWebEngineScript in a profile, at least
with older Qt versions...
See #3497 , #3377
2018-03-19 17:33:02 +01:00
Florian Bruhin
da8b6fb50a
Decrease maximum repetitions for QtWebEngine scrolling
...
At least for Qt debug builds, 5000 seems to be much too much.
See #3661
2018-03-19 14:11:01 +01:00
Florian Bruhin
f28a39571c
Fix caret.js indent
2018-03-19 11:49:24 +01:00
Florian Bruhin
39d25c1127
Update _chromium_version comment
...
[ci skip]
2018-03-19 11:15:19 +01:00
Florian Bruhin
6465d64738
Fix lint
2018-03-19 10:22:21 +01:00
Florian Bruhin
a4530797ea
Add a ProfileSetter class to webenginesettings
...
Easier than passing a profile around everywhere.
2018-03-19 09:40:57 +01:00
Florian Bruhin
1b84bbd61d
Refactor initialization of internal JavaScript
...
- Initialize JavaScript in webenginesettings.py instead of webenginetab.py
- Move JavaScript snippet into a .js file
- Make sure scripts can be re-run and do nothing if already run.
- Run scripts on DocumentCreation *and* DocumentReady. Closes #3717 .
- Give each script an unique name for debugging.
- Also make custom stylesheets work on chrome:// pages
2018-03-19 09:14:55 +01:00
Florian Bruhin
f2864c6253
Break greasemonkey_wrapper lines differently
2018-03-19 09:13:50 +01:00
AlternateData
62d30fe589
use 0 and maxint as bounds
2018-03-18 10:06:41 +01:00
AlternateData
a52d18b700
Add correct maximum and minimum value for tabs.switching_delay
2018-03-17 17:59:31 +01:00
Marc Jauvin
b7159d780a
Merge 'origin/master' into tab-input-mode
2018-03-16 14:28:36 -04:00
Michal Siedlaczek
f9e702bae5
Warn about malformed dictionaries
2018-03-16 11:28:45 -04:00
Florian Bruhin
f7074b80d0
Fix lint
2018-03-16 09:07:25 +01:00
Florian Bruhin
01845faac5
Set window title/icon on correct object
...
This was a regression introduced in #3613 .
Fixes #3727
2018-03-16 08:20:27 +01:00
Florian Bruhin
6f8eb419ae
Emit predicted_navigation when loading sessions
...
This avoids reloads (because of changed settings) after a session has been
loaded.
Related to #3718
2018-03-15 14:51:36 +01:00
Florian Bruhin
1e4b80d1ac
Don't emit predicted_navigation when reloading because of it
...
When we reload because of a config change in _on_load_finished, we can't use
self.reload() as no URL is set yet. Instead, we call self.openurl with the
current URL.
However, we need to make sure we don't emit predicted_navigation again at that
point.
This should (finally) fix #3718
2018-03-15 14:44:44 +01:00
Florian Bruhin
5dbda3016b
Clean up predicted_navigation handling
...
This also adds some more logging for #3718
2018-03-15 14:16:10 +01:00
Florian Bruhin
a60bae30b7
Release v1.2.1
...
(cherry picked from commit 6145786e461b104f2b23faf46a24172ba81fbeea)
2018-03-14 20:20:20 +01:00
Florian Bruhin
84c7c37e8e
Swap Control/Meta back on macOS
...
Fixes #3697
(cherry picked from commit fd9e7bed7fd9842eac22ed304a094a92cc953577)
2018-03-14 19:40:56 +01:00
Florian Bruhin
a22f973c99
Don't emit predicted_navigation for reloads at all
...
When we reload a page because of a config change, we won't get another
titleChanged signal (at least sometimes).
Also, the predicted_navigation signal is worthless when reloading anyways, as
we're going to load the same URL and not something different.
Fixes #3718
2018-03-14 18:19:11 +01:00
Florian Bruhin
5c73910a33
Revert "Insert qutebrowser scripts on DocumentCreation and DocumentReady"
...
This reverts commit fac0f66e52
.
2018-03-14 10:19:23 +01:00
Florian Bruhin
c0fdf19756
Merge remote-tracking branch 'origin/pr/3704'
2018-03-14 08:06:24 +01:00
Florian Bruhin
fac0f66e52
Insert qutebrowser scripts on DocumentCreation and DocumentReady
...
In #3521 , the injection point was changed to DocumentReady as a fix for
https://bugreports.qt.io/browse/QTBUG-66011 / #3490 .
However, that prevents e.g. using hints before a page is fully loaded, which can
be annoying on a mobile connection.
Instead, just run the scripts twice, which won't hurt and makes sure they're
available.
2018-03-14 07:50:41 +01:00
Marc Jauvin
c9f6cd507b
address requested changes
...
- add INPUT_MODES & PROMPT_MODES constants in modeman
- use those in tabbedbrowser and modeman
- fix debug logs format to be more human readable
- fix associated tests for new debug logs
2018-03-13 23:31:48 -04:00
Jay Kamat
7278b7c2e5
Improve wording of documentation
2018-03-13 22:25:26 -04:00
Jay Kamat
a6e94cf30c
Fix hinting in frames on qt5.9 with input ranges
2018-03-13 18:54:08 -04:00
Florian Bruhin
8b9c6ccee2
Split up BaseKeyParser.handle into functions
2018-03-13 14:40:54 +01:00
Florian Bruhin
b88ac51d25
Fall back to non-keypad keys without any keypad bindings
...
Fixes #3701
2018-03-13 14:40:54 +01:00
Markus Ongyerth
40364ce774
view-source pygments feedback pass
2018-03-13 12:40:51 +01:00
Ryan Roden-Corrent
27966c94a6
Fix up editor backup patch.
...
- Use qutebrowser-editor-backup as the backup file prefix
- Consistently use message.error instead of cmdexc
- Improve test coverage for the backup function
- Fix lint errors in the unit test code
2018-03-13 07:34:18 -04:00
Florian Bruhin
1c9598d2c0
Don't emit predicted_navigation with invalid URLs
...
Fixes #3706
2018-03-13 09:46:09 +01:00
Florian Bruhin
dcd6bcd2f4
Apply changes from PR review
2018-03-13 08:47:41 +01:00
Florian Bruhin
c590648077
Merge remote-tracking branch 'origin/pr/3613'
2018-03-13 08:39:36 +01:00
Florian Bruhin
14d6e737fa
Merge remote-tracking branch 'origin/pr/3606'
2018-03-13 07:37:57 +01:00
Ryan Roden-Corrent
38bb3673db
Preserve a backup if editor callback fails.
...
Currently the editor deletes its temp file whenever editing is finished.
With this patch, the file will not be deleted if the editor callback
encounters an exception.
One example is if the tab containing the edited element is closed. The
editor errors with "Edited element vanished", but with this patch it
will also print "Backup at ..." so the user does not lose their work.
Resolves #1596 .
Supersedes #3641 , using the cleaner approach started in #1677 .
2018-03-12 08:34:50 -04:00
Florian Bruhin
8c5b7bcd03
Fix lint
2018-03-12 08:51:36 +01:00
Florian Bruhin
9941812127
Normalize keys read from the config
...
This makes sure the internal bindings.commands object only contains normalized
key sequences.
Fixes #3699
2018-03-12 08:00:56 +01:00
Florian Bruhin
990c0707f4
Make from_obj() work for List/Dict configtypes
...
We can't easily make it work for ListOrValue as we don't know which of both we
get at this point.
2018-03-12 08:00:18 +01:00
Florian Bruhin
d72691ee49
Simplify ListOrValue configtype
2018-03-12 07:38:56 +01:00
Michal Siedlaczek
29eadf7141
Filter installed dictionaries using a regex to ensure correct name
2018-03-11 17:50:20 -04:00
Florian Bruhin
591883656e
Merge remote-tracking branch 'origin/pr/3700'
2018-03-11 14:34:06 +01:00
Roman Bogorodskiy
d0342bffc4
Show version for POSIX OSes
...
For POSIX OSes other than Linux and macOS set OS Version to
platform.uname() instead of showing 'OS Version: ?'.
2018-03-11 13:28:53 +04:00
Florian Bruhin
d9f7d401c6
Handle ImportError in version.opengl_vendor
...
Fixes #3698
2018-03-11 08:15:22 +01:00
Florian Bruhin
5f01c7e79a
Release v1.2.0
2018-03-09 22:40:59 +01:00
Jay Kamat
996561b50e
Apply tabs.min_width to all tabs when tabs are unshrunk
2018-03-09 14:36:01 -05:00
Johannes Wegener
cf4e472461
add basic completion to file dialog
2018-03-09 16:21:57 +01:00
gammelon
7e3c966afe
rewrite tests
2018-03-09 15:52:03 +01:00
Florian Bruhin
39eb512b27
Fix lint
2018-03-09 14:13:29 +01:00
Florian Bruhin
ebb373ccad
Make sure keys with modifiers get handled as special
2018-03-09 09:04:28 +01:00
Florian Bruhin
c7cccf4ba0
Clear key chains when a special key is pressed in hint mode
...
When we press "s<Escape>", we don't want <Escape> to be handled as part of a key
chain.
2018-03-09 08:43:07 +01:00
Jay Kamat
1672995639
Clean up style issues
2018-03-09 02:19:49 -05:00
Jay Kamat
4a78b0519d
Add tabs.min_width setting
...
Controls min width in pixels of non pinned tabs
Closes #3690
2018-03-09 02:05:49 -05:00
Jay Kamat
46533c3367
Fix pinned tabs being too small in extreme situations
2018-03-09 02:02:31 -05:00
Florian Bruhin
b789e436b8
Fix lint
2018-03-09 07:07:04 +01:00
jakanakae-envangel
0cd73af691
keyinput: Merge keyparser into modeparsers
2018-03-08 19:55:43 +01:00
Florian Bruhin
63d23ca9df
Add compiled=False to version checks
2018-03-08 18:48:35 +01:00
Florian Bruhin
9af07d86d6
Don't double HTML escape JavaScript messages
...
See https://bugreports.qt.io/browse/QTBUG-66104
2018-03-08 18:23:36 +01:00
Florian Bruhin
f561272f9a
Remove old comments
...
See #3687
[ci skip]
2018-03-08 15:48:34 +01:00
Florian Bruhin
c01f674234
Add Chromium versions to _chromium_version comment
2018-03-08 12:27:41 +01:00
Florian Bruhin
482b622b1b
Fix handling of empty bindings without breaking :unbind
...
1899e313fd
as a fix for #3631 broke :unbind, as
the config system treats None and '' equally.
Instead, allow None/'' again, but just handle it as "no binding".
2018-03-08 11:42:27 +01:00
Florian Bruhin
1899e313fd
Disallow binding to an empty command
...
This was introduced (most likely accidentally) in
9cbacf3264
.
Fixes #3631
2018-03-08 08:14:52 +01:00
Florian Bruhin
87c6644751
Add predicted_navigation for reload()
...
This should avoid a double-reload for 'tsh' etc.
2018-03-07 23:54:58 +01:00
Florian Bruhin
b9d26ee268
Add an input.insert_mode.auto_enter setting
...
Closes #3143
2018-03-07 23:45:19 +01:00
Florian Bruhin
9b9d7647a4
Show the keystring correctly when entering a count
2018-03-07 22:47:31 +01:00
Florian Bruhin
514138aad2
Allow to bind numbers in keybindings
...
This mostly reverts 4ef5db1bc4
for #1966 , but
fixes #3684 by allowing numbers to be bound again. If the user wants to bind
numbers instead of using them for a count, why not let them.
2018-03-07 22:37:10 +01:00
Florian Bruhin
34815f5cf8
Make bindings.default only settable in autoconfig.yml
...
Fixes #3131
2018-03-07 18:30:44 +01:00
Marc Jauvin
7c2802e843
beautify code as requested
2018-03-07 11:46:14 -05:00
Marc Jauvin
5992688926
Save input modes when mode_on_change=='restore'
2018-03-07 11:43:17 -05:00
Florian Bruhin
8a60855b88
Fix lint
2018-03-06 21:44:37 +01:00
Florian Bruhin
e2cdb5c8cf
Allow empty vlaue for bindings.key_mappings
2018-03-06 21:43:07 +01:00
Florian Bruhin
0d94c17edc
Apply key_mappings to KeySequences correctly
...
Fixes #3678
2018-03-06 21:39:57 +01:00
Florian Bruhin
06bccfeb78
Improve error message for QtWebEngine inspector
2018-03-06 12:57:38 +01:00
Florian Bruhin
0236255a7e
Require a reload for more settings
2018-03-06 12:57:28 +01:00
Florian Bruhin
b6efe65891
Add input.spatial_navigation to needs_reload
...
See #3648
2018-03-06 11:33:36 +01:00
Florian Bruhin
69a58c9597
Remove Qt 5.8 support and tests
...
With QtWebKit it's probably okay to still use it (*cough* Hyperbola
GNU/Linux-libre^tm *cough*), and only blacklisting it with QtWebEngine would be
quite some effort.
Fixes #3608
2018-03-06 11:04:59 +01:00
Florian Bruhin
e3b8372b8b
Make UrlPattern._DEFAULT_PORT private
2018-03-06 10:34:02 +01:00
Florian Bruhin
257753841b
Allow lightweight URL patterns without a scheme
...
See #3622
2018-03-06 10:33:55 +01:00
Florian Bruhin
7fc53ae78a
Make path optional in URL patterns
...
See #3622
2018-03-06 09:45:06 +01:00
Florian Bruhin
8c0bca90d3
Merge remote-tracking branch 'origin/pr/3456'
2018-03-06 09:32:39 +01:00
Florian Bruhin
513bb381d3
Merge remote-tracking branch 'origin/pr/3676'
2018-03-06 07:46:46 +01:00
Florian Bruhin
0a75c5a302
Make sure options in needs_reload are valid
2018-03-06 07:44:20 +01:00
Florian Bruhin
afd5d2c728
Reload page after content.javascript.can_access_keyboard changed
...
See #3648
2018-03-06 07:41:35 +01:00
Florian Bruhin
c9cd47b5b1
Also clear favicons when possible with QtWebEngine
...
See #3469
2018-03-06 07:38:01 +01:00
Florian Bruhin
41dfa29648
Improve parsing of invalid keys
...
This should handle "<>" and "\x1f" correctly.
2018-03-06 06:29:38 +01:00
Olmo Kramer
8a193e2dc5
Add hints to <summary> elements
2018-03-06 03:46:40 +01:00
Florian Bruhin
2b84ea9dbe
Make sure we have plain keys/modifiers where needed
2018-03-05 23:01:24 +01:00
Florian Bruhin
78f6ad14c2
Use Qt.KeyboardModifierMask
2018-03-05 22:33:16 +01:00
Florian Bruhin
29fdd1acc4
Make sure all keyboard modifiers are handled correctly
...
This handles Qt.KeypadModifier (Num+...) correctly, adds tests for converting
modifiers to strings, and strips Qt.GroupSwitchModifier as QKeySequence doesn't
know about it.
Fixes #3675
2018-03-05 22:11:26 +01:00
Florian Bruhin
2ab270dfac
Also log modifiers for key presses
2018-03-05 19:32:21 +01:00
Florian Bruhin
9be26a8bfd
Merge remote-tracking branch 'origin/pr/3666'
2018-03-05 18:38:37 +01:00
Florian Bruhin
9320214429
Only clear favicons on load with QtWebKit
...
QtWebEngine seems to automatically clear the favicon when loading e.g.
about:blank, and not clearing it there again fixes #3469 .
Original issue: #187
2018-03-05 18:29:01 +01:00
Florian Bruhin
43cab4d978
Add bindings to toggle plugins
...
See #3622
2018-03-05 18:20:06 +01:00
Florian Bruhin
4da8af0e1d
Fix preloading resources on Windows
...
We always pass paths like javascript/scroll.js no matter what the underlying OS
is, so we also need to cache it with a / separator.
2018-03-05 18:08:51 +01:00
Florian Bruhin
a796d1f33f
Always enable JavaScript for file://, chrome:// and qute://
...
See #3622
2018-03-05 17:09:47 +01:00
Florian Bruhin
430d69f278
Fix lint
2018-03-05 16:43:01 +01:00
Florian Bruhin
a1b73fc113
Elide long URLs in acceptNavigationRequest logging
2018-03-05 16:42:14 +01:00
gammelon
a730290d40
Use QUrl for parsing, add tests
2018-03-05 16:32:41 +01:00
Florian Bruhin
d1854eddaf
Handle invalid keys coming from Qt
...
When pressing a key which doesn't exist as Qt.Key, we don't get Qt.Key_unknown
like we'd expect, but we get 0x0 instead...
Let's add that as a new "nil" key (to not conflict with None/unknown/zero/...)
and handle it appropriately.
This can be reproduced by doing:
setxkbmap -layout us,gr -option grp:alt_shift_toggle
and pressing Alt-Shift/Shift-Alt.
2018-03-05 15:42:52 +01:00
Florian Bruhin
3275681afd
Show key when the key string is empty
2018-03-05 12:45:13 +01:00
Florian Bruhin
b4a2352833
Cache HTML/JS resource files when starting
...
This mostly reverts 9edc5a665e
(see #1362 ).
Fixes #1943
2018-03-05 09:08:06 +01:00
Florian Bruhin
2a9d970641
Uninstall application proxy factory before exit
...
This should help with segfaults on exit.
Fixes #3657
2018-03-05 07:39:36 +01:00
Florian Bruhin
274f2a9d19
Rename eventFilter methods in modeman
2018-03-05 06:36:01 +01:00
Florian Bruhin
e01db79ce9
Filter out ShortcutOverride events properly
...
Fixes #3419
2018-03-05 06:32:54 +01:00
Florian Bruhin
4ef5db1bc4
Disallow numbers in keybindings
...
Fixes #1966
2018-03-04 23:17:51 +01:00
Florian Bruhin
155a1901c0
Merge branch 'keys'
2018-03-04 22:50:41 +01:00
Florian Bruhin
e2f17c4be1
Always prefer exact over partial matches
2018-03-04 21:45:46 +01:00
Florian Bruhin
40c3295cd1
Improve logging message for clear_keystring
2018-03-04 21:32:42 +01:00
Florian Bruhin
f2fadd7add
Fix handling of key_mappings
2018-03-04 21:32:28 +01:00
Florian Bruhin
0967b6abd2
Fix handling of </> keys
2018-03-04 20:40:16 +01:00
Florian Bruhin
910bbc8521
Refactor keyutils._parse_keystring
2018-03-04 20:40:05 +01:00
Florian Bruhin
c9c0bc0bbd
Update docs
2018-03-04 20:28:46 +01:00
Florian Bruhin
d8bfe23c0d
Fix lint
2018-03-04 20:21:58 +01:00
Florian Bruhin
58b7599152
Remove old fixme
2018-03-04 20:21:58 +01:00
Florian Bruhin
2be7db29ed
100% coverage for keyinput.keyutils
2018-03-04 20:21:58 +01:00
Florian Bruhin
8da878c77c
Make KeySequence.matchs() work correctly
2018-03-04 20:21:58 +01:00
Florian Bruhin
68db8d04ad
KeySequence: Make sure we got valid key codes
2018-03-04 20:21:58 +01:00
Florian Bruhin
3649a36869
KeySequence: Add __le__/__ge__
2018-03-04 20:21:58 +01:00
Florian Bruhin
fb7c75a090
Improve keyutils tests
2018-03-04 20:21:58 +01:00
Florian Bruhin
3c9e8ff9ab
Test and fix keyutils._parse_keystring
2018-03-04 20:21:58 +01:00
Florian Bruhin
7f8508a367
Change the way Space keybindings are handled
...
Using it as " " in a keystring won't work anymore, but instead <Space> and
<Shift-Space> does.
2018-03-04 20:21:58 +01:00
Florian Bruhin
da60d11b24
Refactor keyutils tests
2018-03-04 20:21:58 +01:00
Florian Bruhin
b3834835ed
Bring back keyutils.is_modifier() and modifier handling
...
Turns out when we press yY, we get three events:
Qt.Key_Y, Qt.NoModifier
Qt.Key_Shift, Qt.ShiftModifier
Qt.Key_Y, Qt.ShiftModifier
If we don't ignore the second one, our keychain will be interrupted by the Shift
keypress.
2018-03-04 20:21:58 +01:00
Florian Bruhin
3a11a24be0
Fix modifier handling
...
We don't want to show <Shift-Shift>, but <Ctrl-Shift> should still work
correctly.
2018-03-04 20:21:58 +01:00
Florian Bruhin
7cb781cc92
Simplify handling of modifier-only keys
...
Now that we don't rely on str(KeyInfo) being empty anywhere, there's no reason
to return an empty string for only-modifier keypresses anymore.
While those keys can't be bound (QKeySequence('Shift') == Qt.Key_unknown)
there's also no reason to explicitly ignore them.
2018-03-04 20:21:57 +01:00
Florian Bruhin
693178c8ee
Refactor KeyInfo.__str__
...
This removes the special handling for macOS, but this is hopefully not needed
anymore as we don't compare strings.
2018-03-04 20:21:57 +01:00
Florian Bruhin
50d2ef3b90
Fix handling of printable control keys in KeyInfo.text()
2018-03-04 20:21:57 +01:00
Florian Bruhin
934d586286
Fix handling of Shift-Tab aka. Backtab
2018-03-04 20:21:57 +01:00
Florian Bruhin
65a05f334e
Fix KeyInfo.__str__ for <Shift-Tab>
2018-03-04 20:21:57 +01:00
Florian Bruhin
0aa17bfa33
Simplify unicodedata.category calls
2018-03-04 20:21:57 +01:00
Florian Bruhin
e26eaaddc2
Add keyutils.is_modifier_key()
2018-03-04 20:21:57 +01:00
Florian Bruhin
1cd86d79d9
Add keyutils.is_printable()
2018-03-04 20:21:57 +01:00
Florian Bruhin
b4d232badd
Simplify KeyInfo.text()
2018-03-04 20:20:31 +01:00
Florian Bruhin
0b6d2c2b0a
Make all key names work
2018-03-04 20:20:30 +01:00