Florian Bruhin
fcbd69e209
Clean up standarddir handling #2 .
...
We already attempted this in c5a2039da4
, but
having the directories as module attributes means they'll be created on start
(rather than when they're actually used), and it'd also be impossible to change
them after init for some reason in the future.
To still have a nice short API, we simply change the attributes to functions.
2015-02-26 07:01:22 +01:00
Florian Bruhin
c5a2039da4
Refactor QStandardPaths handling.
2015-02-22 19:13:51 +01:00
Florian Bruhin
684f0d3df5
Fix starting with -c '' again.
2015-02-20 09:12:56 +01:00
Florian Bruhin
8c32fb86e2
Make it possible to set options with ! in it.
...
This is needed for a quit! alias for example. The option was wrongly treated as
an inversion even though a value was given.
2015-02-18 23:06:35 +01:00
Florian Bruhin
3d72235023
Set the QSettings path to a config-subdirectory.
...
QWebInspector uses QSettings to save its GUI-settings. However, the default
path for QSettings is ~/.config/qutebrowser/qutebrowser.conf which overwrites
our own config file.
This fixes one part of #515 .
2015-02-18 22:18:55 +01:00
Florian Bruhin
62fb4b0d0b
Fix initial creating of config.
2015-02-17 22:43:32 +01:00
Florian Bruhin
5817f3c18d
Split config init into three functions.
2015-02-14 00:25:26 +01:00
Florian Bruhin
1cf34e7984
Force saving the config if new options were added.
2015-02-13 23:53:56 +01:00
Florian Bruhin
94b51128d1
Whitespace fixes.
2015-02-13 22:19:45 +01:00
Florian Bruhin
0b55f4df77
Fix starting with -c "".
...
This is a regression introduced in 9b1729c77e
.
2015-02-12 13:24:17 +01:00
Florian Bruhin
f78b21874f
Add -p/--print argument to :set to print value.
2015-02-05 07:58:51 +01:00
Florian Bruhin
9b1729c77e
Always write config files to disk on first start.
2015-02-01 23:47:40 +01:00
Florian Bruhin
43c5dc3bf6
Refactor saving logic, only save stuff if modified.
...
Fixes #113 .
See #11 .
2015-02-01 00:43:07 +01:00
Florian Bruhin
0d93d1eaff
Minor style fixes.
2015-01-24 18:10:24 +01:00
ZDarian
d7b5f2bf52
Remove always-hide from changed cfg
2015-01-21 23:21:43 -07:00
ZDarian
ef5412f596
tab *-hide -> tab hide-*
2015-01-21 20:50:30 -07:00
ZDarian
5100f6fc8f
better type check; -'aborting'
2015-01-21 07:24:05 -07:00
ZDarian
3c21d5986e
Added toggle ability to :set
...
Append '!' to option name of boolean value to toggle its state.
2015-01-18 07:34:33 -07:00
Florian Bruhin
4f1e0d32b0
Handle UnicodeDecodeError when reading configs.
...
(WTF are you guys doing?!)
2015-01-16 07:10:12 +01:00
Florian Bruhin
3ba202d467
Fix config breakage because of deleted option.
2015-01-09 14:38:20 +01:00
Florian Bruhin
450d1ab70d
Update copyright years
2015-01-03 15:51:31 +01:00
Florian Bruhin
a714f0b70c
config: Set self._initialized before validating.
...
With a setting with an interpolation this caused a ValueError because
validate_all called get before self._initialized was True.
2014-12-17 13:40:15 +01:00
Florian Bruhin
512d7c4448
Simplify config exception tree and handling.
...
Also make sure we catch all config-related errors in all related places.
Fixes #324 .
2014-12-17 11:17:18 +01:00
Florian Bruhin
0d9c7049b6
Clean up ConfigManager._from_cp.
2014-12-15 22:25:06 +01:00
Florian Bruhin
3c68506665
Fix sect/opt in config validation error message.
...
This is a regression introduced in 0c1420112c
.
See #202 .
2014-12-15 22:08:33 +01:00
Florian Bruhin
d84c4fab84
Remove old comment.
2014-12-15 21:49:48 +01:00
Florian Bruhin
e87b3fd568
Fix loading of renamed config sections.
2014-12-14 20:46:32 +01:00
Florian Bruhin
06ec1a3885
Big file tree reorganisation.
...
Closes #255 .
Should make a lot more sense now ;)
2014-12-13 17:28:50 +01:00
Florian Bruhin
ec07e4f8be
Handle OSError exceptions where appropriate.
...
Fixes #25 .
2014-12-10 18:00:49 +01:00
Florian Bruhin
bf24578dfd
Use QSaveFile for saving files. Fixes #234 .
2014-12-08 23:42:26 +01:00
Florian Bruhin
0c1420112c
Fix config interpolation with non-default values.
...
Fixes #202 .
2014-12-08 18:50:53 +01:00
Florian Bruhin
175d01f516
config: Don't escape <eq> specially anymore.
2014-12-08 18:16:21 +01:00
Florian Bruhin
c86b1d0508
Open qute:settings if :set is given without arguments.
2014-12-01 23:09:01 +01:00
Florian Bruhin
cb1df68153
Automatic config migration for renamed sections/options.
2014-11-27 07:07:28 +01:00
Florian Bruhin
76de3d0c51
Use signals and decorators for configs again.
...
This basically rolls back 64a119afb2
and
b7f2a6d143
.
Fixes #188 .
Breaks #156 again but the next commit will fix this.
2014-10-18 19:50:10 +02:00
Florian Bruhin
0e771db7f1
Use annotation instead of special argument names.
...
Explicit is better than implicit.
Fixes #161 .
2014-10-09 06:33:24 +02:00
Florian Bruhin
71308b45ac
Add utils.qualname. Closes #169 .
2014-10-08 21:11:04 +02:00
Florian Bruhin
b7f2a6d143
Use weakref for config.on_change. Fixes #156 .
2014-10-08 10:40:46 +02:00
Florian Bruhin
b49b227c0d
Add an init method for standarddir.
...
This is another preparation for #19 and #20 .
2014-10-08 06:43:00 +02:00
Florian Bruhin
0e7a60abf6
Move utils.get_standard_dir to its own file.
...
This is a preparation for #19 and #20 because there are too many functions
related to standarddir in utils.
2014-10-08 06:20:31 +02:00
Florian Bruhin
6349a6a213
Remove Emit:/Raise: from docstrings.
...
They got out-of-sync fast and provided no real benefit.
2014-10-07 23:08:37 +02:00
Florian Bruhin
105c25bc5f
Merge branch 'multiwin'
...
Conflicts:
qutebrowser/app.py
qutebrowser/browser/commands.py
qutebrowser/browser/hints.py
qutebrowser/keyinput/modeman.py
qutebrowser/network/networkmanager.py
qutebrowser/widgets/mainwindow.py
qutebrowser/widgets/statusbar/command.py
qutebrowser/widgets/statusbar/prompt.py
qutebrowser/widgets/statusbar/prompter.py
qutebrowser/widgets/tabbedbrowser.py
2014-10-06 22:03:58 +02:00
Florian Bruhin
892b54e153
Fix saving of config.
2014-10-02 22:51:59 +02:00
Florian Bruhin
ab5acdc3ad
Clean up ConfigManager __init__ and make it work with None.
...
Fixes parts of #137 .
2014-10-02 22:45:47 +02:00
Florian Bruhin
086de1b508
Rename cmd_history to cmd-history.
...
For consistency with the other stuff, why not.
Also we broke that file with the last commit anyways.
2014-10-02 22:12:24 +02:00
Florian Bruhin
d3c9bab01a
Move state/cmd_history from config to data dir.
...
See #21 .
2014-10-02 22:12:24 +02:00
Florian Bruhin
b20536d472
Move handling of --confdir into get_standard_dir
2014-10-02 21:54:42 +02:00
Florian Bruhin
fb6cb62f93
First attempt at multi-window support.
2014-09-28 22:13:14 +02:00
Florian Bruhin
64a119afb2
Don't use signals for on_config_changed.
2014-09-28 11:27:52 +02:00
Florian Bruhin
8636562579
Move config init out of Application
2014-09-28 00:27:22 +02:00