Commit Graph

9623 Commits

Author SHA1 Message Date
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
5fc8d57958 Merge branch 'rcorre-bind-alias' 2016-08-10 09:43:11 +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
7c5d0eea44 Update changelog 2016-08-10 09:38:17 +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
9aa6c8cf36 Automatically terminate quteproc_new after a test
This means we don't get a QProcess message because of test_no_loglines
not sending :quit, and we don't need to do so in test_ascii_locale as
there's nothing we need to wait for.
2016-08-10 09:30:24 +02:00
Florian Bruhin
a24391d40d Fix lint 2016-08-10 09:20:30 +02:00
Florian Bruhin
b025ea9da2 Merge branch 'haasn-lastfocus' 2016-08-10 09:13:50 +02:00
Florian Bruhin
4576fd9840 Update docs 2016-08-10 09:13:35 +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
15b9e4d2bd Merge branch 'lejenome-pythonoptimize-fix' 2016-08-10 09:05:36 +02:00
Florian Bruhin
f0b3d03072 Regenerate authors 2016-08-10 09:05:30 +02:00
Florian Bruhin
f0133624bf Add some tests for -OO logging 2016-08-10 09:05:04 +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
Florian Bruhin
c54f1fe1bb test requirements: Update pytest-xvfb to 0.2.1
This uses /tmp as hardcoded temp dir like X11 does.
2016-08-09 22:11:45 +02:00
Florian Bruhin
3b8189d638 test requirements: Update pytest-repeat to 0.4.0
Fix deprecation warning present in pytest 3.0 for type argument in addoption
2016-08-09 20:53:37 +02:00
Jan Verbeek
7d0064ff86 Fix docstrings 2016-08-09 19:23:38 +02: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
2cbb147e33 tox: Get flake8 to run again
Seems like when not passing a file path, flake8 does less (or nothing?!)
2016-08-09 17:12:42 +02:00
Florian Bruhin
1980dbb529 Merge branch 'lahwaacz-fix_hiding_hints' 2016-08-09 16:45:23 +02:00
Florian Bruhin
cf519bd528 Update docs 2016-08-09 16:44:00 +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
513a02b545 Merge branch 'haasn-hintmodes' 2016-08-09 16:16:09 +02:00
Florian Bruhin
5066606ddc Remove spaces inside docstrings 2016-08-09 16:15:23 +02:00
Florian Bruhin
6f074049c2 Update docs 2016-08-09 16:14:58 +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
Florian Bruhin
2d48a8013f tests: Don't set ssl-strict with QtWebEngine 2016-08-09 15:13:26 +02:00
Jan Verbeek
8e4733f483 Merge https://github.com/The-Compiler/qutebrowser into clip 2016-08-09 14:36:01 +02:00
Florian Bruhin
c8d39e8934 tox: Fix vulture environment
We set PYTHONPATH so we can import qutebrowser.app in run_vulture.py
without installing it.

We also need to make sure all dependencies are installed so we can
actually import qutebrowser.
2016-08-09 13:54:54 +02:00
Florian Bruhin
c0a407235c Remove unused import 2016-08-09 13:51:18 +02:00