Florian Bruhin
252c5396f3
Apply proxy changes from master
...
This are the same changes as done in 629038632c
,
but only the part related to the config. This is so we don't forget this when
merging them.
2017-07-04 15:08:03 +02:00
Florian Bruhin
07d0ea6a54
Unit tests and improvements for :bind/:unbind
2017-07-04 15:08:03 +02:00
Florian Bruhin
353c10aee7
Add a separate qutescheme BDD file
2017-07-04 15:08:03 +02:00
Florian Bruhin
3edebce833
Add tests for :set
2017-07-04 15:08:03 +02:00
Florian Bruhin
31b999ea59
Tests and improvements for KeyConfig
2017-07-04 15:08:03 +02:00
Florian Bruhin
725ffef5f3
Use a real config object in unit tests
2017-07-04 15:08:03 +02:00
Florian Bruhin
5aac991446
Remove unnecessary sip.isdeleted line
...
Now that the StyleSheetObserver is a child of the object it observes, it should
get cleaned up properly when the object is deleted.
This means this is hopefully not needed anymore, even on Qt 5.2.
2017-07-04 15:08:03 +02:00
Florian Bruhin
978013e750
Fix CommandParser and don't use a generator
2017-07-04 15:08:03 +02:00
Florian Bruhin
a8c7e8ba05
Add first config tests
2017-07-04 15:08:03 +02:00
Florian Bruhin
28670f8e48
Move config.style into config.config and refactor it
2017-07-04 15:08:03 +02:00
Florian Bruhin
81d6406e14
Update test_stylesheet
2017-07-04 15:08:03 +02:00
Florian Bruhin
a5c8a52dd5
Update config_stub for tests
2017-07-04 15:08:03 +02:00
Florian Bruhin
0dc95aceed
Clean up old test_config.py
2017-07-04 15:08:03 +02:00
Florian Bruhin
a2f62238f1
Change default binding to leave passthrough mode to Ctrl-V
...
Also, display the binding in the statusbar
2017-07-04 15:08:03 +02:00
Florian Bruhin
df1685905e
Add content.headers and content.cache groups
2017-07-04 15:08:03 +02:00
Florian Bruhin
50602cbf26
Add an url. group to settings
2017-07-04 15:08:03 +02:00
Florian Bruhin
5c08c6c930
Add conditional backend infos to docs
2017-07-04 15:08:03 +02:00
Florian Bruhin
034d727a2c
Clean up configdata
2017-07-04 15:08:03 +02:00
Florian Bruhin
25ab3b30c2
Initial doc update with new settings
2017-07-04 15:08:03 +02:00
Florian Bruhin
94ac2ca56c
Merge :wq into :quit and add an alias
2017-07-04 15:08:03 +02:00
Florian Bruhin
065f82f485
Fix endless recursion while validating aliases
2017-07-04 15:08:03 +02:00
Florian Bruhin
ac78039171
Use aliases for :w and :q
2017-07-04 15:08:03 +02:00
Florian Bruhin
ac64ea287a
Rename tabs.new_position/_explicit to .related/.unrelated
2017-07-04 15:08:03 +02:00
Florian Bruhin
441b3a4df4
Allow missing fixed_keys for configtypes.Dict
...
We just fill them up with a None value for the value type, so we can e.g. only
specify a subset of modes for bindings and the rest is {}.
2017-07-04 15:08:03 +02:00
Florian Bruhin
9d8b76e497
Simplify _none_value for List/Dict configtypes
...
We don't need to check for fixed_keys/required_keys in get_obj (only get_py),
and we don't need to care about mutability in get_py.
2017-07-04 15:08:03 +02:00
Florian Bruhin
da0a2b8578
Handle {} and [] with none_ok for configtypes.Dict/List
2017-07-04 15:08:03 +02:00
Florian Bruhin
2ba637891a
Add required_keys for configtypes.Dict
2017-07-04 15:08:03 +02:00
Florian Bruhin
bc526cf0ce
Remove some FIXMEs
2017-07-04 15:08:03 +02:00
Florian Bruhin
7ee222af88
Return [] for none-values for configtypes.List
2017-07-04 15:08:03 +02:00
Florian Bruhin
c141c33b32
Clean up start_pages setting
...
The value is now of type FuzzyUrl, and the setting is renamed to start_pages.
2017-07-04 15:08:03 +02:00
Florian Bruhin
9cbacf3264
Use {} for none-dicts and fix keybindings
2017-07-04 15:08:03 +02:00
Florian Bruhin
0115285a84
Initial update for better bindings management
2017-07-04 15:08:03 +02:00
Florian Bruhin
127db2fe42
Be a bit more relaxed about values for Perc
...
We now allow float/int for objects, and strings without a trailing % sign.
2017-07-04 15:08:03 +02:00
Florian Bruhin
cbf6e4287f
Rename fonts.tabbar to fonts.tabs
2017-07-04 15:08:03 +02:00
Florian Bruhin
e7ba56cb2c
Read YAML config after config.val is ready
...
This means we can (at least somewhat) validate aliases in configtypes.Command.
2017-07-04 15:08:03 +02:00
Florian Bruhin
0ed0a6db57
Clean up code
2017-07-04 15:08:03 +02:00
Florian Bruhin
67cb6a9802
Implement initial reading from YAML
2017-07-04 15:08:03 +02:00
Florian Bruhin
70f6d0e305
Add qutebrowser.config.configfiles
2017-07-04 15:08:03 +02:00
Florian Bruhin
78434a330c
Remove old stub FIXMEs
2017-07-04 15:08:03 +02:00
Florian Bruhin
fda4fd4888
Rename NewConfigManager.set to set_obj
2017-07-04 15:08:03 +02:00
Florian Bruhin
ad0a961a5f
Add an lru_cache for configdata.is_valid_prefix()
...
This gets called a lot, and caused some :bind calls to take ~3s.
Stats after starting with a bit of :bind:
CacheInfo(hits=25917, misses=139, maxsize=256, currsize=139)
2017-07-04 15:08:03 +02:00
Florian Bruhin
45e7e35233
Detect mutated values in new config
...
This will allow config.py to get a value and then mutate it, and we can also
make things easier for :bind and :unbind.
2017-07-04 15:08:03 +02:00
Florian Bruhin
9bd438618a
Add a test for DuplicateKeyError
2017-07-04 15:08:03 +02:00
Florian Bruhin
2a40401398
Fix config tests for new Command type
2017-07-04 15:08:03 +02:00
Florian Bruhin
2577b2c5e3
Validate configtypes.Command correctly
2017-07-04 15:08:03 +02:00
Florian Bruhin
ad919fc972
Add a test for :bind with a wrong mode
2017-07-04 15:08:03 +02:00
Florian Bruhin
23d30d4fc0
Fix remaining :bind/:unbind issues
2017-07-04 15:08:03 +02:00
Florian Bruhin
f434f955c2
Improve exception handling for :bind/:unbind
2017-07-04 15:08:02 +02:00
Florian Bruhin
ba1bc29a97
Initial :bind/:unbind implementation
2017-07-04 15:08:02 +02:00
Florian Bruhin
290d27a064
Add a cmdexc.Error
2017-07-04 15:08:02 +02:00