Commit Graph

297 Commits

Author SHA1 Message Date
Jakub Klinkovský
82da79d05a Renumber hints when filtering in numeric mode
(addresses #308)
2016-06-07 13:07:56 +02:00
Jakub Klinkovský
9d20280573 Save the filter string in HintManager
This allows restoring the filter during rapid hinting in numeric mode (addresses #576)
2016-06-07 11:57:31 +02:00
Jakub Klinkovský
6e494605dd Add timeout after auto-followed hint 2016-06-07 10:30:08 +02:00
Florian Bruhin
10630e30ab hints: Integrate _get_first_rectangle into webelem 2016-06-06 11:56:15 +02:00
Florian Bruhin
b262580b22 Fix hint position when zoom is used 2016-06-06 10:41:59 +02:00
Florian Bruhin
0e4dbd646c Merge branch 'hints_positioning' of https://github.com/lahwaacz/qutebrowser into lahwaacz-hints_positioning 2016-06-06 10:22:06 +02:00
Ryan Roden-Corrent
68faf2b873 Allow hint --rapid in normal mode.
This was disallowed by an assertion, but has a legitimate use case for
clicking multiple buttons or ticking multiple checkboxes.

Resolves #1541.
2016-06-04 15:32:58 -04:00
Florian Bruhin
a39c662633 Merge branch 'hint_spawn_fix' of https://github.com/rcorre/qutebrowser into rcorre-hint_spawn_fix 2016-05-30 16:09:28 +02:00
Florian Bruhin
afcb018ee2 Fix some spelling mistakes
Found via http://jwilk.net/software/mwic
2016-05-27 12:07:00 +02:00
Ryan Roden-Corrent
f025394e04 Set maxsplit=2 for :hint.
This supports things like :hint all spawn -v echo as '-v echo' will be
passed as a single unit to spawn rather than -v being interpreted as a
flag for :hint.

Resolves #797.

Note that, while `:hint --rapid all spawn -v` echo works,
`:hint all --rapid spawn -v echo` does not (this did not work before
either).
2016-05-20 22:11:58 -04:00
Ryan Roden-Corrent
0300f03ebc Allow passing args to spawn from :hint.
Instead of creating a new guiprocess manually, just pass the args along
to the spawn command so it can accept args like -v.

Addresses part of #797 by allowing `hint -- all spawn -v echo`.
`hint all spawn -v echo` is still not supported.
2016-05-20 22:11:58 -04:00
Jakub Klinkovský
c919fcba35 hints: position according to getClientRects() 2016-05-20 21:26:29 +02:00
Jakub Klinkovský
4c06e34074 hints: change click position to the center of the largest square fitting to the top/left corner of the rectangle 2016-05-20 21:26:29 +02:00
Florian Bruhin
ea1f46d542 Merge branch 'hints_clicking' of https://github.com/lahwaacz/qutebrowser into lahwaacz-hints_clicking 2016-05-20 17:09:16 +02:00
Florian Bruhin
2c42219b23 Don't autofollow hint when unfiltering w/ rapid
When we are in rapid mode with only one link, after following the hint, fire()
called filter_hints(None) to display all hints again. Then filter_hints tried
to follow that link, fire() tried to show all again, etc., leading to a
RecursionError.

Fixes #1513.

A test will be added via #1510.
2016-05-20 16:41:51 +02:00
Florian Bruhin
35135c4b0d Use @cmdutils.argument for win_id/count 2016-05-18 06:55:17 +02:00
Florian Bruhin
73fbfb9731 Replace 'nargs' annotation by star_args_optional
Before we used a {'nargs': '*'} annotation for the respective argument
to tell qutebrowser it's optional for the commandline. Now we instead
use a star_args_optional argument for @cmdutils.register as a first step
towards freeing up argument annotations for PEP 484.

See #637.
2016-05-09 22:49:24 +02:00
Florian Bruhin
89c7b0e7f8 Simplify if-statement 2016-05-08 22:18:14 +02:00
Florian Bruhin
b9b6f357da Add utils.supports_selection() 2016-05-08 22:06:59 +02:00
Florian Bruhin
3e6ac28c66 Fix ;Y on systems not supporting primary selection
Instead we paste clipboard like we already do with some other commands
when primary selection is not supported.

Fixes #1336
2016-05-08 21:59:25 +02:00
Florian Bruhin
b5aad7d1b9 Merge branch 'issue-1393' of https://github.com/NoctuaNivalis/qutebrowser into NoctuaNivalis-issue-1393 2016-04-30 14:06:54 +02:00
Florian Bruhin
2a343cb3a1 Various code style improvements 2016-04-27 20:25:27 +02:00
Felix Van der Jeugt
b7ba3cd53e fix flake and pep remarks 2016-04-26 22:52:29 +02:00
Felix Van der Jeugt
2d71c541c6 allow swapping dict at runtime 2016-04-26 22:52:29 +02:00
Felix Van der Jeugt
fdb630555d make robust against short dicts 2016-04-26 22:52:29 +02:00
Felix Van der Jeugt
fe4800b68f prevent words from the dictionary prefixing smart hints 2016-04-26 22:52:29 +02:00
Ryan Roden-Corrent
0755e163bb Only set the ' mark on normal/current hinting.
Don't set ' for downloading, hovering, or opening a link in a tab.
2016-04-19 21:18:20 -04:00
Ryan Roden-Corrent
540f4af225 Set the ' mark after following a link.
This moves mark storage from CommandDispatcher to TabbedBrowser, so it can also
be accessed by the HintManager.
2016-04-17 21:04:08 -04:00
Jakub Klinkovský
3265601eab Merge remote-tracking branch 'upstream/master' into hints_clicking
* upstream/master: (327 commits)
  Remove unused import
  tox: Update Werkzeug to 0.11.8
  Regenerate authors
  Use __file__ instead of sys.argv[0]
  Regenerate authors
  Make update_3rdparty.py install correctly when run from any directory
  Open command line urls explicitly.
  tox: Update Werkzeug to 0.11.6
  Move qutebrowser.rcc to misc/
  Regenerate resources
  Fix CHANGELOG/link in README
  New qutebrowser logo!
  www: Add releases link
  Release v0.6.1
  release checklist: Clarify how to build on Windows
  Make sure the cheatsheet PNG is included in sdist
  Fix cheatsheet link URL in quickstart
  Mark segfault on exit in test_smoke as xfail
  Add a xfail test for #797
  Add missing file
  ...

Conflicts:
	tests/integration/features/hints.feature
2016-04-15 22:37:47 +02:00
Kevin Velghe
f4f98c54fa Keep pylint happy 2016-03-31 11:25:35 +02:00
Kevin Velghe
571d6519e9 Handle frames 2016-03-30 19:08:10 +02:00
Kevin Velghe
201739a7e6 Add current hint target 2016-03-30 16:27:34 +02:00
Kevin Velghe
76935291c0 Open links in current tab
Fix for #676

It removes the target of the link, as to prevent the website to overrule
the user. I guess the following things should be done:
 - add setting to enable/disable this behaviour
 - and/or add "hint all current"

Only the first one would be easiest. The second one requires us to keep track
of the original target. I should open a pull request for discussion.
2016-03-28 13:29:44 +02:00
Jakub Klinkovský
b1207650b0 hints: translate client rectangles into parent frames 2016-02-24 22:56:06 +01:00
Jakub Klinkovský
d630f966e7 hints: ignore too small rectangles returned by getClientRects()
Apparently we can have a '1px x 1px' rectangle at some zoom levels
and '0px x 0px' at others. We can't reliably click these, so let's
ignore them.
2016-02-23 20:23:11 +01:00
Jakub Klinkovský
58d2d92d67 Merge remote-tracking branch 'upstream/master' into hints_clicking
* upstream/master: (22 commits)
  Regenerate authors.
  Only run geolocation tests on CI
  Switch to flake8-docstrings with pydocstyle
  Fix lint
  Move pylint plugins to an installed package.
  Include pytest-xvfb properly in frozen tests
  tests: Handle trailing / in wait_for_load_finished.
  Fix lint.
  tox: Upgrade hypothesis to 3.0.2.
  tests: Add first end-to-end test for hints.
  hints: Log the used hint chars
  bdd: use quteproc.wait_for_load_finished.
  Remove xvfbwrapper from freeze_tests.py.
  Regenerate authors.
  Combine launch/crash time into one section.
  Split long lines.
  Switch to pytest-xvfb. Fixes #1309.
  no ellipsis is inserted in big windows
  Regenerate authors.
  fixes #1308
  ...
2016-02-23 17:40:02 +01:00
Jakub Klinkovský
1cff16b3b4 hints: fix bug in the correction of coordinates based on zoom level 2016-02-19 21:15:56 +01:00
Florian Bruhin
9b1db7ec0b hints: Log the used hint chars
Useful for debugging and for end2end tests.
2016-02-18 20:46:15 +01:00
Jakub Klinkovský
9799c30c2b hints: add precision tests for different zoom levels 2016-02-15 23:31:49 +01:00
Jakub Klinkovský
dd594b0eca hints: split getClientRects() into separate method
this will be useful for positioning the hint label
2016-02-15 23:28:52 +01:00
Jakub Klinkovský
a546933516 hints: use getClientRects() JS method to get the correct click position 2016-02-15 18:17:53 +01:00
Florian Bruhin
79f83a033d Add a fake clipboard for tests
There are a lot of problems and flakiness with using a real clipboard.

Instead we now have a :debug-set-fake-clipboard command to set a text, and use
logging when getting the contents.

Fixes #1285.
2016-02-03 20:27:11 +01:00
Felix Van der Jeugt
6d33e7843e should use the same keyword in config and code
hey this config check on startup is actually useful
2016-01-19 11:44:28 +01:00
Felix Van der Jeugt
7ad871fab1 Merge remote-tracking branch 'source/master' 2016-01-18 21:45:47 +01:00
Felix Van der Jeugt
cbb6e73b1f cleaner condition, less force 2016-01-17 21:06:36 +01:00
Felix Van der Jeugt
beba5a3d6c limit smart hint length 2016-01-17 20:44:14 +01:00
evan
982ac5150d issue 1213: Display yanked link in statusbar
copied string format from `yank()` in `commands.py`
2016-01-14 19:17:12 -05:00
Felix Van der Jeugt
362db3d986 fix remarks 2016-01-05 22:45:52 +01:00
Felix Van der Jeugt
8873aba09f rename strng to more sensible names 2016-01-05 21:44:29 +01:00
Felix Van der Jeugt
e28c1bf9b8 allow config files to be optional 2016-01-05 20:43:29 +01:00