Commit Graph

1954 Commits

Author SHA1 Message Date
Florian Bruhin
da505c84c6 Expose config.val to extension API 2018-11-30 14:46:00 +01:00
Florian Bruhin
569bb0fa09 Add cmdutils.Value instead of using count=True/win_id=True 2018-11-30 12:45:01 +01:00
Florian Bruhin
e184ace8cb Fix lint 2018-11-30 09:47:25 +01:00
Florian Bruhin
f6c36ccbee Rename openurl to load_url
We still call the :open command openurl, but in the tab API and in
TabbedBrowser it's now called load_url.
2018-11-30 08:31:03 +01:00
Florian Bruhin
a6d3a935d3 Use an enum for IgnoreCase 2018-11-29 19:40:20 +01:00
Florian Bruhin
b7de287e7b Move CommandError to api.cmdutils 2018-11-29 14:18:11 +01:00
Florian Bruhin
19628d0ae9 Move cmdutils.cmd_dict to objects.commands 2018-11-29 14:18:11 +01:00
Florian Bruhin
63fa65df65
Merge pull request #4440 from qutebrowser/pyup-scheduled-update-2018-11-26
Scheduled weekly dependency update for week 47
2018-11-28 15:58:32 +01:00
Florian Bruhin
2453134011 Remove unnecessary pass statements 2018-11-28 12:51:53 +01:00
Florian Bruhin
caca60087f Fix coverage 2018-11-27 13:24:48 +01:00
Florian Bruhin
21edeca3e0 pylint: disable=unused-import for typing
Apparently marking modules as used based on type comments doesn't work with
Python 3.7:

https://github.com/PyCQA/pylint/issues/2345
https://github.com/python/typed_ast/issues/60
2018-11-27 09:56:23 +01:00
Florian Bruhin
462e07a578 Use integer division to set font weight
QFont::setFontWeight takes an int only - it looks like PyQt accepts a float and
just truncates it. That's the behaviour we actually want here, but let's be
explicit about it.
2018-11-26 23:25:13 +01:00
Florian Bruhin
1f36e56e1c Complete partial annotations
Unfortunately we can't turn on mypy's --disallow-incomplete-defs (yet) due to
https://github.com/python/mypy/issues/5954
2018-11-26 20:12:03 +01:00
Florian Bruhin
8b1fd83366 mypy: Fix AbstractSettings default values 2018-11-26 18:25:12 +01:00
Florian Bruhin
052c3f92ad mypy: Fix issues with config default values 2018-11-26 18:25:12 +01:00
Florian Bruhin
b37dbc4572 mypy: Add missing annotations 2018-11-26 18:25:12 +01:00
Florian Bruhin
2152081d82 s/an URL/a URL/g 2018-11-16 12:37:30 +01:00
Florian Bruhin
3fd097066a Disallow spaces in search engine names 2018-11-08 12:43:53 +01:00
Florian Bruhin
08278138c4 Add :yank markdown 2018-11-03 07:54:37 +01:00
Florian Bruhin
a5dba34088 Set content.cookies.accept to all by default
Setting it to no-3rdparty is a nice idea from a "privacy by default"
perspective, but it also breaks various pages.

In particular, due to what's probably a Qt bug, it breaks the new GMail:
https://bugreports.qt.io/browse/QTBUG-71393

Let's be in line with what other browsers by default here.

Fixes #4281
2018-10-26 10:14:30 +02:00
Florian Bruhin
9d09aa1b40 Swap noun/verb in :config-{add,remove}-{dict-list}
See https://github.com/qutebrowser/qutebrowser/pull/4324#issuecomment-428934193
2018-10-11 14:29:10 +02:00
Florian Bruhin
1c1223821c Update docs 2018-10-11 14:18:02 +02:00
Milo Gertjejansen
9fd57b9be0 New config: More powerful :config- commands: remove
- `:config-remove-list` command to remove items from a list.
- `:config-remove-dict` command to remove items from a dict.
- Test coverage.

Continues #2794
2018-10-10 20:23:44 -05:00
Florian Bruhin
3fe64085f8 Add tabindex to default 'all' selector
See #178
2018-10-08 19:43:25 +02:00
Florian Bruhin
f36285658e Don't allow to set hints.selectors in autoconfig.yml
Also, set all settings temporarily for end2end tests.
This allows us to set things which aren't settable in autoconfig.yml.
2018-10-08 19:40:33 +02:00
Florian Bruhin
6d4c8f5b13 Merge remote-tracking branch 'origin/pr/3806' into test 2018-10-08 18:09:58 +02:00
Florian Bruhin
6168622de3 Update docs 2018-10-07 17:12:01 +02:00
Florian Bruhin
7cea4e3262 Merge remote-tracking branch 'origin/pr/4283' 2018-10-07 17:00:12 +02:00
Milo Gertjejansen
bcfc8fa3a8 New config: More powerful :config- commands: add #4283
Missed a small comment change.

Continues #2794
2018-10-06 19:45:36 -05:00
Milo Gertjejansen
a3528dcee8 New config: More powerful :config- commands: add #4283
Made minor changes to the second commit which broke tests out into
success and failure tests taking advantage of pytests.raises.

Additionally updated several grammar issues.

Continues #2794
2018-10-06 19:42:30 -05:00
Florian Bruhin
c689760872 Sort keys in configtypes.Dict.to_str
Otherwise, we get inconsistent output between runs on Python 3.5
2018-10-06 19:18:43 +02:00
Florian Bruhin
5fd20da915 Update docs 2018-10-06 00:13:58 +02:00
Florian Bruhin
14957c75ff Merge remote-tracking branch 'origin/pr/4046' 2018-10-05 23:36:40 +02:00
Florian Bruhin
42ef645cf1 Merge remote-tracking branch 'origin/pr/4004' 2018-10-05 17:46:49 +02:00
Florian Bruhin
1e8bb202e9 Make :q only close the active window
Closes #4061
Fixes #1089
2018-10-05 17:31:00 +02:00
Florian Bruhin
2c3f144cd5 Update docs 2018-10-05 17:21:36 +02:00
Florian Bruhin
fddb10e157 Merge remote-tracking branch 'origin/pr/4008' 2018-10-05 17:15:42 +02:00
Milo Gertjejansen
7f0ae252cd New config: More powerful :config- commands: add #4283
Made requested changes:

- Separated list add and dict add commands.
- Separated list and dict completion models.
- Created tests for each command.
- Simplified the configmodel options by breaking them into a separate
function to do work that is similar.
- General simplification of both add commands.

Continues #2794
2018-10-04 18:42:33 -05:00
Florian Bruhin
6c245ca7a0 Merge remote-tracking branch 'origin/pr/4220' 2018-10-04 19:34:03 +02:00
Florian Bruhin
8a3704fbe4 Update docs 2018-10-04 19:33:02 +02:00
Florian Bruhin
923b726e38 Merge remote-tracking branch 'origin/pr/4220' 2018-10-04 19:28:01 +02:00
Ryan Roden-Corrent
a5b3670477
Fix pylint/flake8 errors in configtypes. 2018-10-03 21:44:10 -04:00
Ryan Roden-Corrent
59f9d31d4b
Fix up configtypes based on code review.
- Remove stray statements
- add an early bail-out if we can't parse a color function
- add more test cases
2018-10-03 17:41:48 -04:00
Ryan Roden-Corrent
46683b82e7
Change colors.completion.match.fg to QtColor.
The color is now used in a custom Highlighter class, not set in a
stylesheet.
2018-10-02 17:47:33 -04:00
Ryan Roden-Corrent
66cc5f5ea4
Add support for more values in QtColor config type.
Recent changes in the completion highlighter mandate that
config.val.colors.completion.match be changed from a QssColor to a
QtColor. However, the latter accepts fewer formats. To avoid breaking
configs, this allows QtColors to be specified using all the same formats
as QssColors, excluding gradients.

I separated the QssColor and QtColor tests as the previous approach of
generating the tests made adding tests for QtColor more complicated.

While working on this I discovered that Qt's css parser is potentially
broken around parsing hsv percentages and filed
https://bugreports.qt.io/browse/QTBUG-70897.

For consistency, I made our parser similarly broken.

You can show the bug in qutebrowser right now by noting that the
following have different effects:

```
set colors.completion.odd.bg 'hsv(100%, 100%, 100%)'
set colors.completion.odd.bg 'hsv(358, 255, 255)'
```
2018-10-02 17:30:43 -04:00
Milo Gertjejansen
876a2bdaa1 New config: More powerful :config- commands: add
Adds the config-add command.

Modifies #2794
2018-10-01 22:22:39 -05:00
Florian Bruhin
45a3611b62 Update docs 2018-09-30 22:08:00 +02:00
Florian Bruhin
2f121d77df Update docs 2018-09-28 19:38:17 +02:00
Florian Bruhin
6d0d408785 Use when-searching, not when_searching 2018-09-28 19:28:32 +02:00
Florian Bruhin
628e4e8692 Fix lint 2018-09-28 19:28:32 +02:00