Florian Bruhin
b00c889dd1
Call _set_fileobj in AbstractDownloadItem.set_target
2016-11-08 20:33:25 +01:00
thuck
d8b5ca295e
Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab
2016-11-08 19:53:46 +01:00
Florian Bruhin
23e7b3f551
Elide js element debug string
2016-11-08 12:17:44 +01:00
Florian Bruhin
19d31ac201
Deduplicate "Focus object changed" logging
2016-11-08 12:17:44 +01:00
Florian Bruhin
57ee378ec5
Ignore None-socket in ipc.on_timeout
2016-11-08 12:17:44 +01:00
Florian Bruhin
f271081012
Handle None-tab in on_current_changed
2016-11-08 12:17:44 +01:00
Florian Bruhin
19c7d747dd
Fix downloads with unknown size with WebEngine
2016-11-08 09:18:10 +01:00
Florian Bruhin
ed3347365f
Fix lint
2016-11-08 09:18:10 +01:00
Florian Bruhin
54db4255b1
Fix handling of temporary files
...
When we use self._set_filename in self._set_fileobj, the file already
exists, so we need to force "overwriting" it.
Also, move temporary file handling to a dedicated _set_tempfile method,
so we can officially claim not supporting _set_fileobj with QtWebEngine
instead of supporting it with a hack.
2016-11-08 09:18:10 +01:00
Florian Bruhin
53e360ec4b
Always use a global QNAM for downloads
...
This makes a lot of code eaiser, and we don't have per-tab settings yet
anyways. Also, with QtWebEngine, we can't honour any per-tab settings
for downloads...
2016-11-08 09:18:09 +01:00
Florian Bruhin
bc1e4385e0
Fix first bunch of download tests
2016-11-08 09:18:09 +01:00
Florian Bruhin
ce1b675a1e
Implement :download/hints via QtNetwork
2016-11-08 09:18:09 +01:00
Florian Bruhin
5bc3914f24
Pass basename only as suggested filename
2016-11-08 09:18:09 +01:00
Florian Bruhin
fc6c6d4998
Fix lint
2016-11-08 09:16:47 +01:00
thuck
17b7b5c663
Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab
2016-11-08 08:13:15 +01:00
thuck
931b008f89
Update title when title-format-pinned is modified
2016-11-08 08:12:40 +01:00
thuck
4f0034911a
title-format-pinned initial work
...
Created configuration configdata.
Load and use template defined on configdata.
TODO: ability to conserve information between restart
TODO: ability to update title on configuration change
2016-11-08 07:56:13 +01:00
Florian Bruhin
39b3bfba93
Mention package names in pdfjs error
...
Closes #2095 .
2016-11-08 06:18:40 +01:00
thuck
b24ac0ae78
More small fixes
...
Removed unsed variables.
Removed some empty lines.
Inncluded docstring.
2016-11-08 04:45:07 +01:00
thuck
f9b1d998d4
Last configuration as pin changed to pinned
2016-11-07 22:32:42 +01:00
thuck
f10284b04a
Initial work on message.confirm_async
...
Creation of _tab_close and usage of partial.
2016-11-07 22:28:05 +01:00
thuck
ec50d39578
Some fixes for the pylint
2016-11-07 21:25:05 +01:00
thuck
4ed046d5e7
Everything is pinned instead of pin, and one if corrected
2016-11-07 21:12:34 +01:00
Cosmin Popescu
c590a37043
changed to using an internal _autosave session
2016-11-07 20:45:46 +01:00
thuck
20eae4d671
Modifed exception structure
2016-11-07 08:11:47 +01:00
thuck
f8dffb4e5c
Some modifications from initial feedback
...
Moved pin information from BrowserTab to TabData.
Changed attribute from pin to pinned.
Changed "ifs" to implicit check boolen value.
Removed blancked line on before else statement.
2016-11-07 08:02:25 +01:00
thuck
29d1c0d68b
Small fix for situations where we cannot find the tab for the index
...
Need to investigate better why and when this is excatly happening
2016-11-06 23:27:06 +01:00
thuck
d7a1a542b6
Change shortcut to tab-pin
2016-11-06 23:25:36 +01:00
thuck
d592651c50
Change command from pin/unpin to tab-pin
2016-11-06 23:24:24 +01:00
thuck
6d7a6db130
Proper title and size for pinned tab
...
As I'm using self.count() without taking in consideration the number of
pinned tabs the end result is a lot of empty space.
2016-11-06 19:04:32 +01:00
thuck
22133beb72
Fix small bug because result was not declared
2016-11-06 18:24:33 +01:00
thuck
6f610e9c44
Initial development to support pin tabs #926
...
Done so far:
Two new commands pin/unpin, both accept a index to help the organization
(maybe this should be more a flag and not exactly two commands)
Crtl+p to pin, Crtl+O to unpin (not sure which should a good default
shortcut)
If user tries to close a pinned tab it's asked to confirm
If user tries to open a URL in a pinned tab it receives a message with a
information that the tab is pinned and ignore the openurl command
Preserve the pinned information across restart if session is activated
Missing:
Visual indication of the tab being pinned
Tab appearance being distinct over other tabs
Make pinned tabs to be the firsts on the tab bar
This is not ready, but it would be good to get some feedback earlier
2016-11-06 15:52:23 +01:00
Florian Bruhin
690633bd87
Release v0.8.4
2016-11-06 00:47:53 +01:00
Florian Bruhin
f7cfb6afc3
Release v0.8.3
2016-11-05 23:08:28 +01:00
Florian Bruhin
b6195d4e77
Fix handling of typing.Union with newer Python 3.5 versions
2016-11-05 22:11:52 +01:00
Florian Bruhin
a5afdf6fb6
Handle QtWebEngine downloads in DownloadModel
2016-11-04 18:49:25 +01:00
Florian Bruhin
ea9796403f
Fix _ask_confirm_question
2016-11-04 18:49:25 +01:00
Florian Bruhin
bf994cd8da
Initial QtWebEngine download support
2016-11-04 18:49:24 +01:00
Florian Bruhin
c876c3d244
Fix lint
2016-11-04 18:49:24 +01:00
Florian Bruhin
a3a167e683
Split _die in two methods
...
We need to do some stuff before AbstractDownloadItem._die runs.
2016-11-04 18:49:24 +01:00
Florian Bruhin
6eef79e180
Adjust imports/objreg
2016-11-04 18:49:24 +01:00
Florian Bruhin
990985e60f
Rename browser.webkit.downloads to browser.qtnetworkdownloads
2016-11-04 18:49:24 +01:00
Florian Bruhin
e985730cbf
Simplify TempDownloadManager initialization
2016-11-04 18:49:24 +01:00
Florian Bruhin
7ca6996f39
Adjust imports
2016-11-04 18:49:24 +01:00
Florian Bruhin
0ac2b71304
Simplify how filename questions are handled
2016-11-04 18:49:24 +01:00
Florian Bruhin
3b51548d3a
More download splitting
2016-11-04 18:49:24 +01:00
Florian Bruhin
92b1bf2227
Get rid of win_id for DownloadItem
2016-11-04 18:49:24 +01:00
Florian Bruhin
12d798d54d
Continue download splitting
2016-11-04 18:49:24 +01:00
Florian Bruhin
5b04f1052f
Add DownloadItem.set_target
...
This allows us to make _set_fileobj private, and also makes some code
simpler.
2016-11-04 18:49:24 +01:00
Florian Bruhin
2c94efbf8a
First big download refactoring chunk
2016-11-04 18:49:24 +01:00
Florian Bruhin
352f83b95e
Rename DownloadItem.do_retry
2016-11-04 18:49:24 +01:00
Florian Bruhin
34b4dcf0d5
Make DownloadItem._retry_info private
2016-11-04 18:49:24 +01:00
Florian Bruhin
70e390a2e8
downloads: Simplify redirect handling
2016-11-04 18:49:24 +01:00
Florian Bruhin
7256641288
Prevent questions from being aborted twice
...
When we abort a question (e.g. by closing a tab with SSL errors) while
another prompt is queued, the right prompt gets closed by the question
being aborted, but that in turn aborts the question again, affecting the
next prompt.
2016-11-04 13:21:22 +01:00
Florian Bruhin
a16d41333b
Fix prompts while in command mode
2016-11-04 06:48:32 +01:00
Florian Bruhin
dd0ce8fe3b
Add some more prompt logging
2016-11-04 06:47:10 +01:00
Florian Bruhin
3a79faac16
Also hide existing prompts when showing a new one
...
Otherwise when a prompt is interrupted, we'd still see the older one.
2016-11-03 23:03:42 +01:00
Florian Bruhin
59b4ccc620
Rename max_height_padding
2016-11-03 09:29:27 +01:00
Florian Bruhin
a006ecffec
Add MainWindow._update_overlay_geometries()
2016-11-03 09:29:27 +01:00
Florian Bruhin
2b46228e3d
Customize prompt selection colors
...
Seems like if we make the foreground color configurable, the selection
isn't colored at all?!
2016-11-03 09:29:27 +01:00
Florian Bruhin
ebcae3a69c
Fix tabbing over .. in some directories on Windows
2016-11-03 08:40:42 +01:00
Florian Bruhin
0f03960525
Log if getting directory information failed
2016-11-03 08:40:42 +01:00
Florian Bruhin
732e7c260b
Handle empty path for file completion
...
This also allows us to select drives on Windows hopefully...
2016-11-03 08:40:42 +01:00
Florian Bruhin
cbf1a44b75
Fix handling of / as path
2016-11-03 08:40:42 +01:00
Florian Bruhin
16b3b7a262
Fix prompt positioning with top statusbar
2016-11-03 08:40:42 +01:00
Florian Bruhin
25bb720f09
Bound maximum size for prompts
2016-11-03 08:40:42 +01:00
Florian Bruhin
9cf5d645f0
Hide prompts correctly
...
We now make sure to hide prompts everywhere when the prompt mode was
left. We also make sure to hide the prompt widget before deleting, as it
might be deleted later.
2016-11-03 08:40:42 +01:00
Florian Bruhin
293a388ac6
Use HTML list for quit confirmation message
2016-11-03 08:40:42 +01:00
Florian Bruhin
fa1846ab0e
Adjust prompt path when backspacing a path
2016-11-03 08:40:42 +01:00
Florian Bruhin
60c6b7f0ab
Simplify FilenamePrompt._insert_text
2016-11-03 08:40:42 +01:00
Florian Bruhin
5b33978259
Improve comment
2016-11-03 08:40:42 +01:00
Florian Bruhin
4e793180c1
Fix completion in file prompts
2016-11-03 08:40:42 +01:00
Florian Bruhin
63c6381e18
Add blank line
2016-11-03 08:40:42 +01:00
Florian Bruhin
fdc4b2e2f6
Move setting FilenamePrompt lineedit text up
2016-11-03 08:40:42 +01:00
Florian Bruhin
7d1b1d354d
Remove duplicated docstrings
2016-11-03 08:40:42 +01:00
Florian Bruhin
14ecbc0cec
Use jinja for SSL error message
2016-11-03 08:40:42 +01:00
Florian Bruhin
28a32e680d
Add comment about HTML escaping
2016-11-03 08:40:42 +01:00
Florian Bruhin
64eeb95c30
Rename _init_title
2016-11-03 08:40:42 +01:00
Florian Bruhin
27f96943a2
Add missing html.escape
2016-11-03 08:40:42 +01:00
Florian Bruhin
efdcbd860e
Increase font size for prompt titles
2016-11-03 08:40:42 +01:00
Florian Bruhin
3b7f65d956
Show URL in most questions
2016-11-03 08:40:42 +01:00
Florian Bruhin
4ad741d26d
Simplify shutdown in app.py
2016-11-03 08:40:42 +01:00
Florian Bruhin
d85cfcbc07
Fix ask_for_filename call
2016-11-03 08:40:42 +01:00
Florian Bruhin
4552e06797
Only connect interrupted signal for questions once
2016-11-03 08:40:42 +01:00
Florian Bruhin
a87e46101c
Fix lint
2016-11-03 08:40:42 +01:00
Florian Bruhin
5ebaddfaf2
Ignore "Unexpected null parameter" warning
2016-11-03 08:40:42 +01:00
Florian Bruhin
1b3e9613ea
Fix mode handling with multi-window questions
...
When the prompt mode is left in any window, we need to take care of:
- Cancelling the question if needed (exactly once)
- Leaving the prompt mode in all other windows too
2016-11-03 08:40:42 +01:00
Florian Bruhin
4a360ba185
Simplify _set_fileview_root
2016-11-03 08:40:42 +01:00
Florian Bruhin
b0a04bff8e
Use OS-independent path separators
2016-11-03 08:40:42 +01:00
Florian Bruhin
54a694e35e
Hide prompts correctly after :prompt-download-open
2016-11-03 08:40:42 +01:00
Florian Bruhin
5eb66f2693
Restore self._question when restoring prompt
2016-11-03 08:40:42 +01:00
Florian Bruhin
6f83590553
Add some more logging for prompts
2016-11-03 08:40:42 +01:00
Florian Bruhin
dba29e518a
First working prototype of global prompts
2016-11-03 08:40:42 +01:00
Florian Bruhin
fdd1147620
Revert "Global prompt container"
...
This reverts commit c23beee6502776dd19c0955b311e8dfb9f1c77ae.
2016-11-03 08:40:42 +01:00
Florian Bruhin
1d6166b474
Global prompt container
2016-11-03 08:40:42 +01:00
Florian Bruhin
9ce1180b31
First attempt at showing prompts in all windows
2016-11-03 08:40:42 +01:00
Florian Bruhin
d5a1f6d6b5
Only support calling _init_key_label once
2016-11-03 08:40:42 +01:00
Florian Bruhin
fefc8c4eb2
Add more tests for prompts
2016-11-03 08:40:42 +01:00
Florian Bruhin
653ca9799d
Add a default for SSL questions
2016-11-03 08:40:41 +01:00
Florian Bruhin
20716c137c
Support tab completion for auth prompts again
2016-11-03 08:40:41 +01:00
Florian Bruhin
3ffcb011a7
Simplify key label for auth prompts
2016-11-03 08:40:41 +01:00
Florian Bruhin
9bdbb257ba
Add initial filename completion
2016-11-03 08:40:41 +01:00
Florian Bruhin
6ab51e0b7b
Handle clicking on file items in prompt
2016-11-03 08:40:41 +01:00
Florian Bruhin
acbd5107d6
Only show directories in download filename prompts
2016-11-03 08:40:41 +01:00
Florian Bruhin
46b24fc64a
Improve how file list is shown in download prompt
2016-11-03 08:40:41 +01:00
Florian Bruhin
6da6758263
Improve FilenamePrompt widget sizing
2016-11-03 08:40:41 +01:00
Florian Bruhin
741ecac9ef
More improvements for yesno prompt key hints
2016-11-03 08:40:41 +01:00
Florian Bruhin
7d63795613
Improve bindings output for yesno questions
2016-11-03 08:40:41 +01:00
Florian Bruhin
7d57d884d6
Add configuration options for prompts
2016-11-03 08:40:41 +01:00
Florian Bruhin
a33333eb41
Make the radius for prompt edges configurable
2016-11-03 08:40:41 +01:00
Florian Bruhin
dff20ffe35
Fix message.confirm_async calls
2016-11-03 08:40:41 +01:00
Florian Bruhin
bc4e340323
Save key mode to leave
...
Doing self._prompt.question.done() already sets self._prompt to the next
prompt or to None.
2016-11-03 08:40:41 +01:00
Florian Bruhin
80caed4642
Add missing docstring
2016-11-03 08:40:41 +01:00
Florian Bruhin
e110f3b590
Get rid of StatusBar._set_prompt_active
2016-11-03 08:40:41 +01:00
Florian Bruhin
fe59e0618f
Rename download_open function
2016-11-03 08:40:41 +01:00
Florian Bruhin
fe230219a9
Fix lint
2016-11-03 08:40:41 +01:00
Florian Bruhin
f4be35c981
Add a LineEdit subclass for prompts
2016-11-03 08:40:41 +01:00
Florian Bruhin
433afe8658
Handle invalid values with :prompt-accept
2016-11-03 08:40:41 +01:00
Florian Bruhin
051b31d101
Fix reinitializing of key label
2016-11-03 08:40:41 +01:00
Florian Bruhin
7d38430d2d
Fix confirm_async
2016-11-03 08:40:41 +01:00
Florian Bruhin
9c34a64f81
self._build_question fail
2016-11-03 08:40:41 +01:00
Florian Bruhin
04d24e3d94
Fix permission question
2016-11-03 08:40:41 +01:00
Florian Bruhin
75bb2265be
Take text as pos. argument for _build_question
2016-11-03 08:40:41 +01:00
Florian Bruhin
6d7748f05f
Add FilenamePrompt
2016-11-03 08:40:41 +01:00
Florian Bruhin
47208eb022
Fix :prompt-open-download
2016-11-03 08:40:41 +01:00
Florian Bruhin
d74b0109c7
Add key hints
2016-11-03 08:40:41 +01:00
Florian Bruhin
f0ed43ec20
Use message module as API for most questions
2016-11-03 08:40:41 +01:00
Florian Bruhin
756564ebff
Get rid of message_bridge.set_cmd_text
2016-11-03 08:40:41 +01:00
Florian Bruhin
523369882a
Add title/text to questions
2016-11-03 08:40:41 +01:00
Florian Bruhin
e3581a50ca
Remove generated stylesheets again
...
We can just use jinja logic instead...
2016-11-03 08:40:41 +01:00
Florian Bruhin
1f011bdd5f
Fix prompt focus handling
2016-11-03 08:40:41 +01:00
Florian Bruhin
33088588d9
half-working auth prompts
2016-11-03 08:40:41 +01:00
Florian Bruhin
903e31efa4
First prototype of new prompts
2016-11-03 08:40:41 +01:00
Cosmin Popescu
3692c86a7e
auto save session
2016-11-01 19:43:37 +01:00
Florian Bruhin
51a0c2a32c
Remove unused imports
2016-10-31 07:27:30 +01:00
Florian Bruhin
f12d87fabc
Only call sip.isdeleted on QObjects
2016-10-31 06:14:43 +01:00
Florian Bruhin
618e7650fe
Don't include deleted objects in objreg.dump_objects
2016-10-30 23:25:28 +01:00
Florian Bruhin
b4872192c3
Merge branch 'more-tests' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-more-tests
2016-10-30 23:24:15 +01:00
Florian Bruhin
f6aefabf40
Initialize QtWebKit-specific stuff with QtWebKit only
...
Maybe this fixes issues we had with QtWebEngine segfaults in proxy.py on
Travis?
Note we can't move cookies/cache/network stuff yet as we still need that
for e.g. adblock downloads with QtWebEngine.
2016-10-30 23:07:19 +01:00
Florian Bruhin
428637746a
Merge branch 'insert-text-js' of https://github.com/paretje/qutebrowser into paretje-insert-text-js
2016-10-30 19:51:25 +01:00
Florian Bruhin
713b00a102
Hide empty "Unhandled client message" warning
...
Fixes #2071
2016-10-30 19:00:29 +01:00
Kevin Velghe
0caee94994
Remove has_js
2016-10-30 18:54:34 +01:00
Florian Bruhin
f4022a86fd
Improve line breaking
2016-10-30 18:49:41 +01:00
Florian Bruhin
620b952bb2
Merge branch 'jseval-2' of https://github.com/paretje/qutebrowser into paretje-jseval-2
2016-10-30 18:48:14 +01:00
Kevin Velghe
e83b99b0e1
Run javascript on document element
...
This enables `:jseval` for users who disable javascript on webpages.
2016-10-30 11:39:10 +01:00
Florian Bruhin
2ce15b0499
Use start.duckduckgo.com as startpage
...
Apparently some users got nagged by duckduckgo to set it as start page.
2016-10-27 22:16:53 +02:00
Jan Verbeek
2cc958fbb6
Stop progress bar from growing status bar height
2016-10-26 13:46:52 +02:00
Joel Bradshaw
e5a1bb5091
Update version number to 0.8.2
...
Bump version info to 0.8.2 so that it shows up in `qutebrowser --version`
2016-10-25 06:01:45 -07:00
Daniel Karbach
c801caa19a
log debug console status changes
2016-10-24 17:10:47 +02:00
Daniel Karbach
5d92934d76
less brutal synthetic segfault
2016-10-24 17:10:47 +02:00
Daniel Karbach
bdb96becd6
unit tests for misc.lineparser
2016-10-24 17:10:47 +02:00
Jan Verbeek
21289a80ad
Catch RegisterKeyParser command errors
2016-10-20 17:38:56 +02:00
Kevin Velghe
efadbe64b5
insert_text doesn't need javascript to be enabled
...
It runs in the context of an element, which seems possible, even without
javascript enabled (in qtwebkit?).
2016-10-20 15:54:06 +02:00
Daniel Karbach
da2ba86aa5
use https for links in docs and elsewhere
...
refs #2039
2016-10-20 14:48:35 +02:00
Jan Verbeek
f2b05a0395
Move keyboard macro system to MacroRecorder object
2016-10-20 02:50:00 +02:00
Daniel Karbach
ef3968c165
setting values tabs->new-tab-position[-explicit]
...
left -> prev
right -> next
2016-10-18 17:17:17 +02:00
Daniel Karbach
7eafa30084
:tab-close option names
...
--left -> --prev
--right -> --next
2016-10-18 15:03:08 +02:00
Daniel Karbach
845298ae41
:tab-close option names
...
--left -> --prev
--right -> --next
2016-10-18 15:03:08 +02:00
Daniel Karbach
828b7d744a
setting values tabs->select-on-remove
...
left -> prev
right -> next
previous -> last-used
refs #1619
2016-10-18 15:03:01 +02:00
Florian Bruhin
2ae9f14d22
Add pylint disable
2016-10-18 06:22:45 +02:00
Kevin Velghe
59536828a1
Implement hint target "current" for webengine
2016-10-17 23:33:44 +02:00
Florian Bruhin
ab43ba71d2
Merge branch 'webkitelemparent' of https://github.com/paretje/qutebrowser into paretje-webkitelemparent
2016-10-17 22:26:58 +02:00
Jan Verbeek
2a304d7a6b
Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into macros
...
Conflicts:
qutebrowser/commands/runners.py
2016-10-17 19:14:58 +02:00
Kevin Velghe
ed91e1d4c8
Implement __setitem__ in WebEngineElement
2016-10-17 14:14:45 +02:00
Kevin Velghe
7bb4700352
Return None when parent is a null webelement
2016-10-14 14:54:43 +02:00
Florian Bruhin
229faac9cb
Stabilize :session-delete tests
2016-10-14 07:24:36 +02:00
Florian Bruhin
d301f200e2
Improve docs for netrc-file setting
2016-10-14 06:45:41 +02:00
Florian Bruhin
26b6688b61
Merge branch 'netrc' of https://github.com/paretje/qutebrowser into paretje-netrc
2016-10-14 06:39:03 +02:00
Ryan Roden-Corrent
fbc084e416
Remove :<count>:cmd syntax support.
...
CommandRunner.parse had some logic for handling commands of form
:<count>:cmd. However, this complicated the parsing logic for something
that appears to only be used in tests. One could use it in a
userscript, but this is unlikely as it is undocumented. Removing
support for this simplifies the logic of parse.
The commnd `run-with-count` is added to provide this functionality.
It works like `repeat` but passes the count along to the command
instead of running the command multiple times.
This resolves #1997 : Qutebrowser crashes when pasting commands.
This bug was caused by excess stripping of ':' from the command string
by _parse_count.
2016-10-10 08:02:30 -04:00
Kevin Velghe
087342894e
Add setting for location of netrc file
...
There is no reason I guess to do this with an environment variable. On
top of that, introducing a settings also documents the netrc feature
itself (Closes #1975?).
2016-10-09 00:15:46 +02:00
Jan Verbeek
87899cb6b3
Fix long lines
2016-10-08 22:00:26 +02:00
Jan Verbeek
33ff0ba715
Interactively get macro register
2016-10-08 21:17:47 +02:00
Florian Bruhin
c40539c7e9
Merge branch 'pdfjs-1.6.210' of https://github.com/Kingdread/qutebrowser into Kingdread-pdfjs-1.6.210
2016-10-06 22:52:44 +02:00
Jan Verbeek
7aaaadac1a
Add keyboard macros
2016-10-06 22:24:04 +02:00
Florian Bruhin
378976db29
Make log.stub work when inspect.stack fails
...
I got this during shutdown once:
Traceback (most recent call last):
File ".../qutebrowser/mainwindow/mainwindow.py", line 552, in closeEvent
File ".../qutebrowser/mainwindow/mainwindow.py", line 538, in _do_close
File ".../qutebrowser/mainwindow/tabbedbrowser.py", line 218, in shutdown
self._remove_tab(tab)
File ".../qutebrowser/mainwindow/tabbedbrowser.py", line 280, in _remove_tab
tab.shutdown()
File ".../qutebrowser/browser/webengine/webenginetab.py", line 536, in shutdown
log.stub()
File ".../qutebrowser/utils/log.py", line 151, in stub
function = inspect.stack()[1][3]
File "/usr/lib64/python3.5/inspect.py", line 1464, in stack
return getouterframes(sys._getframe(1), context)
File "/usr/lib64/python3.5/inspect.py", line 1441, in getouterframes
frameinfo = (frame,) + getframeinfo(frame, context)
File "/usr/lib64/python3.5/inspect.py", line 1414, in getframeinfo
lines, lnum = findsource(frame)
File "/usr/lib64/python3.5/inspect.py", line 804, in findsource
if pat.match(lines[lnum]): break
IndexError: list index out of range
2016-10-06 21:04:53 +02:00
Daniel Schadt
ffa276a182
pdfjs: compatibility for v1.6.210
...
They renamed PDFView to PDFViewerApplication, which we need to account
for in our pdfjs scripts.
Also, it seems like the actual viewer is now only created when the DOM
has been loaded. This means that at the time when our script is
executed, the viewer does not yet exist. Thus we need to delay the open
request too by registering a DOMContentLoaded handler.
2016-10-06 14:43:16 +02:00
Florian Bruhin
5e6d8e3944
Merge branch 'master' of https://github.com/sebastian-frysztak/qutebrowser into sebastian-frysztak-master
2016-10-05 21:19:17 +02:00
Florian Bruhin
6184da0224
Add a comment
2016-10-05 21:16:18 +02:00
Florian Bruhin
24eb27e385
Merge branch 'completer_unicode' of https://github.com/rcorre/qutebrowser into rcorre-completer_unicode
2016-10-05 21:15:28 +02:00
Kevin Velghe
e3c92a9bae
Set netrc location with QUTE_NETRC
2016-10-05 12:03:52 +02:00
Florian Bruhin
c36ae5ab8f
Fix quit confirmation text for downloads
2016-10-05 10:13:01 +02:00
Florian Bruhin
2f0db878e6
Break long lines
2016-10-05 09:07:35 +02:00
Sebastian Frysztak
f0cc168609
Style changes
2016-10-04 16:45:31 +02:00
Ryan Roden-Corrent
2696f9b427
Handle unicode characters in Completer.
...
Just limit the cursor position to the length of the text to avoid
crashes in this case.
Resolves #2007 .
2016-10-04 07:36:49 -04:00
Florian Bruhin
f34d896ff4
Log total initialization time
2016-10-04 10:26:44 +02:00
Florian Bruhin
b107522d8c
Make cssutils a lazy import
...
Importing cssutils takes more than a second on the 2009 Thinkpad with a
Core2 I'm on right now, so let's only import it when actually necessary.
2016-10-04 08:51:10 +02:00
Sebastian Frysztak
df83862088
Reserve space for empty favicon in _get_icon_rect.
2016-10-03 13:14:49 +02:00
Florian Bruhin
4407ef032a
Clean up JS
2016-10-03 07:01:22 +02:00
Florian Bruhin
323d5fc9e7
Also fix scroll.to_perc with position:absolute
2016-10-03 06:59:35 +02:00
Florian Bruhin
bd831939bc
Adjust for scrolling off-by-one errors
...
On some pages with particular zoom levels, elem.offsetHeight is exactly
one pixel more than elem.scrollHeight when fully scrolled down.
This is probably due to rounding/floats/off-by-one errors somewhere
inside Chromium?
We now instead always clip the displayed percentage at 100% (so we don't
display 101%), and consider the page fully scrolled even if we're
scrolled more than the page.
2016-10-03 06:52:54 +02:00
Florian Bruhin
fc0b62f122
Revert "scroll.js --> fix scroll measures"
...
This reverts commit 0c5d95c943
.
Using those values is probably okay as long as we adjust for the
off-by-one errors which will follow in the next commit.
2016-10-03 06:51:57 +02:00
Florian Bruhin
fc1943e5e6
Merge branch 'patch-1' of https://github.com/Spreadyy/qutebrowser into Spreadyy-patch-1
2016-10-03 06:51:37 +02:00
Florian Bruhin
5b11eaad85
Merge branch 'issue1987' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-issue1987
2016-10-03 06:45:01 +02:00
Florian Bruhin
c7b74edfbe
Merge branch 'issue1940' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-issue1940
2016-10-03 06:41:19 +02:00
Florian Bruhin
55cefd1ab7
Don't shadow outer name
2016-10-01 22:51:40 +02:00
Florian Bruhin
625bb7baa4
Clean up crash msgbox properly
...
Fixes #2004
2016-10-01 22:05:29 +02:00
Sebastian Frysztak
4f443c9f27
Reserve space for favicon with vertical tabs
2016-10-01 12:55:55 +02:00
Florian Bruhin
6b76d5defa
Whitespace changes
2016-09-30 17:54:23 +02:00
Daniel Karbach
a3e9fe1fd7
removed duplicate userscript path lookup
2016-09-30 09:50:49 +02:00
Daniel Karbach
dc344989c6
revised missing userscript error messages
2016-09-30 09:50:49 +02:00
Daniel Karbach
eaa754648d
common base for userscript exceptions
2016-09-30 09:26:43 +02:00
Florian Bruhin
822c100f52
Make 0 a usable count for :tab-focus
...
Fixes #1768
2016-09-30 08:33:16 +02:00
Daniel Karbach
46ca91cfc0
only use ';' as query delim if there's no '&'
2016-09-29 17:45:12 +02:00
Daniel Karbach
cbbfbabfc4
reorganize and document
2016-09-29 14:37:40 +02:00
Daniel Karbach
8eb12c6cb9
improved error messages for inexistent userscripts
...
fixes #1940
2016-09-29 13:29:39 +02:00
Daniel Karbach
b195b5b40d
detect ';' delimiters when yanking URL
...
fixes #1987
2016-09-29 11:02:30 +02:00
Spreadyy
0c5d95c943
scroll.js --> fix scroll measures
...
scroll measures failed a travis test where document.documentElement.offsetHeight and document.documentElement.scrollHeight diffed by one pixel when the browser zoomed. --> Removed offsetHeight.
2016-09-29 08:59:46 +02:00
Florian Bruhin
5ce1f0b912
Don't update scroll position with 0 tabs
2016-09-29 08:48:04 +02:00
Florian Bruhin
42b7d1d10f
Add a colon
2016-09-29 06:35:47 +02:00
Daniel Karbach
50fb4a78c7
early init of qapp and standarddir
...
this fixes the error that appeared when invoked with --version
2016-09-28 10:25:40 +02:00
Spreadyy
f2e471597d
Lint test failed --> edited line length
2016-09-27 23:24:12 +02:00
Daniel Karbach
0c4c84d821
adhere to style guide
2016-09-27 13:22:28 +02:00
Daniel Karbach
7ce442c771
standarddir path names in qute://version
...
fixes #1947
2016-09-27 12:01:04 +02:00
Spreadyy
a22ae2818c
Fix scroll JS for xkcd.
...
Fix wrong scroll.height for xkcd. Solution according to:
http://stackoverflow.com/questions/1145850/how-to-get-height-of-entire-document-with-javascript
2016-09-27 11:41:47 +02:00
Ryan Roden-Corrent
6aaa138619
Use a set instead of a list for Command._modes.
2016-09-26 08:30:28 -04:00
Ryan Roden-Corrent
14f8ec8754
Error on mode/command mismatch with :bind.
...
Resolves #1964 (:bind should error for mode/command mismatch)
2016-09-26 08:30:28 -04:00
Ryan Roden-Corrent
6fdd007dbb
Simplify mode-checking in command.
...
Rather than maintaining separate _modes and _not_modes lists, just
build a single _modes list in the constructor.
2016-09-26 08:30:28 -04:00
Florian Bruhin
68e60ecc3c
configtypes: Add a "# pragma: no cover"
2016-09-26 08:25:54 +02:00
Florian Bruhin
62ac87c34f
Merge branch 'pretty-url' of https://github.com/lahwaacz/qutebrowser into lahwaacz-pretty-url
2016-09-26 07:08:33 +02:00
Florian Bruhin
cfe25b96fc
Merge branch 'option-description' of https://github.com/HolySmoke86/qutebrowser into HolySmoke86-option-description
2016-09-26 07:00:17 +02:00
Florian Bruhin
27b524300b
Improve configtypes tests
...
This also gets configtypes.py back to 100% coverage
2016-09-26 06:33:14 +02:00
Daniel Karbach
b801208d97
show option description in qute:settings
2016-09-23 15:42:02 +02:00
Jakub Klinkovský
a72efe4a3e
also prettify url:pretty variable
2016-09-22 19:25:54 +02:00
Florian Bruhin
d4376c5196
Fix overlays with a top statusbar
2016-09-22 17:34:30 +02:00
Florian Bruhin
e6f62f8118
Remove now-unneeded _get_overlay_position
2016-09-22 17:34:17 +02:00
Florian Bruhin
17ceba5ce4
Round correct edge for keyhint with top statusbar
2016-09-22 17:29:25 +02:00
Florian Bruhin
e04e6c51d1
Add generator argument to set_register_stylesheet
2016-09-22 17:29:03 +02:00
Florian Bruhin
750dfd98af
Generalize statusbar-attached website overlays
...
We already had some duplicated logic for completion/keyhint/messageview,
and plan to add prompt overlays too now - so here we refactor related
code to have a list of overlays instead, which are all
resized/positioned by the mainwindow when needed.
This also changes the size management, which gets moved into the
sizeHint of the respective overlay widgets.
2016-09-22 17:04:39 +02:00
Jakub Klinkovský
268db48f19
prettify yank pretty-url
2016-09-22 14:25:48 +02:00
Florian Bruhin
57d896e989
Fix hints when zoomed with QtWebEngine
...
We mutated rect (coming from self._js_dict), which means we used the
already adjusted values the second time we called rect_on_view.
Fixes #1863 .
2016-09-21 20:09:31 +02:00
Ryan Roden-Corrent
1d2cf3b648
Completer: don't try to partition search.
...
Exit before trying to partition if the command prefix is not ':'.
Resolves #1969 :
'TypeError with refactored completion when searching for command'
2016-09-21 07:08:34 -04:00
Florian Bruhin
43fa5f55c1
Don't set QT_HARFBUZZ with Qt >= 5.4
...
Fixes #1948
2016-09-16 08:35:17 +02:00
Florian Bruhin
e5b3880b71
Check for spaces in URLs with explicit scheme
...
Fixes #1954
2016-09-15 22:29:21 +02:00
Florian Bruhin
04a891cbf0
Merge branch 'kwonly-default-fix' of https://github.com/Kingdread/qutebrowser into Kingdread-kwonly-default-fix
2016-09-15 17:19:26 +02:00
Florian Bruhin
0d64257049
Add missing docstring
2016-09-15 17:16:30 +02:00
Florian Bruhin
bb1b1c8ee8
Remove unused imports
2016-09-15 16:45:48 +02:00
Florian Bruhin
018e9ef4a3
Merge branch 'completion_split' of https://github.com/rcorre/qutebrowser into rcorre-completion_split
2016-09-15 16:44:54 +02:00
Florian Bruhin
879ca0b873
Make qutescheme arg optional for resource_url
2016-09-15 16:42:07 +02:00
Daniel Schadt
794eb84805
add parameter name in error message
2016-09-15 16:38:18 +02:00
Florian Bruhin
37fa7431b0
Serve broken qutebrowser logo via qute:resources
...
This is needed when we want to display an error page after the user
requested a qute:// URL, as qute:// URLs can't access file:// content
with QtWebEngine.
2016-09-15 16:06:25 +02:00
Daniel Schadt
0ef5d338bd
make sure keyword-only arguments have a default
...
Fixes #1872 .
This prevents inspect.Parameter.empty from slipping through to the
command.
2016-09-15 15:44:33 +02:00
Florian Bruhin
44e8296a66
Remove environment variables from version()
...
We already have those in the report anyways.
2016-09-15 14:59:32 +02:00
Florian Bruhin
8403f2451f
Add $PATH to crash info
2016-09-15 14:56:27 +02:00
Florian Bruhin
7e30792bfe
Fix lint
2016-09-15 14:51:22 +02:00
Florian Bruhin
e32bbfa8f7
Init message.global_bridge at import time
2016-09-15 14:51:22 +02:00
Florian Bruhin
2c98b837d5
Add config migrations
2016-09-15 14:51:21 +02:00
Florian Bruhin
e5293d34de
Add missing str() calls
2016-09-15 14:51:21 +02:00
Florian Bruhin
dfac0658ae
Re-add logging for messages
2016-09-15 14:51:21 +02:00
Florian Bruhin
ed4f476ab4
Get rid of queued messages and unused code
2016-09-15 14:51:21 +02:00
Florian Bruhin
f16b96aa28
Initial implementation of new messages
2016-09-15 14:51:21 +02:00
Ryan Roden-Corrent
a9771007b1
Pass string, not index from on_selection_changed.
...
Simplify the CompletionWidget/Completer interface by changing
on_selection_changed to pass the newly selected text rather than the
index of the newly selected item.
This moves the logic from Completer to CompletionWidget but simplifies
the interaction between the two and makes testing easier.
2016-09-14 22:55:07 -04:00
Ryan Roden-Corrent
ac03095512
Small if-statement style tweak in Completer.
2016-09-14 22:35:05 -04:00
Florian Bruhin
c071964091
Fix lint
2016-09-14 15:21:30 +02:00
Florian Bruhin
886103c887
Fix showing errors in the current window
2016-09-14 15:18:12 +02:00
Florian Bruhin
982d00ff84
Let qute:* handlers decide their mimetype
...
This means we have to guess less, and handlers can give us HTML as text
which we then encode for them.
2016-09-14 12:33:20 +02:00
Florian Bruhin
5501d90268
Fix lint
2016-09-14 12:00:29 +02:00
Florian Bruhin
a1527f35d4
Allow to restrict qute:* pages to a backend
2016-09-14 11:04:47 +02:00
Florian Bruhin
71bc5bb943
Move QuteSchemeError to qutescheme
2016-09-14 11:04:37 +02:00
Florian Bruhin
aa71c9ae58
Initial qute:* support for QtWebEngine
2016-09-14 10:18:25 +02:00
Ryan Roden-Corrent
e23d611b37
Strip quotes from completion pattern.
...
Given a commandline like:
`:set general editor "gvim -f"|`, the pattern should be 'gvim -f'
rather than '"gvim -f"'.
2016-09-12 22:19:44 -04:00
Ryan Roden-Corrent
b867b87955
Don't crash Completer on unknown command.
...
The CommandRunner's fallback parsing behavior treated whitespace
differently than the normal flow. When a user entered an unknown
command, trailing whitespace would be stripped and the cmdline length
would be less than the cursor position.
This is fixed by making the fallback use the ShellLexer just as the
'normal' parsing does.
2016-09-12 22:19:44 -04:00
Ryan Roden-Corrent
69a3df174d
Remove needless try/catch in on_selection_changed.
2016-09-12 22:19:44 -04:00
Ryan Roden-Corrent
d651cc75b0
Fix flake8/pylint errors.
2016-09-12 22:19:44 -04:00
Ryan Roden-Corrent
808a645b40
Fix quick-complete highlighting quirk.
...
When the commandline reads ':open |', quick-completing the only offered
completion will set the commandline to ':open some_url |'. Since `open`
has `maxsplit=0`, everything after ':open' is (correctly) treated as
one argument. This means completion is opened again with 'some url '
as the pattern (note trailing whitespace), which makes the comletion
menu 'flicker' and stay open even though it was 'supposed' to quick
compelte.
This is fixed by ignoring the next completion request if we just
completed something after maxsplit (because we don't expect any more
completions after the last split).
Resolves #1519 .
2016-09-12 22:19:44 -04:00
Ryan Roden-Corrent
fcadde6aef
Merge _split into _partition in Completer.
...
After the refactoring, _split is only called by _partition so just make
it part of the same method. This also removes the use of
_empty_item_index, as it can be figured out on the fly.
2016-09-12 22:19:44 -04:00
Ryan Roden-Corrent
127412d91c
Simplify update_completion.
...
Remove the class variables _cursor_part and _empty_item_index. Instead,
split up the commandline around the cursor whenever that information is
needed. Using locals instead of class variables makes the logic easier
to follow and ends up requiring much less code.
2016-09-12 22:19:44 -04:00
Ryan Roden-Corrent
581d7659ba
Clean up Completer.on_selection_changed.
...
Remove the dependency on the class variables _empty_item_index
and _cursor_part to make the code easier to follow. If
_update_completion is refactored in a similar way these variables can
be removed.
2016-09-12 22:19:44 -04:00
Florian Bruhin
0b310d6910
Fix removing of a clicked download
2016-09-12 21:47:01 +02:00
Florian Bruhin
5b0fc41367
Log scroll data we got via JS
2016-09-12 21:46:51 +02:00
Florian Bruhin
4b4582c452
Adjust comment in _rect_on_view_js
2016-09-12 20:00:59 +02:00
Florian Bruhin
14de9f58b8
Fix docstring
2016-09-12 18:33:57 +02:00
Florian Bruhin
8a35ebac7b
Use a separate JS world for :jseval
2016-09-12 18:27:51 +02:00
Florian Bruhin
c9e3cc04cf
Accept a name for --world with :jseval
2016-09-12 18:23:23 +02:00
Florian Bruhin
97edc59f03
Add some logging to argparse.multitype_conv
2016-09-12 18:22:49 +02:00
Florian Bruhin
b2608d7697
Add --world to :jseval
2016-09-12 15:59:17 +02:00
Florian Bruhin
a16c5a6a25
Add a world argument to tab.run_js_async
2016-09-12 15:59:03 +02:00
Florian Bruhin
2388489038
downloads: Be okay with the tmpdir being gone
2016-09-12 11:30:44 +02:00
Florian Bruhin
0fef141db5
Handle QBuffer in on_feature_permission_requested
2016-09-12 09:43:08 +02:00
Florian Bruhin
43b563f600
Add missing docstring
2016-09-11 21:27:16 +02:00
Florian Bruhin
7ec62c4523
Make some more things in download.py private
2016-09-11 20:58:34 +02:00
Florian Bruhin
3550d59e3a
Make DownloadItem.reply private
...
This adds a new uses_nam method to DownloadItem though.
2016-09-11 20:58:34 +02:00
Florian Bruhin
36b7485262
Make some things in downloads.py private
2016-09-11 20:48:19 +02:00
Florian Bruhin
4a2f0eea2f
Fix import order in utilcmds
2016-09-11 20:29:19 +02:00
Florian Bruhin
4537b786f5
Ignore already deleted windows in :window-only
2016-09-11 20:29:05 +02:00
Florian Bruhin
1b5cd98d38
Fix lint
2016-09-11 20:16:03 +02:00
Florian Bruhin
8eeb3b9c75
QtWebEngine: Round scroll percentages
2016-09-11 19:59:00 +02:00
Florian Bruhin
fff777404b
Use QApplication.postEvent again
...
We had some funny segfaults reported during scrolling (i.e. with
QApplication.sendEvent), and some code already had to use postpone=True
so there was no segfault...
So now we're back to postEvent again, and eliminated the main reason for
segfaults with it, which was re-using (and -posting) events which had
already been posted.
At least during tests this seems to run stable, let's hope it helps for
the people having crashes as well.
2016-09-11 19:37:09 +02:00
Florian Bruhin
de03feabfe
Fix DownloadModel.itemFlags with invalid index
2016-09-11 17:10:52 +02:00
Florian Bruhin
4d96586eb6
Merge branch 'visibility-api' of https://github.com/Ban3/qutebrowser into Ban3-visibility-api
2016-09-11 16:23:14 +02:00
Florian Bruhin
1fe2579bb1
Merge branch 'windows-userscripts' of https://github.com/Kingdread/qutebrowser into Kingdread-windows-userscripts
2016-09-11 16:14:25 +02:00
Florian Bruhin
4686e0349b
Fix lint
2016-09-11 16:06:16 +02:00
Florian Bruhin
162e6d6483
Fix closing with no last-visible-main-window
...
Fixes #1918
2016-09-11 16:03:15 +02:00
Florian Bruhin
1c09649dcb
Pass QNAM instead of page to DownloadManager
2016-09-11 14:58:07 +02:00
Florian Bruhin
e8f8f1e72a
Add DownloadItem.remove
...
This also gets rid of the remove_items method and replaces it by a
simple loop. I don't think the optimization is actually needed...
2016-09-11 14:58:07 +02:00
Florian Bruhin
b332d22967
Make DownloadModel a sequence
2016-09-11 14:58:07 +02:00
Florian Bruhin
b949e4d73a
Start splitting DownloadModel from DownloadManager
...
This mostly works, apart from remove_item/remove_items not being
available on the model.
2016-09-11 14:58:07 +02:00
Jussi Timperi
19d9ec374d
Handle the missing attribute
2016-09-11 13:12:27 +03:00
Jussi Timperi
1adc308676
Access enums by their base class
2016-09-11 13:04:58 +03:00
Florian Bruhin
4c55963dc3
Fix lint
2016-09-10 17:32:04 +02:00
Jussi Timperi
6437a28184
QtWebKit: Add version checks to visibility API
2016-09-10 17:55:00 +03:00
Florian Bruhin
bd5f63db46
Make an invalid download target fatal
...
This should never happen, so there's no reason for it to log an error
instead of raising an exception.
2016-09-10 16:42:27 +02:00
Florian Bruhin
cc4cd6913d
Make download model qtmodeltester compliant
2016-09-10 16:24:31 +02:00
Florian Bruhin
3bf841bdb4
Delete file on infinite redirects
2016-09-10 16:24:31 +02:00
Florian Bruhin
dc0ddd023a
Add logging for deleting/removing downloads
2016-09-10 16:24:31 +02:00
Jussi Timperi
13d73359d4
QtWebKit: Handle visibility API
...
closes #1886
2016-09-10 16:07:29 +03:00
Florian Bruhin
7f2cc5dbc3
Make remove_data in DownloadItem.cancel kw-only
2016-09-09 19:29:14 +02:00
Florian Bruhin
b39d33d5e3
Revert "Remove remove_data arg for DownloadItem.cancel"
...
This reverts commit ece85dc903
.
It's actually needed in _ask_confirm_question...
2016-09-09 19:28:17 +02:00
Florian Bruhin
433a8a8ced
Fix filename with a misconfigured XDG_DOWNLOAD_DIR
...
'filename' is the relative path we got from the broken config file.
Instead of using the garbage, let's just drop it and use the suggested
name (self.basename) instead.
2016-09-09 18:46:51 +02:00
Florian Bruhin
a5793695de
Mark almost-impossible check with a nocover pragma
...
This can only happen when running :download-open on a download created
by :adblock-update right now, which is a very small chance, so we can't
easily test for it.
2016-09-09 18:46:51 +02:00
Florian Bruhin
ece85dc903
Remove remove_data arg for DownloadItem.cancel
...
This was added in f0779f8cc0
but never
actually used.
2016-09-09 18:46:51 +02:00
Florian Bruhin
ab30124bd0
Remove (hopefully) dead download code
...
If the percentage is None, remaining/total should always be None
too (as percentage/remaining being None should be triggered by total
being None).
2016-09-09 18:46:51 +02:00
Florian Bruhin
7611281563
Add basename to "download finished" message
2016-09-09 18:46:51 +02:00
Florian Bruhin
864ec94cde
Fix lint
2016-09-09 17:56:58 +02:00
knaggita
9ff3f6810a
Remove --qt-* arguments
2016-09-09 17:55:16 +02:00
Florian Bruhin
f75f45addc
Fix at_bottom scrolling check
...
This is a regression introduced in
b45f940e72
2016-09-09 16:03:51 +02:00
Florian Bruhin
d0cf452ec8
Remove :prompt-yes and :prompt-no
...
Those are replaced by :prompt-accept yes and :prompt-accept no
2016-09-09 15:59:00 +02:00
Florian Bruhin
d579697245
Add a value argument to :prompt-accept
2016-09-09 15:48:42 +02:00
Florian Bruhin
b45f940e72
Move some scroll logic from JS to Python
2016-09-09 14:19:21 +02:00
Florian Bruhin
71a89bd418
*Really* fix completion with multiple words.
...
Turns out re.escape also escapes spaces, so we'd need to replace '(\\ )'
groups after escaping. At this point it's easier to just combine spaces
before escaping the pattern.
Fixes #1934 .
Supersedes #1935 .
2016-09-09 09:03:18 +02:00
Florian Bruhin
0a3853fcb7
Fix handling of spaces in completion
...
This is a regression introduced in
faa052ad6f
.
Fixes #1934 .
2016-09-08 21:59:18 +02:00
Florian Bruhin
f8f74400c6
Fix more lint
2016-09-07 18:57:00 +02:00
Florian Bruhin
955910a0e8
Fix lint
2016-09-07 18:45:46 +02:00
Florian Bruhin
44d1056e54
QtWebEngine: Implement custom HTTP headers
2016-09-07 18:29:38 +02:00
Florian Bruhin
5a54699863
Remove unused code from qutebrowser.browser.shared
2016-09-07 18:17:56 +02:00
Florian Bruhin
df7f74c782
Add qutebrowser.browser.shared
2016-09-07 18:17:05 +02:00
Florian Bruhin
d7f9e4735e
earlyinit: Only display exception if there was one
2016-09-07 17:33:22 +02:00
Florian Bruhin
4d91ccfea5
Enforce Qt >= 5.6.0 for QtWebEngine
2016-09-07 17:31:48 +02:00
Florian Bruhin
02bd42cbed
Implement adblocking for QtWebEngine
2016-09-07 17:27:21 +02:00
Florian Bruhin
6fec236757
Add some blank lines to app._init_modules
2016-09-07 16:45:46 +02:00
Florian Bruhin
3a55dbf712
Don't use 'current' win_id for adblock update
2016-09-07 16:24:51 +02:00
Florian Bruhin
bac7a6eaf2
Remove BrowserPage.chooseFile
...
Seems like QtWebKit comes with a default implementation of that.
2016-09-07 13:39:19 +02:00
Florian Bruhin
8c3906b784
Remove BrowserPage.shouldInterruptJavaScript
...
This is useless due to a Qt bug anyways:
https://bugreports.qt.io/issues/?jql=text%20~%20%22shouldInterruptJavascript%22
2016-09-07 12:49:57 +02:00
Florian Bruhin
fca37abf55
QtWebEngine: Implement webelem.classes
2016-09-07 12:31:48 +02:00
Florian Bruhin
3e1583bb1c
Make WebKitElement._is_visible private
...
It makes a lot of sense for this to be in webkitelem.py, but it should
not be public API as it's only used internally and can't be implemented
here with QtWebEngine.
2016-09-07 11:58:39 +02:00
Florian Bruhin
ae3b7c9f15
Remove unused imports
2016-09-07 11:51:57 +02:00
Florian Bruhin
0ff98f568c
Add a webelem logger
2016-09-07 11:51:23 +02:00
Florian Bruhin
c3b80c6b5b
Use double quotes for JS strings
...
eslint won't enforce it inside that snippet, but hey, why not?
2016-09-07 11:48:34 +02:00
Florian Bruhin
60c86a08c4
Get rid of WebElement.debug_text
2016-09-07 11:47:39 +02:00
Florian Bruhin
e700d11447
Add check_vanished() in webkitelem.insert_text
2016-09-07 11:29:26 +02:00
Florian Bruhin
8f9cfcf232
Get rid of webelem.run_js_async
2016-09-07 11:27:37 +02:00
Florian Bruhin
78d64f4791
Get rid of webkitelem.focus_elem
2016-09-07 11:24:28 +02:00
Florian Bruhin
948fa033c7
Implement :insert-text for QtWebEngine
2016-09-07 11:20:32 +02:00
Florian Bruhin
ee5a972069
Move auto-insert-mode handling to browsertab
...
This means auto-insert-mode now works correctly with QtWebEngine.
2016-09-07 10:24:27 +02:00
Florian Bruhin
2ef6423cf2
Add some QtWebEngine comments to webkit.webview
2016-09-07 10:11:01 +02:00
Florian Bruhin
02df91e369
Mark colors -> webpage.bg as QtWebKit-only
2016-09-07 09:49:37 +02:00
Florian Bruhin
919196714b
QtWebEngine: Implement WebEngineScroller.at_bottom
2016-09-07 09:32:51 +02:00
Daniel Schadt
22ac19b151
style fixes
2016-09-06 20:33:48 +02:00
Florian Bruhin
b65440e7e3
Update docs
2016-09-06 18:21:12 +02:00
Florian Bruhin
7c4548ece1
Split off _yank_url from :yank
2016-09-06 18:19:40 +02:00
nanjekyejoannah
d3e19ec8fc
Add general -> yank-ignored-url-parameters
2016-09-06 18:19:40 +02:00
Daniel Schadt
1c76f121a2
userscripts: fix FIFO on Windows
...
The userscript FIFO on Windows suffered the same problem that open-editor
once did, because files on Windows can't be opened with write access by
two different processes. We kept the oshandle around and only closed it
when the process exited, which means that userscripts could not actually
write any commands to the FIFO.
This patch closes the file earlier, allowing the userscript to actually
write commands to it.
See also
https://lists.schokokeks.org/pipermail/qutebrowser/2016-September/000256.html
2016-09-06 18:03:53 +02:00
Florian Bruhin
80ac0c1b1b
Remove createWindow error message
...
See https://github.com/The-Compiler/qutebrowser/issues/1911#issuecomment-244966547
2016-09-06 17:57:24 +02:00
Florian Bruhin
76176814e0
Move createWindow debug logging to the top
2016-09-06 17:56:25 +02:00
Florian Bruhin
921d5794a7
Add missing file
2016-09-06 17:17:12 +02:00
Florian Bruhin
7f013b7808
Fix lint
2016-09-06 17:00:25 +02:00
Florian Bruhin
c07ff15b9b
bdd: Display milliseconds in log output
2016-09-06 17:00:25 +02:00
Florian Bruhin
abdc604ead
:tab-clone - restore tab zoom after history
...
This makes cloning the zoom work with QtWebEngine.
2016-09-06 15:15:59 +02:00
Florian Bruhin
85b3d08c66
bdd: Fix scrolling tests with QtWebEngine
...
Scrolling happens async with QtWebEngine, so we add a new log output
when the page was scrolled, and wait for that in various places.
2016-09-06 14:58:33 +02:00
Florian Bruhin
1ed637a906
QtWebEngine: Initial session implementation
2016-09-06 13:55:35 +02:00
Florian Bruhin
3b16e171cb
Avoid calling str() on bytes in mainwindow.py
2016-09-06 12:35:52 +02:00
Florian Bruhin
f6ba859896
Move tabhistory.TabHistoryItem to misc.sessions
...
This makes browser.webkit.tabhistory contain only QtWebKit-specific
code.
2016-09-06 09:50:55 +02:00
Florian Bruhin
2658b7c4e7
pastebin: Accept HTTPS URLs
...
This will let us switch the URLs the pastebin returns to HTTPS some
day...
2016-09-05 22:06:26 +02:00
Florian Bruhin
3b8537ff26
Make webkitelem/mhtml imports optional in commands
2016-09-05 18:20:48 +02:00
Florian Bruhin
bf3cccfe56
Make QWebPage import in commands.py optional
2016-09-05 18:15:30 +02:00
Florian Bruhin
1773c1cbd6
Remove wrong @pyqtSlot in downloads.py
2016-09-05 18:14:50 +02:00
Florian Bruhin
5f58ebebbf
Remove needs_js for @cmdutils.register
...
This gets rid of a QtWebKit import in commands.py, and also makes those
checks work later when we have per-domain settings.
2016-09-05 18:11:01 +02:00
Florian Bruhin
af40abd3b2
Add websettings.shutdown()
2016-09-05 17:58:56 +02:00
Florian Bruhin
0ad8578aa8
Make QtWebKit optional in earlyinit.py
2016-09-05 17:58:29 +02:00
Florian Bruhin
308f38ab34
Rename javascript-can-open-windows setting
...
Fixes #1896 .
2016-09-05 17:09:14 +02:00
Florian Bruhin
61270b8f92
Fix lint
2016-09-05 16:21:30 +02:00
Florian Bruhin
f2c4cedf61
QtWebEngine: Don't add invalid URLs to history
2016-09-05 15:08:00 +02:00
Florian Bruhin
cf070d48f2
WebEngine: Disable createWindow for Qt < 5.7.1
...
Fixes #1911 .
The bugfix is backported in my qt5-webengine-debug package, and
QUTE_QTBUG54419_PATCHED can be set to force qutebrowser to use
createWindow.
2016-09-05 15:08:00 +02:00
Florian Bruhin
6a26907ded
Fix lint
2016-09-05 15:08:00 +02:00
Florian Bruhin
8b7d21876f
Add debug logging to createWindow
2016-09-05 15:08:00 +02:00
Florian Bruhin
2687b59373
Code cleanup
2016-09-05 15:08:00 +02:00
Florian Bruhin
a4cd0291a6
Implement QWebEngineView.createWindow
2016-09-05 15:08:00 +02:00
Florian Bruhin
a85ea92a21
Merge branch 'open-editor-all-modes' of https://github.com/kobezda/qutebrowser into kobezda-open-editor-all-modes
2016-09-05 10:59:53 +02:00
Florian Bruhin
366c230e0a
Merge branch 'docstrings' of https://github.com/lahwaacz/qutebrowser into lahwaacz-docstrings
2016-09-05 10:58:39 +02:00
Ján Kobezda
da65f7234a
Allow :open-editor in modes other than insert
...
':open-editor' can now be run in all modes.
Resolves #1902
2016-09-04 22:23:16 +02:00
Florian Bruhin
ea4f4e197f
Handle elements which are out of view correctly
...
Fixes #1910
2016-09-04 21:09:15 +02:00
Florian Bruhin
faa052ad6f
Fix hang with multiple spaces in URL completion
2016-09-04 20:19:16 +02:00
Jakub Klinkovský
cbe74f6991
fix adblock-update documentation
...
The tilde has to be escaped, otherwise the HTML is broken.
2016-09-02 19:52:45 +02:00
Jakub Klinkovský
3518fe19e8
move explanation of ;; to commands documentation
...
The note was out of place in keys.conf as it's not about keyinput. Since
we have a top-level documentation for commands now, let's keep the info
in once place. People will look there anyway for the documentation of
commands they want to bind.
2016-09-02 19:52:45 +02:00
Jakub Klinkovský
f36b8acec1
adjust wording in commands top-level documentation
...
There is no "commandline" for bindings in keys.conf, so describing it as
for "command arguments" should be more accurate.
2016-09-02 19:52:45 +02:00
Jakub Klinkovský
9669aca7d9
remove random description of variables in commands' docstrings
...
Full description is given at the top of qute://help/commands.html,
duplicating this for some commands where it might be useful is
unmaintainable.
2016-09-02 19:52:45 +02:00
Florian Bruhin
1cdf90f1c7
pastebin: Start sending API key
...
This is not enforced on the server yet, but this way we can do so after
a few releases (and break crash reports for older releases).
2016-09-01 22:57:35 +02:00
Florian Bruhin
44d6db4f45
QtWebEngine: Fix crash with userscript + selection
...
Fixes #1878
Unfortunately it seems impossible to implement a test for this, as
selection via javascript somehow doesn't trigger this.
2016-09-01 22:45:57 +02:00
arza
9b6541638e
Update CHANGED_KEY_COMMANDS and test_migrations for sk-keybinding.
2016-09-01 21:05:44 +03:00
arza
a90314985a
Fix sk-keybinding.
2016-09-01 16:23:16 +03:00
Rok Mandeljc
469590d4e8
TabWidget: a possible fix for #1693 - grey area under custom tabbar
...
Attempt to fix the issue #1693 by:
- setting the TabBarStyle to TabWidget in addition to TabBar
- chain up SE_TabWidgetTabBar requests in TabBarStyle.subElementRect
to the super() rather than self._style, in order to avoid getting
adwaita-specific rect sizes instead of default ones that are also
used in rendering.
2016-08-29 14:11:34 +02:00
Florian Bruhin
b9282587d0
Merge branch 'auto-open-fixes' of https://github.com/mlochbaum/qutebrowser into mlochbaum-auto-open-fixes
2016-08-29 07:12:14 +02:00
Florian Bruhin
5917f34eab
Merge branch 'settings' of https://github.com/lahwaacz/qutebrowser into lahwaacz-settings
2016-08-29 06:52:17 +02:00
Florian Bruhin
553eaee467
Fix pylint false-positive
2016-08-26 05:21:10 +02:00
Florian Bruhin
2408d76e4c
Improve get_console_format docstring
2016-08-25 23:17:10 +02:00
Florian Bruhin
29778bb799
Merge branch 'format-debug-log-level' of https://github.com/ryanjmortenson/qutebrowser into ryanjmortenson-format-debug-log-level
2016-08-25 23:16:36 +02:00
Florian Bruhin
76a3bdd94a
Improve message for invalid --logfilter
2016-08-25 23:12:51 +02:00
Florian Bruhin
99daa9e165
Merge branch 'issue1867' of https://github.com/knaggita/qutebrowser into knaggita-issue1867
2016-08-25 23:11:35 +02:00
Florian Bruhin
be7abb53ad
cmdutils: Assert on positional-only params
2016-08-25 22:16:25 +02:00
Florian Bruhin
943dc564b2
Fix choices validation with unannotated args
...
Something like:
@cmdutils.argument('foo', choices=['one', 'two'])
def func(foo):
# ...
didn't actually validate the foo argument, since the inferred type of
the argument is None, and that skipped all conversion (and thus
validation).
Fixes #1871
See #1885
This is a reworked version of 12061b8bb1
which lets special parameters (count/win_id/flags) through correctly.
2016-08-25 22:16:25 +02:00
knaggita
d26566a1f6
Validate loggernames passed to --logfilter
2016-08-24 18:56:18 +03:00
rmortens
384e3d1d88
Add change format for debug-log-level cmd
2016-08-24 08:40:11 -06:00
knaggita
0b60d28742
Validate loggernames passed to --logfilter
2016-08-24 17:09:34 +03:00
knaggita
cf1dc28214
Validate logger names passed to --logfilter
2016-08-24 16:12:32 +03:00
knaggita
848af2e294
Validation of logger names passed to --logfilter
2016-08-24 15:15:20 +03:00
Florian Bruhin
445d287955
Revert "Fix choices validation with unannotated args"
...
This reverts commit 12061b8bb1
.
2016-08-23 23:34:02 +02:00
Florian Bruhin
12061b8bb1
Fix choices validation with unannotated args
...
Something like:
@cmdutils.argument('foo', choices=['one', 'two'])
def func(foo):
# ...
didn't actually validate the foo argument, since the inferred type of
the argument is None, and that skipped all conversion (and thus
validation).
Fixes #1871
See #1885
2016-08-23 22:01:21 +02:00
Florian Bruhin
8643f6f28d
Add explicit else in :completion-item-focus
...
See #1885
2016-08-23 20:49:56 +02:00
Florian Bruhin
a17b8bec90
Don't treat "Hello." as URL with auto-search=naive
2016-08-23 09:02:39 +02:00
Jakub Klinkovský
1411c287c5
qute://settings: set valid type of <input> fields
...
fixes #1883
2016-08-22 21:09:57 +02:00
Marshall Lochbaum
44411e02c6
Replace != with (is not) when testing whether a model is new
2016-08-22 13:02:13 -04:00
Marshall Lochbaum
2aef26c58b
Linting
2016-08-21 23:22:46 -04:00
Marshall Lochbaum
cbecd48871
Refactor Completer/CompletionView interface, removing set_pattern()
2016-08-21 22:56:18 -04:00
Marshall Lochbaum
c5ca102d93
Fix completion flicker on quick-complete with show=auto
2016-08-20 01:01:12 -04:00
Marshall Lochbaum
08b348be50
Merge branch 'master' into auto-open-fixes
2016-08-19 22:50:26 -04:00
Florian Bruhin
fe11e25430
Ignore mouse events going to non-main widgets
...
When we hide the context menu on QtWebEngine, we get a mouse event
relative to the QMenu in the filter, which means tab.elements.at_pos
will get called with a negative position (and thus assert) or at least a
wrong position.
2016-08-19 18:38:07 +02:00
Florian Bruhin
bcb06f0cc6
Fix lint
2016-08-19 15:47:35 +02:00
Florian Bruhin
1cfadbf034
Fix / ? : bindings
...
This was broken in #1859 and I didn't notice...
2016-08-19 15:35:20 +02:00
Florian Bruhin
e074192cc4
Update docs
2016-08-19 15:27:56 +02:00
Florian Bruhin
7e3d1ccd24
Simplify :debug-log-filter implementation
2016-08-19 15:08:15 +02:00
Florian Bruhin
e1cd905163
Move :window-only below :debug-log-* in utilcmds
2016-08-19 15:06:08 +02:00
Florian Bruhin
71b0876188
Improve :debug-log-filter message
...
This changes the message so it resembles the default choices=... one,
and also changes the argument to "filters" because that sounds nicer as
a metavar.
2016-08-19 15:03:19 +02:00
Florian Bruhin
fd0965703e
Remove log.change_loglevel
2016-08-19 14:57:55 +02:00
Florian Bruhin
75c3b1a9f8
Fix test for :debug-log-level with invalid level
...
Since we're getting dictionary keys in choices=..., we need to sort them
so we get a consistent message.
2016-08-19 14:57:21 +02:00
knaggita
1d5a3a6175
Add :debug-loglevel :debug-logfilter commands
2016-08-19 14:12:19 +02:00
Florian Bruhin
d25fde4f29
Whoops...
2016-08-19 13:42:38 +02:00
Florian Bruhin
29cd878902
Fix lint
2016-08-19 13:40:21 +02:00
nanjekyejoannah
056c0c3c14
Make command keys configurable
...
Fixes #672
2016-08-19 13:40:21 +02:00
Florian Bruhin
8eb8039370
Merge branch 'rewrite-pP' of https://github.com/blyxxyz/qutebrowser into blyxxyz-rewrite-pP
2016-08-19 13:36:33 +02:00
Florian Bruhin
388d771a2e
Use send_event with postpone=True in webelem.click
...
For some reason, since 0557fea79e
we're
getting segfaults in misc.feature...
2016-08-19 10:23:10 +02:00
Florian Bruhin
4362d42c50
Add postpone argument to AbstractTab.send_event
2016-08-19 10:13:07 +02:00
Florian Bruhin
a846a5b89f
Move send_event to AbstractTab
...
This means subclasses only need to implement _event_target.
2016-08-19 10:12:57 +02:00
Florian Bruhin
a40dd7edf6
Allow empty string for tabs -> title-format
2016-08-19 08:31:36 +02:00
Florian Bruhin
8da942ddc7
bdd: Skip tests on WebEngine causing memory leaks
2016-08-18 22:46:32 +02:00
Florian Bruhin
0557fea79e
Use QApplication.sendEvent instead of postEvent
...
From the QApplication.postEvent docs:
http://doc.qt.io/qt-5/qcoreapplication.html#postEvent
The event must be allocated on the heap since the post event queue
will take ownership of the event and delete it once it has been
posted. It is not safe to access the event after it has been posted.
We can't reliably guarantee that from Python, so we need to use
sendEvent instead.
2016-08-18 21:36:43 +02:00
Florian Bruhin
ccc676c04f
Handle CommandError in show_source_cb
2016-08-18 19:32:16 +02:00
Jan Verbeek
b6c96855c8
Rewrite paste -s/pP
2016-08-18 19:05:35 +02:00
Florian Bruhin
c0ffcfc585
QtWebEngine: Make :fake-key work
2016-08-18 18:44:33 +02:00
Florian Bruhin
dfed2f9c9c
WebEngine: Don't save title if generated from URL
2016-08-18 18:05:48 +02:00
Florian Bruhin
2a0e503644
QtWebEngine: Don't raise CommandError with no hint
2016-08-18 17:47:05 +02:00
Florian Bruhin
205c12c530
Fix docs for :click-element
2016-08-18 16:58:56 +02:00
Florian Bruhin
927f378c6d
Fix eslint
2016-08-18 16:52:53 +02:00
Florian Bruhin
73210fb87c
QtWebEngine: Fix tab passed to WebEngineElement
2016-08-18 16:25:58 +02:00
Florian Bruhin
4345d60ff1
Revert "javascript.assemble: Support document module"
...
This reverts commit afc7faabda
.
This isn't actually needed as we can't use document.getElementById()
directly without serializing anyways.
2016-08-18 15:58:46 +02:00
Florian Bruhin
1956480164
Revert "Handle {} elements in elements._js_cb_single"
...
This reverts commit f59a9d37252599c8fbda4cc687bd9f094c6d05b9.
Since we're now using a webelem function, this isn't needed anymore.
2016-08-18 15:58:46 +02:00
Florian Bruhin
dbb3929bf3
QtWebEngine: Serialize element correctly (find_id)
2016-08-18 15:58:46 +02:00
Florian Bruhin
f98820971d
Handle {} elements in elements._js_cb_single
...
When using document.getElementById like in find_id, we can get {}
instead of null/None back when nothing was found.
2016-08-18 15:58:46 +02:00
Florian Bruhin
d9d14d4a4c
Fix lint
2016-08-18 15:58:46 +02:00
Florian Bruhin
e0af03db80
Add a default target for :click-element
2016-08-18 15:58:46 +02:00
Florian Bruhin
0cef4ac2db
Add a :click-element command
2016-08-18 15:30:04 +02:00
Florian Bruhin
28a6b3918c
Fix lint
2016-08-18 14:42:42 +02:00
Florian Bruhin
e851839973
Don't make HintActions a QObject
...
It probably still makes sense for HintManager to be one for the moment
though, as it's in the objreg.
2016-08-18 14:39:13 +02:00
Florian Bruhin
0d1ea0b93a
Add FIXME for webkitelem.focus_elem
2016-08-18 14:33:55 +02:00
Florian Bruhin
63c66945a4
Add webelem.click() and webelem.hover()
2016-08-18 14:32:19 +02:00
Florian Bruhin
5ac9fe9c32
Add tab.elem.find_id
2016-08-18 14:08:34 +02:00
Florian Bruhin
afc7faabda
javascript.assemble: Support document module
2016-08-18 14:07:21 +02:00
Florian Bruhin
2c6fe35398
Fix blank lines
2016-08-18 14:03:27 +02:00
Florian Bruhin
a0add7b66c
Get rid of tab.run_js_blocking
...
We had some trouble with it, and it's not actually needed.
2016-08-18 14:02:59 +02:00
Florian Bruhin
d3084dd690
Add a separate tab.elements object
2016-08-18 14:01:27 +02:00
Florian Bruhin
1ec59f3f0e
Add FIXME
2016-08-18 12:46:55 +02:00
Florian Bruhin
9226e3eece
QtWebEngine: Implement only_visible for find_all
2016-08-18 12:40:21 +02:00
Florian Bruhin
30029a8259
utils.javascript: Handle bools in _convert_js_arg
2016-08-18 12:40:21 +02:00
Florian Bruhin
b596c4da27
eslint: Enable long lines with URLs
2016-08-18 12:40:21 +02:00
Florian Bruhin
274fe58d6d
Simplify webelem.js
...
serialize_elem() now takes care of assigning IDs.
2016-08-18 12:40:21 +02:00
Florian Bruhin
0d35502e87
Use HintingError for all hinting errors
2016-08-18 12:40:21 +02:00
Florian Bruhin
eabac17c58
Combine hint signals into a single one
2016-08-18 12:40:21 +02:00
Florian Bruhin
39fd6a6062
QtWebEngine: Adjust hints according to zoom
2016-08-18 12:40:21 +02:00
Florian Bruhin
30f6afc2aa
Pass tab to WebEngineElement
2016-08-18 12:40:21 +02:00
Florian Bruhin
53e747d7ea
Disable download hints for QtWebEngine
2016-08-18 12:40:21 +02:00
Florian Bruhin
58d2d30e9a
Add initial hinting implementation
2016-08-18 12:40:21 +02:00
Florian Bruhin
1b3d693a5e
Add post_event to tab API
2016-08-18 12:40:21 +02:00
Florian Bruhin
6f24221c54
Replace WebElement.frame() by .has_frame()
2016-08-18 12:40:21 +02:00
Florian Bruhin
91b43c5cef
hints: Use tab API to move cursor for input fields
2016-08-18 12:40:21 +02:00
Florian Bruhin
62db0095d1
Revert "Make webelem.rect_on_view work async"
...
This reverts commit 4e11613d2df064b138532c18f88bbf278c64f347.
We can actually make this synchronous just fine by collecting that
information when searching for the elements...
2016-08-18 12:40:21 +02:00
Florian Bruhin
e6d6302958
Make webelem.rect_on_view work async
...
WebKitElement still has an internal sync version used for is_visible,
but hopefully we can get rid of that soon too.
2016-08-18 12:40:21 +02:00
Florian Bruhin
aba1556324
Remove old comment
2016-08-18 12:40:21 +02:00
Florian Bruhin
343b2d8385
Remove old FIXME
2016-08-18 12:40:21 +02:00
Florian Bruhin
15dcd5284c
Enable :hint for QtWebEngine
2016-08-18 12:40:21 +02:00
Florian Bruhin
8eaa387f21
Adjust default hint.bg gradient orientation
2016-08-17 21:00:13 +02:00
Florian Bruhin
52e47e0c3d
Add HintLabel.__repr__
2016-08-17 15:32:24 +02:00
Florian Bruhin
955ed2f52d
Simply connect HintLabel._move_to_elem to signal
2016-08-17 15:32:24 +02:00
Florian Bruhin
1d82ea8740
Remove logging in _on_contents_size_changed
...
Otherwise this will be logged once for every element.
2016-08-17 15:32:24 +02:00
Florian Bruhin
d87a255c0a
Don't fully clean up labels if their frame is gone
...
Otherwise they're invalid but still in the HintContext, so calling
.hide() on it later (e.g. because the user pressed another key) would
give us a RuntimeError from PyQt.
2016-08-17 15:32:24 +02:00
Florian Bruhin
0293307d61
Remove adjust_zoom for webelem.rect_on_view
...
Previously, the drawn hint labels were affected by the zoom, i.e., they
were stretched out by QtWebKit and actually had to be drawn at the
unzoomed position.
The Python/C++ API gives us coordinated adjusted for zoom, so
we always *negatively* adjusted them to get the unzoomed coordinates.
JS gave us the original coordinates, so we stretched them out according
to the zoom if adjust_zoom was given (which means only when clicking a
link).
Now we always operate in term of display coordinates: The point where we
draw the hint label is equal to the point we're clicking.
Thus, the zoom level for javascript is always adjusted, and the Python
zoom level is never (negatively) adjusted.
2016-08-17 14:51:05 +02:00
Florian Bruhin
7c17af3889
Use ${_monospace} for default hints font
2016-08-17 14:51:05 +02:00
Florian Bruhin
373eca1ad2
Fix some corner cases in _transform_hint_color
2016-08-17 14:51:05 +02:00
Florian Bruhin
eac30fc84b
Add styling of new hints
...
This also removes the hints -> opacity setting, as this is now set by
using an rgba(...) color.
2016-08-17 14:51:05 +02:00
Florian Bruhin
c033ed9edb
Allow config value transformers to give up
2016-08-17 14:51:04 +02:00
Florian Bruhin
9c3807c117
Store HintLabels (not ElemTuples) in HintManager
2016-08-17 14:44:49 +02:00
Florian Bruhin
cf7170a33b
Remove no longer needed webelem methods
...
The following methods were only used for hint labels and thus removed
now:
- document_element
- create_inside
- find_first
- set_inner_xml
- remove_from_document
- set_style_property
2016-08-17 14:44:49 +02:00
Florian Bruhin
1753d3507c
Use native QLabels for hints
...
This will make labels work easily with QtWebEngine, and make sure
they're not affected by the page's contents.
Fixes #925 .
Fixes #1126 .
2016-08-17 14:43:35 +02:00
Florian Bruhin
781e7554e4
Set open target for force_tab to tab-silent
...
Fixes #1328
2016-08-17 12:04:46 +02:00
Florian Bruhin
01fd7cd210
Merge branch 'issue1060' of https://github.com/haasn/qutebrowser into haasn-issue1060
2016-08-17 12:01:53 +02:00
Florian Bruhin
cc693f17ca
QtWebEngine: Use loadFinished as history trigger
...
Using urlChanged spams the history with too many entries...
Fixes #1837
2016-08-16 21:46:25 +02:00
Florian Bruhin
1dbedbc474
Fix :restart deleting the given --basedir
2016-08-16 21:27:23 +02:00
Florian Bruhin
87aa11de7f
Remove unused WebView._check_insertmode attribute
2016-08-16 19:57:43 +02:00
Florian Bruhin
1138d068e6
Move insert-mode-on-click to tab API / mouse.py
...
This also implements the feature for QtWebEngine.
2016-08-16 16:22:18 +02:00
Florian Bruhin
eef76dde86
eslint: Disable no-warning-comments
2016-08-16 15:21:37 +02:00
Florian Bruhin
6794187390
Fix too long line
2016-08-16 14:19:39 +02:00
Florian Bruhin
5d6abc6f67
Merge branch 'safe-args' of https://github.com/blyxxyz/qutebrowser into blyxxyz-safe-args
2016-08-16 14:18:44 +02:00
Florian Bruhin
dba579c202
Update user-agent completion list
2016-08-16 14:06:57 +02:00
Jan Verbeek
cfd166a95e
Merge https://github.com/The-Compiler/qutebrowser into safe-args
2016-08-16 14:05:04 +02:00
Jan Verbeek
096387897c
Make pp bindings work with option in clipboard
...
If the clipboard contains "-a" then "open {clipboard}" will fail because
-a gets parsed as an option. "open -- {clipboard}" doesn't do that. See
some comments in #1791 .
2016-08-16 14:00:37 +02:00
Florian Bruhin
f4b72d4b24
Revert "Revert "Handle counts for special keys.""
...
This reverts commit 2d5ffbfd02
.
2016-08-16 13:44:28 +02:00
Florian Bruhin
5ecef0004c
Add some docs for command replacements
2016-08-16 13:32:53 +02:00
Florian Bruhin
8d6b905f95
Merge branch 'insert-text' of https://github.com/blyxxyz/qutebrowser into blyxxyz-insert-text
2016-08-16 13:29:42 +02:00
Florian Bruhin
8e6d784fd7
Merge branch 'fix_hints_autofollow' of https://github.com/lahwaacz/qutebrowser into lahwaacz-fix_hints_autofollow
2016-08-16 12:58:56 +02:00
Niklas Haas
c2cc28a72b
Add new-instance-open-target.window = first-opened
...
Fixes #1060 .
In the process of adding this, I also decided to rewrite
mainwindow.get_window() for clarity (and also because flake8 was warning
about complexity).
Also adds some tests to the new-instance-target mechanism, in particular
a specific test for the issue in question.
2016-08-16 12:24:38 +02:00
Florian Bruhin
cf0b12b5a9
Merge branch 'var_replacements' of https://github.com/lahwaacz/qutebrowser into lahwaacz-var_replacements
2016-08-16 11:49:31 +02:00
Florian Bruhin
ee3ea739fc
Merge branch 'completion-category-focus' of https://github.com/rcorre/qutebrowser into rcorre-completion-category-focus
2016-08-16 11:45:23 +02:00
Florian Bruhin
91db564e1a
Fix lint
2016-08-16 11:36:55 +02:00
Florian Bruhin
d1138fa342
Update docs
2016-08-16 11:22:29 +02:00
Florian Bruhin
380856bcb2
Merge branch 'navigate-count' of https://github.com/pvsr/qutebrowser into pvsr-navigate-count
2016-08-16 11:21:07 +02:00
Florian Bruhin
882d1a5e88
Move :window-only to misc.utilcmds
2016-08-16 11:05:02 +02:00
Florian Bruhin
9d7d307aa5
Merge branch 'winonly' of https://github.com/haasn/qutebrowser into haasn-winonly
2016-08-16 11:02:49 +02:00
Florian Bruhin
ccce55443f
Fix TabWidget.init_config with PyQt 5.2
...
See #1847 , #1775
2016-08-16 10:44:53 +02:00
Peter Rice
67609af21b
resolve linter warnings
2016-08-15 22:53:28 -04:00
Peter Rice
060305279c
update navigate-related help and function docs
2016-08-15 22:28:25 -04:00
Peter Rice
d3e4d62d14
make navigate take counts for inc, dec, and up
2016-08-15 21:13:52 -04:00
Michael Hoang
c0ab474b21
Give error when trying to detach a single tab
2016-08-16 07:36:39 +10:00
Florian Bruhin
0cefcef8f3
Change user-stylesheet default
...
This shows scrollbars like the one in the code block here:
https://devtalk.nvidia.com/default/topic/918822/linux/hevc-main-10-profile-decoding-using-vdpau-unsupported-on-gtx-950-361-28-/
2016-08-15 18:00:18 +02:00
Ryan Roden-Corrent
7b3839b44b
Focus completion by category.
...
Implement `completion-item-focus next-category` and
`completion-item-focus prev-category` to jump through completions by
category rather than by item.
Resolves #1567 .
2016-08-15 07:14:28 -04:00
Jakub Klinkovský
befaf4f6dc
fix nested expansion of {variables} in command args
2016-08-14 15:29:16 +02:00
Florian Bruhin
e7d08db6c3
eslint: Turn off sort-keys
2016-08-12 20:58:20 +02:00
Niklas Haas
d5080bdb1a
Add :window-only command
...
I mainly added this so I can speed up all of the tests that rely on
closing other windows.
2016-08-11 23:37:14 +02:00
Florian Bruhin
9c67e87c37
Merge branch 'keyinput' of https://github.com/lahwaacz/qutebrowser into lahwaacz-keyinput
2016-08-11 19:46:30 +02:00
Jakub Klinkovský
0e35983362
fix lint ('line too long')
2016-08-11 19:15:26 +02:00
Florian Bruhin
af5d166ae1
QtWebEngine: Fix error message with :print --pdf
2016-08-11 19:13:45 +02:00
Florian Bruhin
fb07655e56
Move input -> rocker-gestures to MouseEventFilter
2016-08-11 18:51:51 +02:00
Florian Bruhin
e8980d01e6
MouseEventFilter: Don't pass obj to handlers
2016-08-11 18:51:50 +02:00
Florian Bruhin
9195e6a3a7
Fix :follow-selected --tab
2016-08-11 17:50:19 +02:00
Jakub Klinkovský
567fe0ec10
keyinput: don't emit keystring_updated twice when clearing
2016-08-11 17:48:43 +02:00
Florian Bruhin
59faee8518
Don't return page from WebView._init_page
...
We don't need to refer to it anymore.
2016-08-11 16:48:27 +02:00
Florian Bruhin
d6a3134b3e
Remove unused imports
2016-08-11 16:38:45 +02:00
Florian Bruhin
ad1e1e5f92
Log is_main_frame in acceptNavigationRequest
2016-08-11 16:36:41 +02:00
Florian Bruhin
421b14681f
Move HintManager out of WebView
...
This moves creating the HintManager to AbstractTab, and lets
TabData (which is now a QObject) handle the start_hinting/end_hinting
signal.
For the mouse_event signal of HintManager, we now have a slot in
AbstractTab too, though that might actually be moved to
WebKitTab/WebEngineTab later when needed.
2016-08-11 16:30:55 +02:00
Jakub Klinkovský
9f8b5dad92
simplify <Escape> binding
...
Note that leave-mode implies clear-keychain since bf0fe3c
.
2016-08-11 16:11:13 +02:00
Florian Bruhin
3bffb71b55
QtWebEngine: Implement mouse opentarget handling
...
This moves various stuff around and out of QtWebKit code:
- open_target and hint_target are now in TabData, not on the WebPage
- As much as possible got extracted from WebPage.acceptNavigationRequest
to AbstractTab._on_link_clicked, with a new link_clicked signal added
to WebPage. However, we need to decide whether to handle the request
in this tab or not inside acceptNavigationRequest, so we have some
code duplicated there and in WebEnginePage.acceptNavigationRequest.
- _mousepress_opentarget (i.e., setting the open_target) is now handled
in MouseEventFilter, not in WebView.
2016-08-11 16:09:59 +02:00
Jakub Klinkovský
55a00ab2cf
emit keystring_updated iff necessary
2016-08-11 15:57:46 +02:00
Jakub Klinkovský
bf0fe3c43b
clear keychain properly
...
fixes #1805
2016-08-11 15:45:44 +02:00
Florian Bruhin
8b0028cb87
Add FIXME
2016-08-11 14:55:19 +02:00
Florian Bruhin
1a94cb551c
Move mouse wheel zooming to MouseEventHandler
2016-08-11 13:50:06 +02:00
Florian Bruhin
677bb29251
Document event filter attributes
2016-08-11 13:38:20 +02:00
Florian Bruhin
b50ab37bbc
Merge branch 'fix/undo-tab-detach' of https://github.com/airodactyl/qutebrowser into airodactyl-fix/undo-tab-detach
2016-08-11 13:04:31 +02:00
Florian Bruhin
a23f3a24b3
scroll.js: Use window.inner{Width,Height}
...
It seems with document.documentElement.client{Height,Width} we
sometimes (e.g. without <!DOCTYPE html)...) get the full element height
instead of the viewport height.
Fixes #1821 .
2016-08-11 11:57:20 +02:00
Michael Hoang
ed137c01aa
Make add_undo for tab close a keyword arg
2016-08-11 15:18:07 +10:00
Michael Hoang
af97f9efae
Add add_undo parameter for closing tabs
...
By default, closed tabs should be undoable, but when a tab is detached
:undo should not reopen that tab in the old window.
2016-08-11 07:44:11 +10:00
Jan Verbeek
d2d92c9f2e
Fix docstring
2016-08-10 22:29:19 +02:00
Jan Verbeek
4966debd61
Deprecate :paste-primary to :insert-text {primary}
2016-08-10 21:55:16 +02:00
Florian Bruhin
e7584b9e1e
scroll.js: Add commented debug output
2016-08-10 21:44:16 +02:00
Jan Verbeek
db0f8fffcd
Merge https://github.com/The-Compiler/qutebrowser into insert-text
2016-08-10 20:54:54 +02:00
Florian Bruhin
57896dc00e
Merge branch 'clip' of https://github.com/blyxxyz/qutebrowser into blyxxyz-clip
2016-08-10 20:38:54 +02:00
Florian Bruhin
b801d3316d
Fix lint
2016-08-10 20:23:41 +02:00
Florian Bruhin
08d9243c3e
Merge branch 'haasn-lastvisible'
2016-08-10 19:58:41 +02:00
Florian Bruhin
64afc562b6
Install MouseEventFilter on new WebEngine children
...
For some reason, when e.g. visiting duckduckgo and then heise.de,
QtWebEngine suddenly gets a new QOpenGLWidget as focusProxy.
We install an extra eventFilter observing the ChildAdded event and
re-adding the MouseEventFilter when that happens.
2016-08-10 19:44:06 +02:00
Jakub Klinkovský
cdcc9996a0
hints: remove unused context attribute and duplicate initialization
2016-08-10 19:37:01 +02:00
Jakub Klinkovský
58ded41e5d
hints: move _filterstr into _context
2016-08-10 18:48:10 +02:00
Jakub Klinkovský
efb680dfb1
hints: make HintManager.fire private
...
It's not called by other classes anymore, it shouldn't be part of public
API because wrong value to the keystr parameter causes KeyError.
2016-08-10 18:21:19 +02:00
Florian Bruhin
3b34032b4b
Merge branch 'feature/undo-to-old-pos' of https://github.com/airodactyl/qutebrowser into airodactyl-feature/undo-to-old-pos
2016-08-10 17:47:25 +02:00
Florian Bruhin
7213850238
Merge branch 'lastvisible' of https://github.com/haasn/qutebrowser into haasn-lastvisible
2016-08-10 17:39:33 +02:00
Florian Bruhin
29b778b6d6
Use javascript.assemble for all functions
2016-08-10 17:27:34 +02:00
Niklas Haas
6293fad2eb
Add general->new-instance-open-target.window=last-visible
...
I usually use my browser with a one-window-per-workspace flow. If I
click on a URL anywhere, I personally would prefer it to go to the
browser instance that's on the same workspace.
To this end, the easiest way to accomplish this is to simply track when
windows are made visible and register them as the last visible object.
(To get finer control for when you have multiple windows on the same
workspace, focus changes also update the last visible object - the
implication being here that focusing something also means you're looking
at it)
Not all users may like this behavior, so I consider it strictly optional.
2016-08-10 17:01:12 +02:00
Florian Bruhin
c0c3fb47dd
Merge branch 'buffer_idx_completion' of https://github.com/rcorre/qutebrowser into rcorre-buffer_idx_completion
2016-08-10 16:57:51 +02:00
Florian Bruhin
f908d29a5f
Move mouse handling to an EventFilter
2016-08-10 16:44:40 +02:00
Ryan Roden-Corrent
1de465f42b
Filter buffer completion by all columns.
...
In addition to the url and text column, also filter by the index column
so the user can enter a number to navigate to that tab.
Resolves #1830 .
2016-08-10 10:20:04 -04:00
Jakub Klinkovský
24f8ed8ac1
hints: refactor auto-follow handling in the fire method
2016-08-10 16:09:37 +02:00
Florian Bruhin
85a4dc808e
Add "# pragma: no cover" for ImportError
2016-08-10 15:57:01 +02:00
Florian Bruhin
b380b2f5be
Try another objreg fix
2016-08-10 15:47:50 +02:00
Florian Bruhin
b337578274
QtWebEngine: Allow general->log-javascript-console
2016-08-10 15:44:47 +02:00
Florian Bruhin
f3c32308d3
Merge branch 'complete-hidden-commands' of https://github.com/rcorre/qutebrowser into rcorre-complete-hidden-commands
2016-08-10 15:38:46 +02:00
Florian Bruhin
b488d7f9fd
Make QtWebKit optional in utils.version
2016-08-10 15:05:15 +02:00
Florian Bruhin
5b2ae3cec7
Don't inherit AbstractWebInspector from QtWebKit
2016-08-10 14:55:50 +02:00
Florian Bruhin
33193d7dd4
Split up QtWebKit specific part in browser.history
2016-08-10 14:51:29 +02:00
Florian Bruhin
ad5008152c
Move browser.webkit.history to browser.history
2016-08-10 14:45:52 +02:00
Florian Bruhin
f6d4e0d32c
Try working around AttributeError in objreg
2016-08-10 13:58:41 +02:00
Florian Bruhin
393178262e
Add history support for QtWebEngine
2016-08-10 13:15:34 +02:00
Florian Bruhin
77531d09df
Move history triggering out of WebView
2016-08-10 13:14:38 +02:00
Florian Bruhin
eed3460317
Add tab.url(requested=True) to get original URL
2016-08-10 13:14:07 +02:00
Jakub Klinkovský
0d4322b1f2
fix braces in boolean assignments
2016-08-10 13:01:41 +02:00
Ryan Roden-Corrent
0c43ca9f09
Don't sort command completions in models.
...
The sortfilter already handles sorting, there is no reason to pre-sort
the entries in the model.
2016-08-10 06:58:34 -04:00
Ryan Roden-Corrent
97a971624b
Show bindings for aliases in completion.
...
Command completions for `:bind` and `:` will now show bindings for
aliases. The binding is only included if it is bound to that alias, not
if it is bound to the command the alias points to.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
051a00804b
Use regular dict in get_reverse_bindings_for.
...
Returning a defaultdict made the caller's code look confusing, as it
wasn't clear why there wouldn't be a Keyerror in some cases. Instead,
let the caller explicitly use `get`.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
709470fbe6
Clean up miscmodels and test_models.
...
- Split up a long conditional into multiple variables.
- Fix a small typo in a related test.
- Remove a trailing comma from an argument list.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
8dbc368d08
Refactor duplicate code for command completion.
...
Consolidate the logic used to generate the command completion category
into one place. This is shared by CommandCompletionModel,
HelpCompletionModel, and BindCompletionModel.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
0ea61d5f15
Show hidden commands in completion for :bind.
...
There is a fair amount of duplicate code around command completion that
could probably be refactored.
Resolves #1707 .
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
dd9470af94
Show hidden commands in help completion.
...
Hidden commands are not shown in command completion as they typically
would not be run directly. However, a user might still might like to see
help for them if, for example, they are writing a script or creating a
binding.
Addresses #1707 .
2016-08-10 06:55:46 -04:00
Jakub Klinkovský
a31565f46e
hints: make auto-follow a quadruple option instead of binary
2016-08-10 12:40:16 +02:00
Jan Verbeek
63b9b61e75
Add ClipboardError superexception
2016-08-10 12:33:01 +02:00
Michael Hoang
cc5667f268
Add code to save and restore the old tab position
2016-08-10 19:28:34 +10:00
Jakub Klinkovský
7be942fadc
hints: fix leaving filter in number mode
2016-08-10 11:18:11 +02:00
Florian Bruhin
a734a324ed
Merge branch 'hinttags' of https://github.com/haasn/qutebrowser into haasn-hinttags
2016-08-10 09:52:35 +02:00
Florian Bruhin
bf29c2a753
Import keyconf at file scope again in config.py
...
Various code (like src2asciidoc.py) relies on all @cmdutils.register
decorators being called when qutebrowser.app is imported.
Moving the keyconf import to _init_key_config broke that assumption, as
keyconf isn't imported anywhere anymore - which caused :bind and :unbind
to vanish from the generated documentation.
In the long run we should perhaps use venusian:
http://docs.pylonsproject.org/projects/venusian/
But for now, this is the easiest solution.
2016-08-10 09:40:38 +02:00
Florian Bruhin
cc0579bd1a
Merge branch 'bind-alias' of https://github.com/rcorre/qutebrowser into rcorre-bind-alias
2016-08-10 09:35:28 +02:00
Florian Bruhin
a24391d40d
Fix lint
2016-08-10 09:20:30 +02:00
Florian Bruhin
153b9db8c2
Fix new-instance-open-target.window valid_values
2016-08-10 09:11:26 +02:00
Florian Bruhin
61c031ff23
Merge branch 'lastfocus' of https://github.com/haasn/qutebrowser into haasn-lastfocus
2016-08-10 09:09:58 +02:00
Florian Bruhin
26af2b3089
Fix grammar mistake
2016-08-10 08:48:04 +02:00
Florian Bruhin
dfd58d456a
Merge branch 'pythonoptimize-fix' of https://github.com/lejenome/qutebrowser into lejenome-pythonoptimize-fix
2016-08-10 08:47:34 +02:00
Ryan Roden-Corrent
30d2403b7f
Avoid config/keyconf circular import.
2016-08-09 21:37:12 -04:00
Ryan Roden-Corrent
91ec5cc356
Update command completion on setting an alias.
...
Wire up the config change event to update command completion on
changing aliases, so the new aliases will be included.
Fixes #1814 .
Currently we do not have tests at a high enough level to test whether
signals are wired up correctly to update completions.
2016-08-09 21:37:12 -04:00
Ryan Roden-Corrent
245212efa1
Allow binding to an alias.
...
Fix #1813 : Cannot :bind to alias
2016-08-09 21:37:12 -04:00
Niklas Haas
e0f069f7ca
Extract hint tags from <textarea>
...
This is similar to <input> and also often uses a placeholder or name to
identify itself.
2016-08-10 02:07:33 +02:00
Niklas Haas
6d181e5c6f
Add new-instance-open-target.window setting
...
This adds the ability to open new tabs in the last-focused window
instead, which fixes #1801 .
Right now the only other option is probably not that useful for human
users but it's required to make tests behave deterministically and
consistently. (But with #881 on the roadmap, I would implement this as
another choice)
To this end, also make the test framework set this option to preserve
the invariant against which existing tests are written: that spawning a
new window would effectively also focus it.
2016-08-10 00:06:12 +02:00
Niklas Haas
2223a285ef
Remove ui -> hide-mouse-cursor setting
...
This was currently almost completely broken, yet nobody complained. The
new behavior (in the previous commit) makes this always hide the mouse
cursor, even when an input field has focus.
Since the only two easy options to implement are "never hide" and
"always hide", combined with the fact that both are sort of useless to
an end-user, just remove the option until somebody wants it back.
2016-08-09 23:32:17 +02:00
Niklas Haas
16c2268d09
Fix last-focused-main-window's behavior
...
Right now, get('last-focused-main-window') essentially returns the same
as qApp.activeWindow(), since it's None when no window is focused. This
seems somewhat contrary to its original intent, so I've changed it to
only ever update the object.
This actually fixes another bug as well: on_focus_changed's new is not
always a MainWindow - in fact it's a WebView on my end. To fix this,
directly use the QApplication.activeWindow() to find the current focus.
That second bit in particular actually some related bugs that probably
nobody ever noticed or bothered reporting:
* _maybe_hide_mouse_cursor currently pretty much never gets called
* :adblock-update doesn't actually show any downloads
* ... probably more
2016-08-09 22:41:40 +02:00
Jan Verbeek
7d0064ff86
Fix docstrings
2016-08-09 19:23:38 +02:00
Marshall Lochbaum
8da8441623
Merge auto-open option into show
2016-08-09 13:11:32 -04:00
Marshall Lochbaum
d98c81c9d6
Correct widget behavior when there is no completion
2016-08-09 13:03:38 -04:00
Jakub Klinkovský
108d735e07
hints: fix corner-case in _hint_strings
2016-08-09 18:12:07 +02:00
Jakub Klinkovský
ec5387c674
hints: fix docstrings
2016-08-09 18:09:50 +02:00
Jakub Klinkovský
9841b01d0d
hints: generalize auto-follow for any unique match
...
fixes #1809
2016-08-09 18:09:50 +02:00
Jakub Klinkovský
1d2a34812b
hints: refactor handling of auto-follow option
2016-08-09 18:09:50 +02:00
Jakub Klinkovský
cdcde09b80
hints: refactor filter_hints method
2016-08-09 18:09:47 +02:00
Florian Bruhin
fb3da578c5
Fix lint
2016-08-09 17:28:14 +02:00
Florian Bruhin
809f8e90df
Merge branch 'fix_hiding_hints' of https://github.com/lahwaacz/qutebrowser into lahwaacz-fix_hiding_hints
2016-08-09 16:42:11 +02:00
Jan Verbeek
7e634a1e52
Make vars declarative, new function for URL lists
2016-08-09 16:20:02 +02:00
Florian Bruhin
5066606ddc
Remove spaces inside docstrings
2016-08-09 16:15:23 +02:00
Florian Bruhin
13f80e3f63
Merge branch 'hintmodes' of https://github.com/haasn/qutebrowser into haasn-hintmodes
2016-08-09 16:14:07 +02:00
Florian Bruhin
fefea4944a
QtWebEngine: Make :open-editor work
2016-08-09 16:00:59 +02:00
Florian Bruhin
ca67e2be3c
QtWebEngine js: Get rid of webelem.get_element()
...
Let's do separate JS functions instead so we can easily access them via
utils.javascript.assemble.
2016-08-09 16:00:20 +02:00
Florian Bruhin
1e5b6caa4b
QtWebEngine js: Save element in focus_element()
2016-08-09 15:59:57 +02:00
Niklas Haas
62e58c0ab9
Add a --mode flag to :hints
...
This allows a specific keybinding, for whatever reason, to override the
default mode. Examples of when this could be useful:
* :hint --rapid --mode=word (to type them more rapidly)
* :hint --mode=letter input (if the default mode is number)
Also reword the description of 'group' to make the distinction between
'group' and 'mode' clearer.
2016-08-09 15:34:13 +02:00
Florian Bruhin
9f770adc78
Lower-case WebEngineElement.tag_name() correctly
2016-08-09 15:19:57 +02:00
Jan Verbeek
8e4733f483
Merge https://github.com/The-Compiler/qutebrowser into clip
2016-08-09 14:36:01 +02:00
Florian Bruhin
c0a407235c
Remove unused import
2016-08-09 13:51:18 +02:00
Florian Bruhin
b82823d76a
js: Don't leak to global ns in position_caret.js
2016-08-09 13:36:46 +02:00
Florian Bruhin
1307d8e9a2
Simplify utils.javascript.assemble
2016-08-09 13:21:44 +02:00
Florian Bruhin
4046615b37
WebEngineScroller: Set position to (0,0) initially
...
Since we now use QWebEngineScript, we can't easily know when the script
finished running and we can access window._qutebrowser.scroll.
We instead assume the initial position (if we don't get a
scrollPositionChanged) will always be (0, 0), and explicitly set it
to (None, None) (displaying ???) if we can't connect that signal.
2016-08-09 13:18:33 +02:00
Florian Bruhin
6b7a39685e
Modularize javascript code
...
We now load the JS code as a QWebEngineScript, which sets up
window._qutebrowser with various "modules". That means we don't have to
pass the whole module every time we want to execute something.
2016-08-09 13:17:44 +02:00
Florian Bruhin
1d9113124b
Move .eslintrc to qutebrowser/javascript
2016-08-09 11:04:50 +02:00
Jakub Klinkovský
7271955c56
make hiding unmatched rapid hints configurable
2016-08-09 11:01:58 +02:00
Florian Bruhin
4da53480c2
Re-enable and reconfigure eslint
2016-08-09 11:00:26 +02:00
Florian Bruhin
80016006c4
Use and enforce "use strict"; for JS
2016-08-09 09:55:14 +02:00
Florian Bruhin
c3690bce0d
Merge branch 'hinttags' of https://github.com/haasn/qutebrowser into haasn-hinttags
2016-08-09 08:43:32 +02:00
Marshall Lochbaum
b2067ef186
Remove unused _signals_connected
2016-08-08 18:15:13 -04:00
Marshall Lochbaum
80db69904d
Move auto-open handling to CompletionView from Completer
2016-08-08 16:56:11 -04:00
Florian Bruhin
9fc44e54a4
Fix long line
2016-08-08 19:56:11 +02:00
Jakub Klinkovský
1819b46fe0
suppress hiding hints in rapid mode
...
fixes #1799
2016-08-08 18:41:25 +02:00
addictedtoflames
b750d93891
add time units to timeout descriptions
...
Changed the description for the 'hints/auto-follow-timeout', 'input/timeout' and 'input/partial-timeout' settings to specify that the time should be given in milliseconds
2016-08-08 17:32:41 +01:00
Niklas Haas
6e279f1b1e
Extract hint tags from <button> text
...
This is useful for some styled buttons, including some of those found on
GitHub.
2016-08-08 17:49:35 +02:00
Niklas Haas
cf26201e86
Extract hint tags from <input placeholder="text">
...
This is useful for very many input fields, especially prominent on
GitHub itself.
2016-08-08 17:49:18 +02:00
Florian Bruhin
af8302b678
Remove unused import
2016-08-08 16:32:23 +02:00
Florian Bruhin
9a17591fb7
Start getting :open-editor to work with WebEngine
...
It doesn't actually work yet (as it claims the field is not editable),
but at least does not crash when the backend limitation for the command
is removed.
2016-08-08 16:24:34 +02:00
Florian Bruhin
9d43becc25
Merge branch 'completion-item-focus' of https://github.com/rcorre/qutebrowser into rcorre-completion-item-focus
2016-08-08 15:21:35 +02:00
Florian Bruhin
3c573ac187
Fix upper-case tag names for WordHinter
2016-08-08 15:13:30 +02:00
Florian Bruhin
b8e2d5f8f6
Add initial WebEngineElement implementation
...
This allows :navigate prev/next to work correctly via the javascript
bridge.
2016-08-08 15:02:58 +02:00
Florian Bruhin
1c73751fd9
Always lowercase tagName
2016-08-08 14:11:01 +02:00
Florian Bruhin
9bcce37ff3
WebEngine: Allow :navigate up/decrement/increment
2016-08-08 14:09:28 +02:00
Florian Bruhin
0b16a36120
Clean up handling of focus element
...
Also fixes #1359 .
2016-08-08 14:05:30 +02:00
Florian Bruhin
27330bd4d1
Fix :search-prev with QtWebEngine
...
Fixes #1797
2016-08-08 13:51:42 +02:00
Ryan Roden-Corrent
7038db6b17
Combine completion-item-{prev,next}.
...
- Use a single command completion-item-focus with a next/prev argument.
- Add a rule to translate old configs.
- Regenerate the docs.
See #1095 .
2016-08-08 07:37:53 -04:00
Florian Bruhin
dfbadaf7c2
Split WebElementWrapper into abstract/webkit parts
2016-08-08 13:04:53 +02:00
Moez Bouhlel
c04adb94b2
DocstringParser - support python with optimizations on
2016-08-08 10:01:50 +01:00
Florian Bruhin
734216bc40
Merge branch 'title_change' of https://github.com/blyxxyz/qutebrowser into blyxxyz-title_change
2016-08-08 09:41:29 +02:00
Florian Bruhin
64566fff35
Set maximum value for auto-save-interval correctly
2016-08-08 08:47:21 +02:00
Florian Bruhin
627f743c26
Handle float in _convert_js_arg
...
This fixes 'gg' with QtWebEngine.
2016-08-08 08:04:55 +02:00
Jan Verbeek
6bbde59de7
Rebuild buffer completion when tab title changes
2016-08-07 16:15:24 +02:00
Jan Verbeek
864c95007f
Unhide :insert-text and allow outside insert mode
...
:insert-text works if a text element is focused, even outside insert
mode.
2016-08-07 14:29:52 +02:00
Jan Verbeek
ebfe23c376
Merge https://github.com/The-Compiler/qutebrowser into clip
...
Also make it possible to use multiple variables in one argument.
2016-08-07 13:14:46 +02:00
Florian Bruhin
96087bd554
Fix up pretty URL yanking
2016-08-07 11:40:26 +02:00
Florian Bruhin
b6fbd3ce3a
Merge branch 'better-variables' of https://github.com/blyxxyz/qutebrowser into blyxxyz-better-variables
2016-08-07 11:33:01 +02:00
Florian Bruhin
26e0383d45
Merge branch 'refactor_command_completion' of https://github.com/rcorre/qutebrowser into rcorre-refactor_command_completion
2016-08-07 11:29:50 +02:00
Florian Bruhin
eb2f682e20
Merge branch 'fix-windows-editor' of https://github.com/Kingdread/qutebrowser into Kingdread-fix-windows-editor
2016-08-07 11:17:21 +02:00
Florian Bruhin
1b3664d9c8
keyconfig: Validate commands *after* transforming
...
Otherwise we'd still get an error when e.g. transforming :yank-selected
to :yank selection as :yank-selected got removed.
2016-08-07 11:10:59 +02:00
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