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
Florian Bruhin
601e56d2fa
Make test_keyutils work
2018-03-04 20:20:30 +01:00
Florian Bruhin
19512e988b
Expose less from keyutils publicly
2018-03-04 20:20:30 +01:00
Florian Bruhin
880da2d143
Add missing default=True for configmodel.bind
2018-03-04 20:20:30 +01:00
Florian Bruhin
2ed480b40a
Refactor configmodel.bind
2018-03-04 20:20:30 +01:00
Florian Bruhin
c3485821c7
Adjust copyright
2018-03-04 20:20:30 +01:00
Jimmy
6d415b6653
Greasemonkey: don't inject JS into dead frames
...
Hopefully closes #3627
This feels like fixing the symptom instead of the problem but I am not
sure how such a situation would arise. Never the less, the crash logs
clearly show that `_inject_userjs()` is being called with a deleted
frame sometimes. It is being called from a closure that gets triggered
on frame.loadFinished so I am not sure how frame could be deleted at
that time unless:
* the error message is misleading and it is actually some reference to
the object that is no longer valid
* the frame gets deleted from some other handler of loadFinished.
2018-03-03 15:10:44 +13:00
Jimmy
0adda22d3c
Greasemonkey: add a way to register scripts directly.
...
Previously to add a greasemonkey script you had to write it to the
greasemonkey data directory and call load_scripts(). Now you can just
make a new GreasemonkeyScript and pass it to add_script(), yay.
There are no users of the method yet although I could have used it while
writing the tests.
2018-03-03 15:02:43 +13:00
Jimmy
7dab8335e2
Greasemonkey: handle downloads that complete fast
...
When `@require`ing local files (with the `file://` scheme) the
greasemonkey manager was not catching the DownloadItem.finished signal
because it was being emitted before it had managed to connect.
I didn't see this happening while testing with files that should have
been in cache but I wouldn't be surprised.
I had to change the download mock to be able to give it the appearance
of asynchronicity. Now when using it one must set download.successful
appropriately before firing download.finished. I also added a list of
downloads to the stub so a test could enumerate them in case the
unit-under-test didn't have a reference to them.
2018-03-03 15:02:43 +13:00
Jimmy
87a0c2a7a7
Greasemonkey: indent source of required scripts
...
This is for the case where a script uses `@require` to pull down another
greasemonkey script. Since QWebEngineScript doesn't support `@require`
we pass scripts to it with any required ones pre-pended. To avoid
QWebEngineScript parsing the first metadata block, the one from the
required script, we indent the whole lot. Because the greasemonkey spec
says that the //==UserScript== text must start in the first column.
2018-03-03 15:02:42 +13:00
Jimmy
60e6d28eb1
Greasemonkey: webkit: Don't use Object.entries in js.
...
Apparently the currently available QtWebkit's javascript engine doesn't
support Object.entries[1]. It was only using that because I had copied
it from the official gm4 polyfill (maybe I should open an issue there?).
Tested with libqt5webkit5 version 5.212.0~alpha2-5 (debian) and I was
getting the same type of failures as Travis so it looks like this is the
case in arch too.
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
2018-03-03 15:02:42 +13:00
Jimmy
2307a0850f
Greasemonkey: Support greasemonkey-reload --force.
...
Added a new argument to the greasemonkey-reload command to support
also re-downloading any `@required` scripts.
2018-03-03 13:14:49 +13:00
Jimmy
b91e2e3267
Allow download manager to overwrite existing files unprompted.
...
This is to support the non-interactive use case of setting a
`FileDownloadTarget` and passing auto_remove and not caring if the target
file exists or not.
An alternative to adding the attribute to `FileDownloadTarget` and
having set_target pull it out would be to add a new param to `fetch()`
and `set_target()`. But it would only be used for one target type
anyway.
2018-03-03 13:14:49 +13:00
Jimmy
a7b74d8e83
Greasemonkey: give required scripts a readable filename.
2018-03-03 13:14:49 +13:00
Jimmy
33d66676c9
Greasemonkey: mock the new GM4 promises based API.
...
Based on the gm4-polyfill.js script from the greasemonkey devs. But not
the same because that script doesn't work for us for a couple of
reasons:
* It assumes all GM_* functions are attributes of `this` which in
this case is the global window object. Which breaks it out of our iife.
It is possible to change what `this` is within the iife but then we
would have to do something weird to ensure the functions were available
with the leading `this.`. And I don't think user javascripts tend to
call GM functions like that anyway, that polyfill script is just making
weird assumptions and then claiming it'll work for "any user script
engine".
* It tries to provide implementations of GM_registerMenuCommand and
GM_getResource text which do unexpected thins or implement a circular
dependency on the new version, respectively.
2018-03-03 13:14:49 +13:00
Jimmy
a76c0067e1
Greasemonkey: Add support for the @require rule.
...
The greasemonkey spec states that user scripts should be able to put the URL
of a javascript source as the value of an `@require` key and expect to have
that script available in its scope. This commit supports deferring a user
script from being available until it's required scripts are downloaded,
downloading the scripts and prepending them onto the userscripts code before
placing it all in an iffe.
TODO:
* should I be saving the scripts somewhere else? Maybe the cache dir?
The are just going to data/greasemonkey/requires/ atm.
2018-03-03 13:14:49 +13:00
Florian Bruhin
6fc560fc78
Rewrite comment
2018-03-02 06:31:23 +01:00
Florian Bruhin
fb7fa0cb49
Merge remote-tracking branch 'origin/pr/3652'
2018-03-02 06:31:00 +01:00
Florian Bruhin
52129f2e4d
Merge remote-tracking branch 'origin/pr/3659'
2018-03-02 06:30:52 +01:00
Ryan Roden-Corrent
d5e30fd728
Don't crash first completion update with min_chars.
...
When min_chars is nonzero, if the first command that opens the
completion has < min_chars on the word under the cursor, it triggers a
check for a condition where last_cursor_pos is None.
By setting last_cursor_pos=-1 we ensure that the completer always
updates the first time it is opened, and that there is never a check
against None.
This adds a test for the min_chars feature.
Resolves #3635 .
2018-03-01 22:07:53 -05:00
Jay Kamat
a2b5bf0b73
Clear old search results on webkit
...
Fixes an issue with #3626
2018-03-01 16:15:38 -05:00
Ryan Roden-Corrent
2965f954ba
Resolve empty completion.timestamp_format crash.
...
Resolves #3628 .
2018-03-01 07:54:20 -05:00
Florian Bruhin
f33d659924
Release v1.1.2
2018-03-01 09:15:54 +01:00
Markus Ongyerth
f7bcdfc818
Add --pygment argument to view-source
...
The --pygment argument allows to use the pygment version of view-source
over the qtwebengine internal one.
This version is slightly different in what's processed before the site
is generated, so some javascript created texts can be available.
2018-02-28 16:53:28 +01:00
Florian Bruhin
8ea6cf352b
Remove unneeded version check
...
The option isn't going to magically change as the config system prevents that.
2018-02-28 08:08:47 +01:00
Florian Bruhin
824825e67d
Make sure we only show dictionary warnings once
...
After 3956f81e73
where this was made a function,
the warning was shown twice, causing AppVeyor to fail.
2018-02-28 08:01:11 +01:00
Florian Bruhin
e6aa6b8235
Add missing docs for {url:host}
2018-02-27 17:29:36 +01:00
Florian Bruhin
60f0175a36
Fix getting customized options
...
This was broken with per-domain settings
Fixes #3649
2018-02-27 15:39:57 +01:00
Florian Bruhin
5a5873d4ee
Rename KeyConfig._prepare to ._validate
2018-02-27 14:16:41 +01:00
Florian Bruhin
b85fe8f678
Merge BaseKeyParser._handle_key into .handle
2018-02-27 14:08:38 +01:00
Florian Bruhin
3a79f1293f
Remove FIXMEs
2018-02-27 13:10:25 +01:00
Florian Bruhin
244590f49d
Handle unknown keys with :bind/:unbind
2018-02-27 13:09:48 +01:00
Florian Bruhin
7a27469ecd
Handle unknown keys in :bind completion
2018-02-27 13:02:32 +01:00
Florian Bruhin
8090d3e289
Handle invalid keys in config.py
2018-02-27 13:02:32 +01:00
Florian Bruhin
898f5c50c4
Add a test for utils.chunk
2018-02-27 13:02:32 +01:00
Florian Bruhin
bd87b4eb10
Stop logging in PassthroughKeyParser
2018-02-27 13:02:32 +01:00
Florian Bruhin
ec3ad8a969
Get rid of _warn_on_keychains and _supports_chains
2018-02-27 13:02:32 +01:00
Florian Bruhin
ba012c6ba8
Get rid of BaseKeyparser.Type
2018-02-27 13:01:41 +01:00
Florian Bruhin
72e30cc12c
Fix following hints
2018-02-27 09:47:06 +01:00
Florian Bruhin
079fcc7eea
Add FIXME
2018-02-27 09:38:40 +01:00
Florian Bruhin
362f923f06
Fix lint
2018-02-27 09:34:55 +01:00
Florian Bruhin
f18b5aa782
Fix searching for blacklisted keys in keyhintwidget
2018-02-27 09:23:06 +01:00
Florian Bruhin
5d581d42f5
Improve key parsing with simple keys containing </>
2018-02-27 09:22:11 +01:00
Florian Bruhin
911b2daebf
Fix test_keyutils
2018-02-27 09:07:20 +01:00
Florian Bruhin
eeeb763f8a
Make sure 0 is handled as command
2018-02-27 08:50:50 +01:00
Florian Bruhin
9e27f2b3e7
Initial attempts at fixing test_basekeyparser
2018-02-27 08:48:16 +01:00
Florian Bruhin
44b4cb92be
Make keyutils.KeySequence.parse('') work
2018-02-27 08:35:14 +01:00
Florian Bruhin
ac4fd7c563
Add KeyInfo.to_event()
2018-02-27 08:20:06 +01:00
Florian Bruhin
f40f4082ba
Validate configtypes.Key correctly
2018-02-27 07:56:34 +01:00
Florian Bruhin
e8d5fb5cca
Normalize keybinding with :bind
2018-02-27 07:51:14 +01:00
Florian Bruhin
b1f4b1eaba
Fix :unbind with already bound keys
...
The previous change was incorrect and caused a regression (test_unbound_twice)
2018-02-27 07:40:54 +01:00
Florian Bruhin
1b0aea5e05
Bring simple bindings to front in get_reverse_bindings_for
2018-02-27 06:56:57 +01:00
Florian Bruhin
53fb5af99c
Paste version information privately
2018-02-26 23:09:55 +01:00
Florian Bruhin
01462008c9
Clearly separate yesno/prompt key modes
2018-02-26 22:49:15 +01:00
Florian Bruhin
d9ae3fd5aa
Fix more hinting issues
2018-02-26 20:49:02 +01:00
Florian Bruhin
de3b4adfd8
Don't force-follow hints when typing chars
2018-02-26 20:48:49 +01:00
Florian Bruhin
6fc391986f
Fix KeyInfo.text() for space
2018-02-26 20:48:22 +01:00
Florian Bruhin
e9d58dae2a
Fix getting individual items from KeySequence
2018-02-26 20:48:11 +01:00
Florian Bruhin
9f0e1a98a0
Make hint keybinding inhibition work
2018-02-26 20:22:52 +01:00
Florian Bruhin
f1b20f6dc4
Fix forward_unbound_keys test
2018-02-26 20:02:43 +01:00
Florian Bruhin
bb647123b7
Fix invalid key sequences
2018-02-26 14:13:46 +01:00
Florian Bruhin
2698b8bb63
Fix unicodedata check
2018-02-26 13:47:45 +01:00
Florian Bruhin
f15e2285ba
Fix bindings.key_mappings
2018-02-26 13:41:01 +01:00
Florian Bruhin
0afaf2ce89
Fix capital chars after string change
2018-02-26 11:48:10 +01:00
Florian Bruhin
508a12a84c
Try fixing KeyInfo.__str__ with lower-/uppercase chars
2018-02-26 11:36:24 +01:00
Florian Bruhin
1609e0d445
Fix keyhint widget
2018-02-26 11:16:56 +01:00
Florian Bruhin
16940db834
Refactor KeySequence initialization
2018-02-26 11:16:51 +01:00
Florian Bruhin
f92bb16408
Make config.bind work
2018-02-26 10:38:59 +01:00
Florian Bruhin
9aa37febbe
Make hints work
2018-02-26 10:33:18 +01:00
Florian Bruhin
be4cd94207
Try getting hints to work
2018-02-26 10:14:30 +01:00
Florian Bruhin
d077f38ac4
Store multiple QKeySequences in KeySequence
2018-02-26 09:13:53 +01:00
Florian Bruhin
79a337767a
Initial work at making :fake-key work
2018-02-26 09:13:44 +01:00
Florian Bruhin
353753c03c
Merge remote-tracking branch 'origin/pr/3620'
2018-02-26 07:26:24 +01:00
Florian Bruhin
de0aa32c11
Merge remote-tracking branch 'origin/pr/3626'
2018-02-26 07:20:34 +01:00
Florian Bruhin
bd79d7e071
Merge remote-tracking branch 'origin/pr/3637'
2018-02-26 07:16:19 +01:00
Jay Kamat
76bf35cbdd
Add qtbug60673 markers to relevant tests
2018-02-25 19:00:15 -05:00
Jay Kamat
7a8fa5f46e
Implement deduplication of searches on webkit
2018-02-25 18:40:16 -05:00
Florian Bruhin
e273f163a6
Add a KeyInfo class
2018-02-25 22:09:39 +01:00
Anton S
eeb565319f
Handle invalid URLs on Apple events
2018-02-25 23:58:49 +03:00
Florian Bruhin
321d5c5d20
Merge branch 'master' into keys
2018-02-25 21:25:12 +01:00
Florian Bruhin
54713f57e5
Merge remote-tracking branch 'origin/pr/3624'
2018-02-25 21:09:56 +01:00
Florian Bruhin
52b5492c6a
Merge branch 'per-url'
2018-02-25 19:44:51 +01:00
Florian Bruhin
4c147b77c1
Add a test for the error page workaround
2018-02-25 16:35:02 +01:00
Florian Bruhin
a32d74e983
Fix lint
2018-02-25 16:08:15 +01:00
Florian Bruhin
d44ff5ba01
Don't load the URL immediately on :undo
...
On some pages like Qt's Gerrit, Indiegogo or Telegram Web, this caused a crash
with QtWebEngine and Qt 5.10.1 in
QtWebEngineCore::WebContentsAdapter::webContents().
I'm not sure what causes the crash exactly, but I'm guessing it's some kind of
race condition between loading the URL initially and deserializing the history,
which both ends up loading the URL.
Since restoring the history means we end up on the given URL anyways, let's just
not open the URL beforehand, which seems to fix this.
Fixes #3619 .
2018-02-25 15:55:20 +01:00
Florian Bruhin
97e00ba4b5
Only reload after setting changes when needed
...
Apparently, things work fine with Type.link_clicked even if we don't emit
predicted_navigation there...
2018-02-25 15:17:03 +01:00
Florian Bruhin
eade305965
Add a predicted_navigation signal
...
This is emitted when we know that we're going to visit some URL, but Qt doesn't
know yet. This way, we can change the settings early, and since we know which
settings have actually changed, prevent a change needing a reload in
_on_navigation_request.
2018-02-25 15:04:04 +01:00
Florian Bruhin
65a62b67a5
Go back to using tab.openurl on config changes
...
This seems to work most reliably at the moment...
2018-02-25 14:45:30 +01:00
Florian Bruhin
638e880604
Improve workaround for missing error pages
2018-02-25 14:45:30 +01:00
Florian Bruhin
bfb3a6594f
Try using tab.reload() on setting changes instead
2018-02-25 14:45:19 +01:00
Florian Bruhin
08bc55995b
First attempt at reloading pages after setting changes
2018-02-25 14:45:09 +01:00
Jay Kamat
4602afe770
Add a webengine duplicate search test
2018-02-23 18:13:20 -05:00
Jay Kamat
f926e7b850
Emulate webkit duplicate search behavior on webengine
2018-02-23 18:06:21 -05:00
Florian Bruhin
2c96446bb9
Track which settings changed for a URL
...
This is currently only used so only changed settings are logged, but will used
for more in the next commit.
2018-02-23 18:11:33 +01:00
Florian Bruhin
75b65e2f11
Simplify attribute handling in Web(Kit|Engine)Settings
...
Let's just have lists in _ATTRIBUTES for WebEngineSettings as well, that allows
us to share some more code.
2018-02-23 17:59:12 +01:00
Florian Bruhin
fc6a0dbe64
Show a simple error page on loading errors without JS
...
We can't tell what exactly the error is, but it's surely better than nothing.
2018-02-23 17:29:17 +01:00
Florian Bruhin
3956f81e73
Refactor websettings
...
This refactors the whole web(kit|engine|) settings mess a bit so there's a
Web(Kit|Engine)Settings object for (non-static) settings set on a
QWeb(Engine)Settings object in Qt. Everything else is set on module-level a bit
less declaratively.
The whole inheritance mess is gone, and we can now also construct a
Web(Kit|Engine)Settings object for a given tab.
Fixes #2701
2018-02-23 09:51:28 +01:00
Jay Kamat
7ecbae765d
Use baseNode over anchorNode in follow-selected
...
baseNode isn't documented anywhere that I can find, but it seems to be
getting us what anchorNode used to get us.
2018-02-22 16:42:58 -05:00
Florian Bruhin
eb4c806ddb
Add URL pattern to settings output
2018-02-22 08:07:54 +01:00
Florian Bruhin
5c4277aac8
Add some default keybindings for toggling scripts
...
Those follow the following pattern:
1) "t" for 'toggle"
2) "s" for "scripts", upper-casing ("S") to make the toggle permanent
3) "h" for host, "H" for host with subdomains, "u" for the exact URL
2018-02-22 08:07:54 +01:00
Jay Kamat
2ffb1604d3
Convert search to blue selection when entering caret mode
2018-02-21 10:01:27 -05:00
Florian Bruhin
2fbc7b4e1d
Merge remote-tracking branch 'origin/pr/3594'
2018-02-21 10:15:27 +01:00
Florian Bruhin
8b09003bd1
Merge remote-tracking branch 'origin/pr/3592'
2018-02-21 10:13:26 +01:00
Florian Bruhin
ecfd4a77a0
Merge remote-tracking branch 'origin/pr/3562'
2018-02-21 10:11:40 +01:00
Florian Bruhin
cfeeb7460b
Add docstrings to ConfigAPI
2018-02-21 09:14:49 +01:00
Florian Bruhin
0d4e20c395
Whitelist config options which support URL patterns
2018-02-20 23:26:22 +01:00
Florian Bruhin
5fbd488fdf
Only change settings for main-frame navigations
2018-02-20 22:45:29 +01:00
Florian Bruhin
18848315f5
urlmatch: Make it possible to leave off trailing slash
2018-02-20 22:45:16 +01:00
Florian Bruhin
17b235b523
Add error handling for parsing patterns from YAML
2018-02-20 22:29:21 +01:00
Florian Bruhin
439d51875f
Add config.pattern()
2018-02-20 20:54:26 +01:00
Florian Bruhin
3ade923edb
Add basic pattern support for config.py
2018-02-20 18:43:42 +01:00
gammelon
16218a9900
Remove unnecessary try, rephrase to imperative mood
2018-02-20 18:11:50 +01:00
Florian Bruhin
a3dfec20c1
Rename --url to --pattern
2018-02-20 17:56:47 +01:00
Florian Bruhin
9685445559
Fix issues with Python 3.5
2018-02-20 17:56:47 +01:00
Florian Bruhin
e482c76874
YamlConfig: Refuse to read a newer config version
2018-02-20 17:08:28 +01:00
Florian Bruhin
03114ccf51
Migrate YAML config files in old format
2018-02-20 16:14:06 +01:00
Florian Bruhin
b3d788fead
Add YamlConfig._pop_object
2018-02-20 15:46:05 +01:00
Florian Bruhin
f2bba2e4fa
Fix navigation handling
2018-02-20 12:30:41 +01:00
Florian Bruhin
d511c5436d
Remove dead config code
2018-02-20 12:30:34 +01:00
Florian Bruhin
19c00ff92a
configutils: Clean up comments
2018-02-20 12:30:34 +01:00
Florian Bruhin
63c77a4d76
urlmatch: Fix equality with non-UrlPattern types
2018-02-20 12:30:34 +01:00
Florian Bruhin
685e3ffcfe
Fix and test UrlPattern/configutils.Values stringification
2018-02-20 12:30:34 +01:00
Florian Bruhin
50c847562f
configutils.Values: Make it possible to pass values
2018-02-20 12:30:34 +01:00
Florian Bruhin
ab02fcb116
configutils.Values: Add __repr__
2018-02-20 12:30:34 +01:00
Florian Bruhin
1ada821092
Make sure config options exist
2018-02-19 22:09:54 +01:00
Florian Bruhin
cea664e396
Don't emit changed in unset if unneeded
2018-02-19 22:09:54 +01:00
Florian Bruhin
ab119975e7
Only emit changed in unset if there was a change
2018-02-19 22:09:46 +01:00
Florian Bruhin
8fead148e2
Add FIXME
2018-02-19 22:09:46 +01:00
Florian Bruhin
1409f4e564
Fix migration of tabs.persist_mode_on_change
2018-02-19 22:09:46 +01:00
Florian Bruhin
19148a4593
Fix :config-unset
2018-02-19 22:09:46 +01:00
Florian Bruhin
615c6ffe5a
Make :config-write-py work again
2018-02-19 22:09:46 +01:00
Florian Bruhin
0f907b1a77
Fix getting YAML values in test_configcommands.py
2018-02-19 22:09:46 +01:00
Florian Bruhin
75181e16fa
Fix test_models.py
...
The Config object got initialized via the config_stub fixture early, so we need
to force it to re-init its values after patching configdata.DATA.
2018-02-19 22:09:46 +01:00
Florian Bruhin
c89e804653
Fix handling of invalid types in YamlConfig
2018-02-19 22:08:42 +01:00
Florian Bruhin
87e329aee3
Fix config.dump_userconfig() with defaults
2018-02-19 22:08:42 +01:00
Florian Bruhin
f43c7fa360
Fix changing values in configutils.Values
2018-02-19 22:08:42 +01:00
Florian Bruhin
cb631d532a
Fix getting global value from configutils.Values
2018-02-19 22:08:42 +01:00
Florian Bruhin
8b666d2d2e
Try to update settings in acceptNavigationRequest
...
This still doesn't seem to update them early enough?
2018-02-19 22:08:42 +01:00
Florian Bruhin
bd6e99158e
Get rid of the second deepcopy for config values
...
There were two reasons why we deepcopy mutable objects in the config:
1) So mutations don't mess with our internal/default values.
2) So we can detect mutations and update the config.
If we're going to copy the value for 1) in maybe_copy(), we know the original
value is not going to be mutated, so we can use that directly for self._mutables
instead of making another copy.
2018-02-19 22:07:53 +01:00
Florian Bruhin
93972ff3f1
Copy value before watching it for mutations in config
...
If we copy it afterwards, we are going to mutate the copied object.
2018-02-19 22:07:53 +01:00
Florian Bruhin
ddb914dc65
Refactor YAML init
2018-02-19 22:07:53 +01:00
Florian Bruhin
8504ad6ff3
Change how iterating over Config/YamlConfig works
2018-02-19 22:07:53 +01:00
Florian Bruhin
6abb42a066
Make saving in autoconfig.yml work
2018-02-19 22:07:53 +01:00
Florian Bruhin
4691753965
Avoid running change handlers on config.clear
2018-02-19 22:07:53 +01:00
Florian Bruhin
9c670e13ce
Make clearing config work
2018-02-19 22:07:53 +01:00
Florian Bruhin
a6b979539d
Add missing configutils.py
2018-02-19 22:07:53 +01:00
Florian Bruhin
14a69d9047
Fix lint
2018-02-19 22:07:53 +01:00
Florian Bruhin
7c1fb1d215
Refactor acceptNavigationRequest handling to use signals
2018-02-19 22:07:53 +01:00
Florian Bruhin
2a7998847f
Unset values properly
2018-02-19 22:07:53 +01:00
Florian Bruhin
74a7676111
Fix issues with per-domain proof-of-concept
2018-02-19 22:07:53 +01:00
Florian Bruhin
d09afdf0ee
Refactor handling of mutables with url/pattern in Config
...
This also should not copy stuff coming from the config if it's not needed.
2018-02-19 22:07:53 +01:00
Florian Bruhin
8551288efb
Start working on different per-URL storage
2018-02-19 22:07:53 +01:00
Florian Bruhin
5e50824042
Broken per-URL proof-of-concept
2018-02-19 22:07:53 +01:00
Florian Bruhin
4ed07d6062
Initial implementation of per-URL setting storage
2018-02-19 22:07:53 +01:00
Florian Bruhin
894da598d6
urlmatch: Remove dead code
2018-02-19 22:07:53 +01:00
Florian Bruhin
eda15c53ad
urlmatch: Improve port error output
2018-02-19 22:07:53 +01:00
bttner
e169e2165d
Refactor TabbedBrowser from inheritance to composition
2018-02-19 14:29:05 +01:00
gammelon
42ac3dcda0
Add Option url.open_base_url
...
when set to true, invoking a searchengine shortcut without argument
opens the baseurl of that searchengine instead of DEFAULT searchengine
2018-02-17 11:21:22 +01:00
Marc Jauvin
872cff2ae1
make sure tab is not None either, had a crash because of this
2018-02-16 14:03:11 -05:00
Florian Bruhin
174dd5dd9e
urlmatch: Remove performance FIXME
2018-02-15 18:47:07 +01:00
Florian Bruhin
41b7ac27d7
urlmatch: Postpone checking scheme
2018-02-15 18:47:07 +01:00
Florian Bruhin
5627a63265
urlmatch: Fix lint
2018-02-15 18:47:07 +01:00
Florian Bruhin
33b7c4bdd0
urlmatch: Fix and test port handling
2018-02-15 18:47:07 +01:00
Florian Bruhin
45cc1aaeb0
urlmatch: Add tests for file://
2018-02-15 18:47:07 +01:00
Florian Bruhin
a2836ba945
urlmatch: Make sure URLs are valid
2018-02-15 18:47:07 +01:00
Florian Bruhin
084d3de65b
urlmatch: Add support for data: and javascript:
2018-02-15 18:47:07 +01:00
Florian Bruhin
dae164abee
urlmatch: Get rid of scheme whitelist
...
There are more schemes like data: or javascript:, and we don't want to restrict
schemes anyways.
2018-02-15 18:47:03 +01:00
Florian Bruhin
867f2a8e2b
urlmatch: Use None for match-all path
2018-02-15 18:47:03 +01:00
Florian Bruhin
8fd0690959
urlmatch: Fix handling of *:// as scheme
2018-02-15 18:47:03 +01:00
Florian Bruhin
978b90b5b1
urlmatch: Implement correct IP matching
2018-02-15 18:47:03 +01:00
Florian Bruhin
2d43a1d2e7
urlmatch: Use None as default for host
2018-02-15 18:47:03 +01:00
Florian Bruhin
9092c3a87f
urlmatch: Increase debuggability
2018-02-15 18:47:03 +01:00
Florian Bruhin
a8a976b324
urlmatch: Simplify/fix matching by using None as sentinel
2018-02-15 18:47:03 +01:00
Florian Bruhin
2b274f8e0b
urlmatch: Implement initial matching
2018-02-15 18:47:02 +01:00
Florian Bruhin
3d6cbcf396
urlmatch: Improve matching error for TLD wildcards
2018-02-15 18:47:02 +01:00
Florian Bruhin
fa329c698e
urlmatch: Finish port parsing
2018-02-15 18:47:02 +01:00
Florian Bruhin
a2a95f5fee
urlmatch: Improve port handling
2018-02-15 18:47:02 +01:00
Florian Bruhin
d266190518
urlmatch: Improve port tests
2018-02-15 18:47:02 +01:00
Florian Bruhin
c728d78bea
urlmatch: Host/port parsing
2018-02-15 18:47:02 +01:00
Florian Bruhin
32abb67d1f
urlmatch: Use dedicated ParseError exception
2018-02-15 18:47:02 +01:00
Florian Bruhin
3c17bb97c0
urlmatch: Start with port parsing
2018-02-15 18:47:02 +01:00
Florian Bruhin
1b8dfb6c36
urlmatch: Disallow NUL byte
...
See https://bugs.chromium.org/p/chromium/issues/detail?id=390624
With Qt, we might run into the same issue as well at some point, and it sure
can't hurt to disallow it.
2018-02-15 18:46:58 +01:00
Florian Bruhin
76efba296f
urlmatch: Store path/port
2018-02-15 18:46:55 +01:00
Florian Bruhin
b93c0dad5a
urlmatch: Start UrlPattern
2018-02-15 18:46:51 +01:00
Marc Jauvin
620a966d1e
add debug logs and adjust tests to use them
2018-02-14 09:58:23 -05:00
Marc Jauvin
b791dd3eb4
no restore while in prompt modes on tab change
2018-02-14 09:44:40 -05:00
Marc Jauvin
8a3049f09b
make sure there IS a current widget before using it
2018-02-14 08:33:32 -05:00
Jay Kamat
6eeacfe82b
Fix caret being cleared when leaving any mode
2018-02-13 09:27:15 -05:00
George Edward Bulmer
942dca3444
Add test for pastebin_version()
2018-02-13 13:31:27 +00:00
Florian Bruhin
9bf5ff1583
Merge remote-tracking branch 'origin/pr/3584'
2018-02-13 09:43:44 +01:00
Florian Bruhin
0e87c46849
Remove unused win_id argument
2018-02-13 09:43:21 +01:00
Marc Jauvin
fbb78f1133
hook into modeman's entered and left signals
...
- save previous mode when a prompt is shown
- restore previous mode when finished prompting
2018-02-12 21:57:53 -05:00
Marc Jauvin
d04fc29163
save input_mode when entering/leaving mode
...
instead of when changing tab
2018-02-12 18:10:22 -05:00
Florian Bruhin
47451aa495
Open qute://tabs with :buffer
2018-02-12 23:00:26 +01:00
Florian Bruhin
9f163d90e1
Merge remote-tracking branch 'origin/pr/3450'
2018-02-12 22:54:43 +01:00
Simon Doppler
ca199b0d3d
Use separate variable to make pylint happy
2018-02-12 22:51:36 +01:00
Simon Doppler
7ae0d584e6
Add 20px margin above the raw list
2018-02-12 22:49:02 +01:00
Simon Doppler
0b047e3e10
Handle url with trailing slash and without
2018-02-12 22:48:41 +01:00
Simon Doppler
9a0c113f8a
Fix pylint line-too-long error
2018-02-12 22:25:21 +01:00
Florian Bruhin
1913012c8a
Merge remote-tracking branch 'origin/pr/3561'
2018-02-12 22:18:49 +01:00
Simon Doppler
572257921d
Use QUrl().toDisplayString() instead of url()
2018-02-12 16:12:15 +01:00
Simon Doppler
417200fa70
Use QUrl instead of str to compare
2018-02-12 16:06:17 +01:00
Simon Doppler
d6912be223
Update import order
2018-02-12 16:04:48 +01:00
Simon Doppler
ee57c30c53
Re-add the raw list (with fixed alignment)
2018-02-12 16:02:06 +01:00
Simon Doppler
0caa5d04d3
Use tabs directly
...
also ignore tabs page url in list
2018-02-12 15:50:56 +01:00
George Edward Bulmer
9397cc74c1
Pylint indentation fix
2018-02-12 14:24:53 +00:00
George Edward Bulmer
561e5d17b9
Remove extraneous space
2018-02-12 14:22:25 +00:00
Simon Doppler
71d33a47b3
Remove useless intermediary variables
2018-02-12 15:20:41 +01:00
Simon Doppler
ad50a7bfd2
Move import to external ressources
2018-02-12 15:20:06 +01:00
George Edward Bulmer
b59a7cdcc0
Report syntax errors as unhandled exceptions
...
Update tests accordingly
2018-02-12 14:07:05 +00:00
George Edward Bulmer
ce8b457bac
Only display exception type if no traceback
...
Update test to match
2018-02-12 13:43:22 +00:00
Marc Jauvin
68b12e6e9f
add missing lines
2018-02-12 07:31:02 -05:00
Marc Jauvin
0a9c0a1385
on_load_finished() signal handler for scroll-pos
...
remove get_page()
2018-02-12 07:16:01 -05:00
Marc Jauvin
a0e028a851
Update tab scroll position when finished loading.
...
Resolves #3322
2018-02-11 22:32:03 -05:00
George Edward Bulmer
164b2a3eef
Fix a lengthy line
2018-02-11 23:20:24 +00:00
George Edward Bulmer
72103ec730
Format error type in a different way
2018-02-11 23:16:04 +00:00
Ryan Roden-Corrent
4a8b23380c
Trigger save on bookmark-add --toggle.
...
The toggle option was failing to fire the changed signal when it removed
a bookmark. This means the bookmark file would not be marked as dirty,
and would not be saved on exit/autosave (unless another change was
made).
2018-02-11 16:33:00 -05:00
Simon Doppler
ddc41d2fa4
Remove raw list of open tabs
2018-02-11 22:15:14 +01:00