Commit Graph

638 Commits

Author SHA1 Message Date
Florian Bruhin
0705d6087c Don't catch every ValueError to get failed interpolations 2014-07-10 22:38:09 +02:00
Florian Bruhin
f0c67193a9 Implement ConfigManager.items().
If this isn't implemented, _interpolate_some will fail when doing a
double-interpolation.
2014-07-10 22:32:41 +02:00
Florian Bruhin
72b854049b Improvments for hints/page-prev/page-next 2014-07-09 21:14:15 +02:00
Florian Bruhin
ae676323ff Turn auto-insert-mode off by default 2014-07-02 23:08:49 +02:00
Florian Bruhin
400f619903 Handle user variables in path correctly 2014-06-28 01:15:31 +02:00
Florian Bruhin
d9f4d88b88 Revert "Fix lint"
This reverts commit 6d0db2af00.

For some reason this doesn't fix the warning at all...
2014-06-26 10:57:45 +02:00
Florian Bruhin
4ade32777d Revert "Add search-highlight-all option"
There's a better solution: Calling the function twice, once with highlight,
once with mark.

This reverts commit 8812672d7d.
2014-06-26 10:57:12 +02:00
Florian Bruhin
6d0db2af00 Fix lint 2014-06-26 10:09:56 +02:00
Florian Bruhin
8812672d7d Add search-highlight-all option 2014-06-26 10:08:26 +02:00
Florian Bruhin
92ff957543 Clean up message API 2014-06-26 07:58:00 +02:00
Florian Bruhin
daee57b37d Saner default values for some QWebSettings 2014-06-25 06:54:34 +02:00
Florian Bruhin
277bac618a Color statusbar in insert mode 2014-06-23 16:43:59 +02:00
Florian Bruhin
70f224ba32 Make tab close on right click configurable 2014-06-23 15:47:31 +02:00
Florian Bruhin
593a2fe4ec Make it configurable whether to leave insertmode on click 2014-06-23 08:05:52 +02:00
Florian Bruhin
8a8ca0c34f Split utils.misc into utils.{qt,misc} 2014-06-23 07:45:04 +02:00
Florian Bruhin
a64775a0f9 Improve logging messages 2014-06-21 22:40:31 +02:00
Florian Bruhin
a3e5a20063 Don't log missing config descriptions 2014-06-21 17:56:46 +02:00
Florian Bruhin
cd8bca7e3b Catch QColors passed to ColorDict 2014-06-21 17:37:54 +02:00
Florian Bruhin
7a6e2b3242 Ensure validity of Qt objects 2014-06-21 17:02:30 +02:00
Florian Bruhin
113221c731 Log some exceptions 2014-06-20 23:26:19 +02:00
Florian Bruhin
7de637baea Add a none argument to every config type and cleanup.
- Rename none to none_ok (because of "None")
- Fix File class.
2014-06-20 20:27:24 +02:00
Florian Bruhin
6b12572fb0 Add dwb download keybindings. 2014-06-19 17:58:46 +02:00
Florian Bruhin
cd68d04067 Add missing space 2014-06-19 13:19:02 +02:00
Florian Bruhin
b70657eb53 Validate configs properly.
We inherited custom types from String which is wrong and not validated against
ValidValues.
2014-06-19 13:18:25 +02:00
Florian Bruhin
fdda1dd3a0 Forward unbound non-alphanumeric keys by default.
We do this so we benefit from some default WebKit keybindings users would
expect. For example, we'd need to bind Ctrl+X/C/V by default without this.

We also remove the custom-bound scrolling keybindings as they're redundant now.

The forward-unbound-keys setting now isn't a bool anymore, instead it can be
set to all/auto/none.
2014-06-19 11:51:25 +02:00
Florian Bruhin
d65587128f Add vim modelines to all files. 2014-06-19 09:04:37 +02:00
Florian Bruhin
1fef2d02b9 Add an :all-objects command and __repr__s 2014-06-17 11:03:42 +02:00
Florian Bruhin
7dfd7d018b pylint: completely disable unnecessary-lambda 2014-06-17 07:19:16 +02:00
Florian Bruhin
af9e4ae072 Fix parent/child relationships 2014-06-17 07:17:21 +02:00
Florian Bruhin
c9f60caa12 Change download bar bg to black 2014-06-13 07:42:53 +02:00
Florian Bruhin
4dc33102b7 Cleanup 2014-06-13 07:41:51 +02:00
Florian Bruhin
ac43a0b5cb Style DownloadView 2014-06-13 07:39:47 +02:00
Florian Bruhin
9b7ff910c3 Log stylesheets 2014-06-13 07:38:10 +02:00
Florian Bruhin
2ffc9bb00a Add colors to DownloadView 2014-06-12 21:43:30 +02:00
Florian Bruhin
96891f6241 First working download draft 2014-06-11 21:55:23 +02:00
Florian Bruhin
1c63ff620d Add option to expand tabs 2014-06-10 14:30:31 +02:00
Florian Bruhin
2f1cd43f9c Change lists to tuples for immutable values 2014-06-06 17:21:35 +02:00
Florian Bruhin
fd220b1b36 Raise CommandError instead of message.error where possible 2014-06-06 11:55:55 +02:00
Florian Bruhin
500ad24cc3 Add keybindings for Ctrl-?/H/J/[ for Delete/Backspace/Return/Escape 2014-06-05 13:20:10 +02:00
Florian Bruhin
2daae86e27 Break long line 2014-06-03 21:12:44 +02:00
Florian Bruhin
af17746c20 Actually respect cookies-store 2014-06-03 20:30:50 +02:00
Florian Bruhin
35a3cc661e Reorder webkit options 2014-06-03 20:28:51 +02:00
Florian Bruhin
40009970df Add option to configure if js statusbar messages should be shown 2014-06-03 19:17:35 +02:00
Florian Bruhin
ec25821fae _foo.py file rename [2/2] 2014-06-03 15:01:57 +02:00
Florian Bruhin
fa1e03f56b _foo.py file rename [1/2] 2014-06-03 14:57:57 +02:00
Florian Bruhin
58c1646e9b Shrink completion if configured to do so 2014-06-03 11:39:53 +02:00
Florian Bruhin
a389b0f688 Add a quick-complete option.
This moves to the next commandline part when completing if there's only
one possible completion.
2014-06-03 06:55:07 +02:00
Florian Bruhin
6bc0f7e5e7 Revert "Make inspector detachable."
This reverts commit ee241c3f6c.

Conflicts:
	qutebrowser/config/configdata.py
2014-05-26 15:13:33 +02:00
Florian Bruhin
f380eaf4cd Remove statusbar.fg.error setting 2014-05-26 17:03:39 +02:00
Florian Bruhin
edacb23076 Color statusbar on prompts 2014-05-26 16:59:11 +02:00
Florian Bruhin
61d4821065 Add configurable confirmation when closing 2014-05-26 16:51:57 +02:00
Florian Bruhin
6676eefb03 Add keybinding for inspector 2014-05-26 12:20:42 +02:00
Florian Bruhin
ee241c3f6c Make inspector detachable. 2014-05-26 12:16:03 +02:00
Florian Bruhin
1e256699f8 Add topic-specific loggers 2014-05-23 16:11:55 +02:00
Florian Bruhin
8cddbec9e3 Implement quickmarks 2014-05-22 16:44:47 +02:00
Florian Bruhin
f3fd247282 Make LineConfigParser iterable. 2014-05-22 16:40:54 +02:00
Florian Bruhin
d1b947279e Use arrow keys for completion items 2014-05-22 10:54:18 +02:00
Florian Bruhin
2bcf46194b Add readline-like shortcuts 2014-05-22 10:49:19 +02:00
Florian Bruhin
cfd70e7821 Make yes/no questions work 2014-05-20 12:05:14 +02:00
Florian Bruhin
f33f2e0a0f Convert URL to proxy correctly.
Before, user/password was set to an empty string even when not set in
the URL, causing Qt to reread this information all the time and
call proxyAuthenticationRequired even when the entered info was correct.
2014-05-20 08:56:58 +02:00
Florian Bruhin
77eb7d621a Handle cancelling of authentication 2014-05-20 08:56:54 +02:00
Florian Bruhin
7ca605ade6 First try at statusbar prompt 2014-05-20 08:56:46 +02:00
Florian Bruhin
118d3e03cd Revert "Make scroll bars hideable"
This reverts commit 1bfbdd79e4.

Conflicts:
	qutebrowser/browser/commands.py
	qutebrowser/config/configdata.py
	qutebrowser/widgets/webview.py
2014-05-19 09:50:56 +02:00
Florian Bruhin
696fdc397b Revert "Reimplement wheelEvent of WebView to fix scrolling"
This helped with hiding scrollbars, but it handles scrolling incorrectly
with multiple scrollable divs.

This reverts commit 5c4ce7ae09.
2014-05-19 09:46:38 +02:00
Florian Bruhin
d450257485 Add search-prev and bind N to it 2014-05-19 05:05:54 +02:00
Florian Bruhin
da2dc4861f Rename nextsearch command to search-next 2014-05-19 04:21:30 +02:00
Florian Bruhin
65aee9d991 Add ui section to config 2014-05-17 23:45:31 +02:00
Florian Bruhin
49ad41949a Remove some interpolations from default config 2014-05-17 23:39:26 +02:00
Florian Bruhin
d901fe69e6 Rename some commands 2014-05-16 23:01:40 +02:00
Florian Bruhin
5c4ce7ae09 Reimplement wheelEvent of WebView to fix scrolling
Hiding scrollbars in 1bfbdd79e4 broke
scrolling because the WebKit implementation wants a scrollbar to do
scrolling.

We fix this by just handling the mouse wheel ourselves.
2014-05-16 21:37:43 +02:00
Florian Bruhin
2c2c79af2e Display some messages immediately 2014-05-16 17:21:43 +02:00
Florian Bruhin
7eb19e2a1e Start implementing message-timeout 2014-05-16 15:33:36 +02:00
Florian Bruhin
1bfbdd79e4 Make scroll bars hideable 2014-05-16 14:20:37 +02:00
Florian Bruhin
326280f910 Fix consistency and spelling in docstrings/comments 2014-05-15 16:27:34 +02:00
Florian Bruhin
603fbdf239 Range-check all values passed to C code. 2014-05-15 00:02:20 +02:00
Florian Bruhin
a045511962 Use exceptions for command errors 2014-05-14 18:00:40 +02:00
Florian Bruhin
876dcad28f Fix some more escaped quotes 2014-05-13 22:18:59 +02:00
Florian Bruhin
3c4866f3d9 Add show-favicons option 2014-05-12 23:03:55 +02:00
Florian Bruhin
c3816b2820 Make min/max tab width configurable 2014-05-12 16:04:43 +02:00
Florian Bruhin
7b2961f23e Fix some backslash-quotes 2014-05-12 15:58:09 +02:00
Florian Bruhin
57e465bb2d Add ssl-strict setting 2014-05-12 11:22:32 +02:00
Florian Bruhin
381d36263c Fix font-size-* in settings 2014-05-11 22:03:00 +02:00
Florian Bruhin
3deeaede8a Change completion title color to white 2014-05-11 21:58:40 +02:00
Florian Bruhin
195c7d6ef7 Work around binding = 2014-05-11 21:55:41 +02:00
Florian Bruhin
2190d1bb49 Add font-size-* to QWebSettings. 2014-05-09 21:02:10 +02:00
Florian Bruhin
5f1cb2ede3 Restyle completion to be dark 2014-05-09 20:25:16 +02:00
Florian Bruhin
edc9d0810c Use QCoreApplication.instance() 2014-05-09 17:01:05 +02:00
Florian Bruhin
0d6ecf04bf Don't bind '=' because configparser fucks up 2014-05-09 15:00:23 +02:00
Florian Bruhin
f7e6dc0244 Add zoom command. 2014-05-09 14:20:26 +02:00
Florian Bruhin
601221fa62 Add binding for Ctrl-Alt-p (print) 2014-05-09 13:16:16 +02:00
Florian Bruhin
a4556a956e Add bindings for ss/sl/sk (set/set_temp/set keybind) 2014-05-09 13:14:46 +02:00
Florian Bruhin
1843301a7e Add keybinding for save 2014-05-09 13:12:39 +02:00
Florian Bruhin
95f2950335 Add stop command (ctrl-s) 2014-05-09 13:11:47 +02:00
Florian Bruhin
05f38e15a6 Add command home 2014-05-09 13:09:37 +02:00
Florian Bruhin
ee72d682ad Add binding: ctrl-n -> leave_mode 2014-05-09 12:13:12 +02:00
Florian Bruhin
4361220a48 Add bindings for xo/xO (backtabopen(cur)) 2014-05-09 12:10:03 +02:00
Florian Bruhin
96d456fdee New command: tab_focus_last / Ctrl-Tab 2014-05-09 11:58:49 +02:00
Florian Bruhin
4e7eb41cb9 Add command tab_move (gm/gl/gr) 2014-05-09 11:47:25 +02:00
Florian Bruhin
87e94a2c68 Add T command / refactor focus_tab 2014-05-09 11:29:25 +02:00
Florian Bruhin
e6af8bb7ae Add only/co command 2014-05-09 11:24:33 +02:00
Florian Bruhin
70c8df095e Switch from appdirs to QStandardPaths 2014-05-08 22:33:24 +02:00
Florian Bruhin
bf19cb7536 Add window-open-behaviour setting 2014-05-08 20:43:40 +02:00
Florian Bruhin
dc01509633 Fix description for webkit maximum-pages-in-cache 2014-05-08 09:05:38 +02:00
Florian Bruhin
285a1c86b4 Bind pgup/pgdown/shift+space 2014-05-07 07:40:36 +02:00
Florian Bruhin
9553cb6872 Clean up config type order 2014-05-06 13:10:38 +02:00
Florian Bruhin
cbc363912e Merge None{Int,String} with Int/String conftype 2014-05-06 13:00:49 +02:00
Florian Bruhin
a0e71dc86e Don't transform strings in config to lowercase 2014-05-06 12:55:26 +02:00
Florian Bruhin
f6c3e00d59 Use NoneString config type for settings with Qt defaults.
This fixes wikipedia looking ugly because setUserStylesheet gets called
with an empty string.
2014-05-06 12:20:02 +02:00
Florian Bruhin
3c20b78d8b Fix config typo 2014-05-06 12:04:56 +02:00
Florian Bruhin
5ce49553d8 Stop logging config values.
This is just too much noise...
2014-05-06 08:36:32 +02:00
Florian Bruhin
8f239b4a95 Add proxy settings 2014-05-05 22:07:41 +02:00
Florian Bruhin
c8fd0937b0 Revert "Use global object dict for global objects"
This reverts commit bf2c7831c8.

This was a bad idea as we need to access some of the main attributes
from commands via instance=...
2014-05-05 20:12:20 +02:00
Florian Bruhin
bf2c7831c8 Use global object dict for global objects 2014-05-05 19:12:47 +02:00
Florian Bruhin
c561931699 Also rename options 2014-05-05 18:37:40 +02:00
Florian Bruhin
5f7759eaed Rename some stuff in config 2014-05-05 18:01:43 +02:00
Florian Bruhin
667b255d01 Use QApplication for global singletons 2014-05-05 17:56:14 +02:00
Florian Bruhin
ae95b5ea3b Basic cookie handling 2014-05-05 16:28:43 +02:00
Florian Bruhin
4ebe643ea6 Use simple enums for constants 2014-05-05 07:45:36 +02:00
Florian Bruhin
677678be81 Refactor websettings.py 2014-05-04 01:50:37 +02:00
Florian Bruhin
4ff5431436 Fix checks 2014-05-04 01:33:01 +02:00
Florian Bruhin
c9f7d6771a Enable persistent webkit storage 2014-05-04 01:11:19 +02:00
Florian Bruhin
851f473e0c Add more webkit settings 2014-05-04 01:06:52 +02:00
Florian Bruhin
cece9125ac Add user stylesheet setting 2014-05-03 16:13:32 +02:00
Florian Bruhin
8ada39ff8b Add focus_tab command 2014-05-03 00:32:43 +02:00
Florian Bruhin
efc613811f Implement numeric hints 2014-05-02 17:53:16 +02:00
Florian Bruhin
6557b8303a Disallow spaces in aliases. 2014-05-02 15:21:48 +02:00
Florian Bruhin
f4a59b2d71 Support forbidden chars in strings. 2014-05-02 15:21:33 +02:00
Florian Bruhin
379a6219ec Fix config escape comment 2014-05-02 13:30:51 +02:00
Florian Bruhin
f935d99d52 Don't escape values anymore 2014-05-02 13:28:04 +02:00
Florian Bruhin
b6b9738c25 Revert "Don't escape values in configdata."
This reverts commit cb0d0d1af2.
2014-05-02 13:24:10 +02:00
Florian Bruhin
24939603ea Revert "Escape values in default config comments"
This reverts commit be86ca03e2.
2014-05-02 13:24:07 +02:00
Florian Bruhin
de368aa43d Revert "More escaping fixes"
This reverts commit fcb10e2bff.
2014-05-02 13:24:00 +02:00
Florian Bruhin
0640eacb95 Catch ValueError when catching :set errors 2014-05-02 12:27:06 +02:00
Florian Bruhin
fcb10e2bff More escaping fixes 2014-05-02 12:25:30 +02:00
Florian Bruhin
3b015cd5df Cache ordered values in ValueList section 2014-05-02 11:46:58 +02:00
Florian Bruhin
be86ca03e2 Escape values in default config comments 2014-05-02 11:30:51 +02:00
Florian Bruhin
cb0d0d1af2 Don't escape values in configdata. 2014-05-02 11:28:36 +02:00
Florian Bruhin
ae0966a384 Fix encoding issues on windows.
locale.getpreferredencoding(False) returns cp1252 on Windows, which is
unable to parse our nice unicode arrows.

Therefore, we always need to specify the encoding when using open().

Also we exclude configdata.py from pep257 on Windows because it doesn't
detect the encoding correctly... Bug is submitted:
https://github.com/GreenSteam/pep257/issues/70
2014-05-02 11:15:38 +02:00
Florian Bruhin
be467d5e50 Refactor command argument splitting.
This uses split=True/False as cmdutils.register argument again (because
we would never want to set maxsplit ourselves, only not splitting the
*last* argument makes any sense.

Also this uses shlex for splitting again, like earlier.
2014-05-02 10:28:41 +02:00
Florian Bruhin
836a5e04a5 Allow empty keys in config 2014-05-02 06:59:46 +02:00
Florian Bruhin
678abca244 Make user agent configurable 2014-05-02 06:55:55 +02:00
Florian Bruhin
bb70fa1c5a Make FIRST_COMMENT in configdata a rawstring 2014-05-01 23:28:40 +02:00
Florian Bruhin
14617111a8 Remove old logging 2014-05-01 23:27:49 +02:00
Florian Bruhin
2d8c8fa40f Fix up/down keybindings. Whooops. 2014-05-01 23:27:18 +02:00
Florian Bruhin
4137e5de53 Don't use QShortcut for space scrolling 2014-05-01 23:25:51 +02:00
Florian Bruhin
6a725aa87f Fix escaping in config 2014-05-01 21:09:29 +02:00
Florian Bruhin
3ed22ffcbe Return transformed value in get 2014-05-01 20:06:34 +02:00
Florian Bruhin
7aef865b0d Lint fixes 2014-05-01 19:42:51 +02:00
Florian Bruhin
8556d06ae7 Add do-not-track and accept-language headers 2014-05-01 17:54:50 +02:00
Florian Bruhin
5d80831752 prevpage/nextpage updates 2014-05-01 16:35:26 +02:00
Florian Bruhin
fd678ff864 Make hints work 2014-05-01 15:27:32 +02:00
Florian Bruhin
bc02df0bde Add open_editor command 2014-04-29 22:16:44 +02:00
Florian Bruhin
a0f27fed61 Add manual hint following 2014-04-27 21:59:23 +02:00
Florian Bruhin
8474bbdf6a Rename and reorder config options 2014-04-27 21:21:14 +02:00
Florian Bruhin
9252ef94ca Consistent string chars 2014-04-25 16:53:23 +02:00
Florian Bruhin
35ba97d338 Escape special INI chars in ConfigManager 2014-04-25 15:57:28 +02:00
Florian Bruhin
33f9aad6d8 bugfix: Order ValueList values in config properly 2014-04-25 14:13:31 +02:00
Florian Bruhin
46cf62ab34 Don't crash in exception handler when new option is in ValueList 2014-04-25 13:55:03 +02:00
Florian Bruhin
0187623950 Add navigation by arrow keys 2014-04-25 13:37:54 +02:00
Florian Bruhin
c087efb1fd Rename Config to ConfigManager 2014-04-25 12:07:37 +02:00
Florian Bruhin
937196e287 Rename package-private modules to _foo.py 2014-04-25 11:50:30 +02:00
Florian Bruhin
2474b5a806 Add binding i -> enter_mode insert 2014-04-25 11:22:14 +02:00
Florian Bruhin
80d6dc9cf7 Update documentation for keybind.command confsect 2014-04-25 09:51:17 +02:00
Florian Bruhin
43c8a96621 s/command_item/completion_item/ 2014-04-25 09:28:02 +02:00
Florian Bruhin
aeb4980f7e Also handle Return via config 2014-04-25 09:26:52 +02:00
Florian Bruhin
5ee6b2adfa Revert "Remove setting forward_unbound_keys."
This reverts commit d07e22bd91.
2014-04-25 08:40:46 +02:00
Florian Bruhin
55a8da7f1b Start using KeyParser for command mode 2014-04-25 07:50:21 +02:00
Florian Bruhin
405194d040 Add passthrough mode 2014-04-25 07:13:57 +02:00
Florian Bruhin
035a6a0847 Don't bind Ctrl-C in insert mode 2014-04-25 07:01:58 +02:00
Florian Bruhin
d07e22bd91 Remove setting forward_unbound_keys.
It introduced a lot of unnecessary complexity (e.g. tracking KeyReleases
to their KeyPresses...) for little benefit.
2014-04-25 06:54:17 +02:00
Florian Bruhin
926194849c Use normal commands for hint mode 2014-04-24 23:47:02 +02:00
Florian Bruhin
e06583ade2 Use normal command to leave insert mode 2014-04-24 23:09:12 +02:00
Florian Bruhin
0def82fe8c Fix lint 2014-04-24 22:49:06 +02:00
Florian Bruhin
0c15517352 s/<normal>/<leave>/ 2014-04-24 21:19:29 +02:00
Florian Bruhin
d2dc0b7ac5 Add KeyParser for normal mode 2014-04-24 21:12:55 +02:00
Florian Bruhin
718295eb9f Use <> instead of @@ for special keys 2014-04-24 17:48:38 +02:00
Florian Bruhin
0e3e588038 Add forward_unbound_keys setting 2014-04-24 16:53:16 +02:00
Florian Bruhin
1c5ae25b68 Start implementing auto_insert_mode 2014-04-24 16:03:16 +02:00
Florian Bruhin
a82ab6d707 Go to insert mode when plugin clicked 2014-04-24 07:41:20 +02:00
Florian Bruhin
fb9ac1bc4c Restyle tabbar 2014-04-22 20:49:16 +02:00
Florian Bruhin
55e3aca702 linting cleanup 2014-04-22 17:53:27 +02:00
Florian Bruhin
dea80b3b54 Fix complete() of BaseType 2014-04-22 17:23:35 +02:00
Florian Bruhin
aedf1889dd Support ambiguous keybindings 2014-04-22 16:50:37 +02:00
Florian Bruhin
76f4917ae9 Implement wrapping/message when switching tabs 2014-04-22 15:57:38 +02:00
Florian Bruhin
3ab3e9394d Bind backspace to back 2014-04-22 15:48:38 +02:00
Florian Bruhin
abb5c06ee6 Remove import FIXMEs 2014-04-22 15:22:50 +02:00
Florian Bruhin
94cef5ea22 Remove FIXME for keybindingname validation 2014-04-22 15:19:28 +02:00
Florian Bruhin
a87163b213 Complete commands 2014-04-22 15:19:18 +02:00
Florian Bruhin
1638823fb3 Add a complete() method to config types 2014-04-22 15:19:01 +02:00
Florian Bruhin
963066b4bd Remove some old FIXMEs 2014-04-22 14:45:24 +02:00
Florian Bruhin
21abfa10a4 Improve config section comments 2014-04-22 08:42:58 +02:00
Florian Bruhin
27f88ffa47 Don't break https:// urls 2014-04-22 08:42:47 +02:00
Florian Bruhin
7645f4fdea Revert "Use "Monospace" only as monospace font"
This reverts commit 1442b1e35f.

For true CSS fonts (hints), we can use "Monospace" as generic family and
it'll work.

However, for Qt fonts, this will get us a non-monospace font on Windows.

Conflicts:
	qutebrowser/config/configdata.py
2014-04-22 08:26:53 +02:00
Florian Bruhin
ba7f56f5e9 Add different hinting modes (yank, backtab, rapid) 2014-04-21 23:33:36 +02:00
Florian Bruhin
73dfa30a49 Display error message when config validation failed 2014-04-21 22:29:57 +02:00
Florian Bruhin
f70fad650d Spelling fix 2014-04-21 21:11:01 +02:00
Florian Bruhin
695ab70d7c Style fixes 2014-04-21 21:05:39 +02:00
Florian Bruhin
b10c934e15 Validate length/bounds for config values 2014-04-21 21:04:19 +02:00
Florian Bruhin
a11b14fd2d Implement more hinting modes 2014-04-21 19:29:11 +02:00
Florian Bruhin
0741326e5d Make it possible to open tabs in background 2014-04-21 19:03:04 +02:00
Florian Bruhin
de0e96ab2d Add clicking on links 2014-04-21 16:59:03 +02:00
Florian Bruhin
c2aa9517ea Mark partial hint matches 2014-04-21 15:45:29 +02:00
Florian Bruhin
98ed6c9812 Implement hint strings 2014-04-21 11:03:43 +02:00
Florian Bruhin
5dd74d39fd Make hinting configurable 2014-04-21 11:03:42 +02:00
Florian Bruhin
1f66766e0a Add CssColor conftype 2014-04-21 11:03:09 +02:00
Florian Bruhin
0bbd128fca Add Float conftype 2014-04-21 11:03:09 +02:00
Florian Bruhin
9152e40bfb Implement validate() for String 2014-04-21 11:03:09 +02:00
Florian Bruhin
2da1f05326 Output better error when validate() isn't implemented 2014-04-21 11:03:09 +02:00
Florian Bruhin
1442b1e35f Use "Monospace" only as monospace font 2014-04-21 11:03:09 +02:00
Florian Bruhin
c8795a21a6 Revert "Make it possible to not typecheck values in setv."
This reverts commit 152bcae618.
2014-04-18 11:01:02 +02:00
Florian Bruhin
a91dde8a26 Catch exceptions in get_wrapper 2014-04-17 19:11:31 +02:00
Florian Bruhin
152bcae618 Make it possible to not typecheck values in setv. 2014-04-17 19:08:57 +02:00
Florian Bruhin
abaec2f044 Remove __setitem__ for sections 2014-04-17 19:08:31 +02:00
Florian Bruhin
3089463a9a Remove FIXME 2014-04-17 19:04:04 +02:00
Florian Bruhin
5bd40e732c Do validation and reading from configparser correctly 2014-04-17 19:02:58 +02:00
Florian Bruhin
a5f8bdf7fc Add validation FIXME 2014-04-17 18:00:15 +02:00
Florian Bruhin
1282a211cf Add validation for search engine URLs and colors 2014-04-17 17:59:57 +02:00
Florian Bruhin
39f580d9f1 Cleanup 2014-04-17 17:44:27 +02:00
Florian Bruhin
457e173592 More config cleanup.
This renames the config instance from "config" to "instance" and adds a
convenience get() function in the config module.
2014-04-17 15:26:27 +02:00
Florian Bruhin
a15461b5da Rename config.config dict to sections 2014-04-17 14:49:38 +02:00
Florian Bruhin
3728381643 Make dump_userconfig work correctly 2014-04-17 12:35:46 +02:00
Florian Bruhin
c6df785c41 Use common base class for config section 2014-04-17 12:21:22 +02:00
Florian Bruhin
3eca7d6847 Don't split value for set commands 2014-04-17 12:06:48 +02:00
Florian Bruhin
3ad4b447b4 Remove FIXME 2014-04-17 11:45:06 +02:00
Florian Bruhin
72340575af Remove value from on_config_changed signal again.
Turns out this causes more trouble than it's worth, and it's unintuitive
from which layer we get the value.
2014-04-17 11:39:25 +02:00
Florian Bruhin
16afba032f Remove warn logging 2014-04-17 11:10:08 +02:00
Florian Bruhin
90ddd26981 Handle the case where no history is present correctly 2014-04-17 11:07:57 +02:00
Florian Bruhin
a1a0325283 Use ChainMap for ValueList config section.
This also fixes the problem where no keybindings are loaded on the first
start.
2014-04-17 11:01:45 +02:00
Florian Bruhin
af94b9f212 Don't attempt to save if no data was read 2014-04-16 23:32:21 +02:00
Florian Bruhin
981ca7d18e Fix layer handling in dump_userconfig 2014-04-16 23:21:57 +02:00
Florian Bruhin
48ced03d57 Display config description in completion 2014-04-16 16:36:45 +02:00
Florian Bruhin
57baafbf30 Change configdata from function to attribute 2014-04-16 16:32:14 +02:00
Florian Bruhin
bc4a01faf3 Fix config importing 2014-04-16 16:32:06 +02:00
Florian Bruhin
517c9e6b69 Split config.py more 2014-04-16 16:16:17 +02:00
Florian Bruhin
fc24cb620c Move websettings to own file 2014-04-16 15:49:56 +02:00
Florian Bruhin
03227c2b41 Lint fixes 2014-04-16 14:14:37 +02:00
Florian Bruhin
4c751d8081 Add webkit settings to config 2014-04-16 13:32:55 +02:00
Florian Bruhin
4ca8cc9537 Add value to config.changed signal 2014-04-16 09:50:24 +02:00
Florian Bruhin
a410d56a78 Implement command history 2014-04-16 09:08:56 +02:00
Florian Bruhin
1d5b0ca9a6 Add save command 2014-04-15 17:28:14 +02:00
Florian Bruhin
73c319a1ec Add autosave option 2014-04-15 17:28:05 +02:00
Florian Bruhin
f959c0c137 Add completion for settings values 2014-04-14 17:54:11 +02:00
Florian Bruhin
313d6e3967 Use slicing for getlayers for SettingsValue 2014-04-13 21:48:51 +02:00
Florian Bruhin
65b99dab45 Fix false-positive check 2014-04-11 19:37:49 +02:00
Florian Bruhin
ab31f2a289 Add set_temp command 2014-04-11 19:34:46 +02:00
Florian Bruhin
a3a81543a0 Don't write temp layer to config 2014-04-11 19:34:34 +02:00
Florian Bruhin
80ca9a8dd0 Whitespace fix 2014-04-11 19:33:11 +02:00
Florian Bruhin
e12531e766 Fix dict-change (change attibute to item access) 2014-04-11 19:32:20 +02:00
Florian Bruhin
b0792203a5 Change namedtuple to OrderedDict for conflayers 2014-04-11 17:49:15 +02:00
Florian Bruhin
e7c23312d7 Start implementing different config layers.
With a namedtuple though, which is pretty much a fail.
2014-04-11 07:16:16 +02:00
Florian Bruhin
575a934892 Move SettingValue to own file 2014-04-11 06:28:07 +02:00
Florian Bruhin
04807489b7 Update everything needed when config is changed 2014-04-10 23:30:45 +02:00
Florian Bruhin
aa616e5ac7 Start implementing config changed signal 2014-04-10 18:01:16 +02:00
Florian Bruhin
175eabdc80 Remove fallback values from config 2014-04-10 14:40:02 +02:00
Florian Bruhin
c5ca0e56be Remove blank lines before """ in docstrings.
pep257 has changed in this regard so we reflect this change.
2014-04-10 14:21:27 +02:00
Florian Bruhin
cba2d4d450 Basic validation for zoom values 2014-04-10 12:57:57 +02:00
Florian Bruhin
c845db4799 Refactor config and sectionproxy 2014-04-10 12:37:53 +02:00
Florian Bruhin
4ff86b660c Lint fixes 2014-04-10 12:24:41 +02:00
Florian Bruhin
33aa8bfa52 Fix checking of boolean states 2014-04-10 12:22:22 +02:00
Florian Bruhin
32ce8e6772 Print nice error messages on wrong setting values 2014-04-10 12:20:15 +02:00
Florian Bruhin
c05e66a9b9 Refactor ValueList 2014-04-10 12:09:32 +02:00
Florian Bruhin
21e628a1ba Add __setitem__ to ValueList 2014-04-10 12:05:32 +02:00
Florian Bruhin
1a20bbe7d0 Fix missing options when setting 2014-04-10 12:03:42 +02:00
Florian Bruhin
c1df7cd1fc Handle missing sections/options in :set 2014-04-10 12:01:02 +02:00
Florian Bruhin
6175f5c489 Use ConfigParser-like exceptions for config 2014-04-10 09:52:05 +02:00
Florian Bruhin
763276a65f Make dump_userconfig work 2014-04-10 07:37:13 +02:00
Florian Bruhin
a0a8f5d025 Make :set work correctly 2014-04-10 07:09:12 +02:00
Florian Bruhin
c26430d08d Remove annoying two-word completions 2014-04-10 06:58:58 +02:00
Florian Bruhin
fb4e013007 Make rawvalue of SettingValue private 2014-04-09 22:44:34 +02:00
Florian Bruhin
4173a47ade Try to implement set command 2014-04-09 22:44:07 +02:00
Florian Bruhin
72ab405040 Handle statusbar messages centrally 2014-04-09 20:47:24 +02:00
Florian Bruhin
4b0b9d884c lint fixes 2014-04-09 17:57:00 +02:00
Florian Bruhin
3f7635619a Complete multi-part values correctly 2014-04-09 17:54:41 +02:00
Florian Bruhin
1258a466dd Add untested has_option 2014-04-07 17:53:57 +02:00
Florian Bruhin
30c18579f2 Eliminate custom ValueList classes 2014-04-07 17:46:48 +02:00
Florian Bruhin
63eaee50b8 Cache colordict/fontdict 2014-04-07 17:33:12 +02:00
Florian Bruhin
361dc7d037 Fix checks and spellings 2014-04-07 17:20:14 +02:00
Florian Bruhin
50740b2828 ValueList fixes 2014-04-07 17:05:51 +02:00
Florian Bruhin
7312a284a3 More fixes, kinda runs now 2014-04-07 16:51:14 +02:00
Florian Bruhin
45ffa9dece More config bugfixes 2014-04-02 16:47:21 +02:00
Florian Bruhin
89e21499c8 More configparser adjustments 2014-03-28 07:18:40 +01:00
Florian Bruhin
f4d363082d Add some configparser-foo 2014-03-27 22:37:34 +01:00
Florian Bruhin
8b0eb8e808 Prepare for getting rid of cp interpolation 2014-03-27 17:35:14 +01:00
Florian Bruhin
1132f7bb6c Lint fixes 2014-03-24 11:48:56 +01:00
Florian Bruhin
fa6f464e23 Refactor completion model changing 2014-03-21 20:01:13 +01:00
Florian Bruhin
108fd2c43b Don't wrap option values 2014-03-21 16:50:37 +01:00
Florian Bruhin
43d529876e Revert "Fix writing values with spaces"
This reverts commit c229096916.
2014-03-21 16:48:00 +01:00
Florian Bruhin
c229096916 Fix writing values with spaces 2014-03-10 01:10:24 +01:00
Florian Bruhin
1ae1b19888 Start reading config file 2014-03-10 00:39:15 +01:00
Florian Bruhin
c64d1029a7 Use exceptions for validation. 2014-03-10 00:39:15 +01:00
Florian Bruhin
e61d7f724f cleanup 2014-03-10 00:39:15 +01:00
Florian Bruhin
a19571fe21 Add final newline to config 2014-03-10 00:39:15 +01:00
Florian Bruhin
2d33d32ed5 Kill old configparser, implement config writing 2014-03-10 00:39:15 +01:00
Florian Bruhin
f0f8168ed2 Add a (broken) get command. 2014-03-10 00:39:15 +01:00
Florian Bruhin
1c43da163e Make this run again 2014-03-10 00:39:15 +01:00
Florian Bruhin
4f5b6040ad Implement ValidValues class 2014-03-10 00:39:15 +01:00
Florian Bruhin
4ea77c7ec2 Cleanups and bugfixes 2014-03-10 00:39:15 +01:00
Florian Bruhin
02b4f2fdda Remove templates.py 2014-03-10 00:39:15 +01:00
Florian Bruhin
f679a97efc Use OrderedDict for ValueList 2014-03-10 00:39:15 +01:00
Florian Bruhin
c67f0c6482 Don't inherit AutoSearch from bool 2014-03-10 00:39:15 +01:00
Florian Bruhin
8d726cb49e Drop whitespace when possible. 2014-03-10 00:39:15 +01:00
Florian Bruhin
3ce1388137 Use default_conf if it's available. 2014-03-10 00:39:15 +01:00
Florian Bruhin
22506fd6f4 More config output improvments 2014-03-10 00:39:15 +01:00
Florian Bruhin
c74bfdef0e Print type and valid values 2014-03-10 00:39:15 +01:00
Florian Bruhin
7206dd674a Config cleanup 2014-03-10 00:39:14 +01:00
Florian Bruhin
7d3e8d940c More string output improvements 2014-03-10 00:39:14 +01:00
Florian Bruhin
301f952ccb Improve config output 2014-03-10 00:39:14 +01:00
Florian Bruhin
277f4d841d Add command descriptions to config file generation 2014-03-10 00:39:14 +01:00
Florian Bruhin
e4cd92a293 Make config printing work 2014-03-10 00:39:14 +01:00
Florian Bruhin
6c6a827bab Move configdata to own file 2014-03-10 00:39:14 +01:00
Florian Bruhin
5564e4365e Post-refactor bugfixes 2014-03-10 00:39:14 +01:00
Florian Bruhin
40d7fc6f14 Start refactoring new config to use types 2014-03-10 00:39:14 +01:00
Florian Bruhin
641efb5c18 Make NewConfig descriptions const 2014-03-10 00:39:14 +01:00
Florian Bruhin
4e78775d3c Fix checks 2014-03-10 00:39:14 +01:00
Florian Bruhin
cd29814ef3 Bugfix/improve config output 2014-03-10 00:39:14 +01:00
Florian Bruhin
2a7fca8652 Add more documentation 2014-03-10 00:39:14 +01:00
Florian Bruhin
b2b23e032a Implement __str__ for Config, delete unneeded __str__'s 2014-03-10 00:39:14 +01:00
Florian Bruhin
98d15de460 Fix style issues 2014-03-10 00:39:14 +01:00
Florian Bruhin
09d94bddfe Clean unused import 2014-03-10 00:39:14 +01:00
Florian Bruhin
758f75a106 Revert "Log config values."
This reverts commit f839b5bd9664a7473c25b5267d56d517e69f19cd.
2014-03-10 00:39:14 +01:00
Florian Bruhin
75481e6b13 Fix default values for fonts 2014-03-10 00:39:14 +01:00
Florian Bruhin
be4492216e Stop logging stylesheets 2014-03-10 00:39:14 +01:00
Florian Bruhin
de91985761 Log config values. 2014-03-10 00:39:14 +01:00
Florian Bruhin
d2fbbe0f6c Add logging for generated stylesheets. 2014-03-10 00:39:14 +01:00
Florian Bruhin
a49a486cef Fix config bugs 2014-03-10 00:39:14 +01:00
Florian Bruhin
ab40f59b2e Whoops, add sections.py 2014-03-10 00:39:14 +01:00
Florian Bruhin
369ee1f47e Config bugfixes.
Stylesheet still broken, but at least keybindings work.
2014-03-10 00:39:14 +01:00
Florian Bruhin
f079d6bf3b More config update/adoption 2014-03-10 00:39:14 +01:00
Florian Bruhin
54e2ba4de2 Add some new value types 2014-03-10 00:39:14 +01:00
Florian Bruhin
062e385028 Config update and cleanup 2014-03-10 00:39:14 +01:00
Florian Bruhin
4b3ae3f013 Style fixes 2014-03-10 00:39:14 +01:00
Florian Bruhin
265d8b7580 Avoid circular dependencies 2014-03-10 00:39:14 +01:00
Florian Bruhin
12b6dfc6b7 Fix syntax bugs 2014-03-10 00:39:14 +01:00
Florian Bruhin
5f6cc7b05a Fix namespace and continue config structure. 2014-03-10 00:39:14 +01:00
Florian Bruhin
395acffdc4 Start new config subsystem 2014-03-10 00:39:14 +01:00
Florian Bruhin
ad29867aa6 Remove unneccessary style globals 2014-02-23 18:20:24 +01:00
Florian Bruhin
76a627bb10 Move style related stuff to config.style 2014-02-23 18:15:08 +01:00
Florian Bruhin
3b648a4c0d Move config to config subfolder 2014-02-23 18:14:40 +01:00