Florian Bruhin
60d4dafbbb
Replace cgi.escape by html.escape.
...
cgi.escape is deprecated:
https://docs.python.org/3.4/library/cgi.html#cgi.escape
2014-08-05 23:20:26 +02:00
Florian Bruhin
f1a8f91d51
log: Adjust colors so warnings/errors are more visible.
2014-08-05 23:07:53 +02:00
Florian Bruhin
1dd56e512a
log: Fix RAMHandler so the data can change while iterating.
2014-08-05 23:07:25 +02:00
Florian Bruhin
4e200653a0
Enable python warnings with --debug
2014-08-05 22:33:08 +02:00
Florian Bruhin
d7f9ccf7e5
log: Fix lepl filter with debug logging.
2014-08-05 22:31:30 +02:00
Florian Bruhin
36511ecdb9
Add --debug-exit option for late exit debugging.
2014-08-05 22:17:29 +02:00
Florian Bruhin
f5064c6295
test: Use unittest's subTest.
...
https://docs.python.org/3.4/library/unittest.html#distinguishing-test-iterations-using-subtests
2014-08-05 22:15:12 +02:00
Florian Bruhin
4d051bea73
test_conftypes: Fix lint
2014-08-05 21:16:30 +02:00
Florian Bruhin
3c5c0fcabe
pylint: Disable too-many-lines.
2014-08-05 21:09:55 +02:00
Florian Bruhin
263ee37685
test_conftype: More tests.
2014-08-05 21:08:12 +02:00
Florian Bruhin
ac6defaa7f
test_conftypes: Cleanups.
2014-08-05 21:08:01 +02:00
Florian Bruhin
2a34366d2c
test: Remove unneeded custom __eq__ methods.
2014-08-05 21:07:37 +02:00
Florian Bruhin
7d97d54f6c
conftypes: Transform AutoSearch correctly.
2014-08-05 21:06:46 +02:00
Florian Bruhin
bc009ef462
conftypes: Check URL for SearchEngineUrl.
2014-08-05 21:06:32 +02:00
Florian Bruhin
a81bd44850
conftype: Simplify URL checking for Proxy.
2014-08-05 21:06:11 +02:00
Florian Bruhin
6011cc80ae
conftypes: Check {} correctly in ShellCommand.
2014-08-05 21:05:47 +02:00
Florian Bruhin
0766116424
conftypes: cleanup
2014-08-05 21:05:38 +02:00
Florian Bruhin
309ecb95c8
conftypes: Use special SYSTEM_PROXY object instead of 0.
2014-08-05 21:04:37 +02:00
Florian Bruhin
c94ff7b946
Fix import for get_standard_dir
2014-08-05 19:58:47 +02:00
Florian Bruhin
857533aca7
conftypes: Expand user in Directory
2014-08-05 18:47:42 +02:00
Florian Bruhin
3b93f6121b
Add more unittypes tests.
2014-08-05 18:02:52 +02:00
Florian Bruhin
a6375a8065
conftypes: handle None for RegexList.
2014-08-05 18:02:31 +02:00
Florian Bruhin
11f1c8f369
Don't default all directories to DownloadPath if empty
2014-08-05 18:02:12 +02:00
Florian Bruhin
f397b6301b
Accept prompt_accept in KeyMode.yesno
2014-08-05 17:08:40 +02:00
Florian Bruhin
8d07ec2235
test_conftypes: Add (broken) Font tests.
2014-08-05 17:08:16 +02:00
Florian Bruhin
0e645d9361
usertypes: Move QSS_FONT_REGEX to class.
2014-08-05 17:05:13 +02:00
Florian Bruhin
ec1b31a61c
test_conftypes: Add more tests.
2014-08-05 15:01:29 +02:00
Florian Bruhin
1c24faeb92
conftypes: Treat rgb(...) etc. as valid for QssColor
2014-08-05 15:00:48 +02:00
Florian Bruhin
a287c8ac68
conftypes: if -> elif
2014-08-05 15:00:24 +02:00
Florian Bruhin
963fb40961
conftypes: Various bugfixes/cleanups/tests.
2014-08-05 14:16:15 +02:00
Florian Bruhin
7c54c20808
conftypes: Fix is_none in all types
2014-08-05 13:49:03 +02:00
Florian Bruhin
a117cf0405
test_conftypes: Add more tests.
2014-08-05 13:06:03 +02:00
Florian Bruhin
4dd4b465e2
conftypes: Fix minint/maxint validation in PercList.
2014-08-05 13:05:36 +02:00
Florian Bruhin
8402aa051a
conftypes: Use slicing instead of rstrip.
...
"100%%".rstrip('%') would give use "100" instead of "100%" which is not what we
want.
2014-08-05 13:04:34 +02:00
Florian Bruhin
f414a0bf4b
conftypes: More max >= min checkes.
2014-08-05 12:46:29 +02:00
Florian Bruhin
4ee722d8b1
conftypes: Fix none_ok for many types.
2014-08-05 12:45:53 +02:00
Florian Bruhin
66af4e8c0a
conftypes: Fix String length check.
2014-08-05 12:44:37 +02:00
Florian Bruhin
8fdeab32c5
Add first tests for conftypes.
2014-08-05 07:27:29 +02:00
Florian Bruhin
98cc10b9c2
Check if maxlen/minlen make sense in conf.usertypes.String.
2014-08-05 07:26:48 +02:00
Florian Bruhin
036178147b
Draw tabbar background correctly again.
2014-08-04 19:30:09 +02:00
Florian Bruhin
95df8a045c
Don't use stylesheets anymore for QTabWidget.
...
When using stylesheets there, all children (i.e. the QWebView) use
QStyleSheetStyle as well, which means the bug at [1] will annoy us.
We had to write our own font parsing as we can't use stylesheets, but at least
the bug is gone...
https://bugreports.qt-project.org/browse/QTBUG-40263
2014-08-04 17:00:01 +02:00
Florian Bruhin
ee1b136807
Clean up pylint/noqa comments.
2014-08-04 03:47:09 +02:00
Florian Bruhin
3dc7a1b735
Lock mode while prompting.
2014-08-04 03:14:14 +02:00
Florian Bruhin
90f1d5851c
Fix lint.
2014-08-03 00:58:59 +02:00
Florian Bruhin
acfc95e19d
Simplify :hint by adding a 'fill' target.
2014-08-03 00:56:42 +02:00
Florian Bruhin
40aa387fb2
Whitespace fixes
2014-08-03 00:40:28 +02:00
Florian Bruhin
b68f22541c
Merge tab-focus-last into tab-focus.
2014-08-03 00:39:39 +02:00
Florian Bruhin
d302886b87
Fix too long lines.
2014-08-03 00:36:35 +02:00
Florian Bruhin
9e73cba333
Improve command documentation.
2014-08-03 00:33:39 +02:00
Florian Bruhin
6c4b21117c
Fix typo
2014-08-02 23:58:52 +02:00
Florian Bruhin
3467dd77ac
Document the :hint command.
2014-08-02 23:46:27 +02:00
Florian Bruhin
355acfccd2
Remove editable hinting.
...
The code for it was removed some time ago, and fixing it would mean some
unneeded code duplication. Let's remove it and see if anyone complains.
2014-08-02 23:45:39 +02:00
Florian Bruhin
aa8d66f092
Improve settings value documentation.
2014-08-02 22:54:15 +02:00
Florian Bruhin
f8c995d58d
Support multiline setting descriptions.
2014-08-02 22:53:57 +02:00
Florian Bruhin
e5c86a5337
Remove window-open-behaviour setting.
2014-08-02 21:30:20 +02:00
Florian Bruhin
de2f267607
Fix restarting/exceptions with URLs with spaces.
2014-08-02 19:49:15 +02:00
Florian Bruhin
b707987be0
Better logging on exit.
2014-08-02 19:40:24 +02:00
Florian Bruhin
3307c5f518
Shut down correctly while being asked a question.
2014-08-02 19:38:02 +02:00
Florian Bruhin
9a6bff315b
Revert "widgets.statusbar.prompter: Use None for self.question instead of _busy."
...
This reverts commit 5d5f3c7f87
.
2014-08-02 18:19:33 +02:00
Florian Bruhin
5d5f3c7f87
widgets.statusbar.prompter: Use None for self.question instead of _busy.
2014-08-02 17:58:33 +02:00
Florian Bruhin
ee1bdacf25
Show errors during prompt/command mode.
2014-08-02 17:45:51 +02:00
Florian Bruhin
2f4cd56033
bar: Make prompt color more important than insert color.
2014-08-02 17:05:28 +02:00
Florian Bruhin
1a449ef7de
Log changing of statusbar color attributes.
2014-08-02 17:05:11 +02:00
Florian Bruhin
2b123bdeb9
Make it clearer we schedule an insertmode check if hittest is null.
2014-08-02 16:55:11 +02:00
Florian Bruhin
c1d9f70fd6
Make js alert/confirm messages a bit more clear.
2014-08-02 16:16:13 +02:00
Florian Bruhin
7d9bd17aff
Fix error message when executing command in wrong mode.
2014-08-02 16:15:59 +02:00
Florian Bruhin
157975b0d4
widgets.webview: Add a cur_url property so the initial URL is available immediately.
2014-08-02 02:35:38 +02:00
Florian Bruhin
f6b26f0d56
Improve interrupt docs
2014-08-02 01:53:27 +02:00
Florian Bruhin
b0cfb281f4
shutdown correctly before mainwindow exists.
2014-08-02 01:12:05 +02:00
Florian Bruhin
2dfc599e3c
Interrupt more forcefully with 3 times Ctrl+C.
2014-08-02 00:57:32 +02:00
Florian Bruhin
cdde060135
Call shutdown via a singleShot QTimer.
2014-08-02 00:53:30 +02:00
Florian Bruhin
df0558fb47
Add a --nowindow argument.
2014-08-02 00:47:04 +02:00
Florian Bruhin
3b16207bfc
Delete network requests during shutdown.
2014-08-02 00:41:59 +02:00
Florian Bruhin
2691e6bb6b
Remove unneeded colorama.init().
...
We don't want colorama to replace stdout/stderr, so we shouldn't call .init()
at all.
2014-08-01 23:47:44 +02:00
Florian Bruhin
9dd688095c
Move late shutdown logging out of QApplication.
2014-08-01 23:45:12 +02:00
Florian Bruhin
246cff63ed
Use singleShot timer to call QApplication.exit.
2014-08-01 23:26:33 +02:00
Florian Bruhin
f19a1db120
Clean up tab shutdown.
2014-08-01 23:23:31 +02:00
Florian Bruhin
6015bed786
widgets.tabbedbrowser: Fix closing tab with mouse.
2014-08-01 14:27:57 +02:00
Florian Bruhin
b6cd0dd600
Use sys.__stderr__ for faulthandler.
2014-08-01 00:55:18 +02:00
Florian Bruhin
ad1ba4c1f7
Remove eventfilter on shutdown
2014-07-31 23:09:59 +02:00
Florian Bruhin
9ccce461c9
Stop tab loading before removing.
2014-07-31 23:05:29 +02:00
Florian Bruhin
c04ad1de45
utils.debug.trace_lines: Improve output
2014-07-31 23:03:49 +02:00
Florian Bruhin
b56df7c955
utils.debug.trace_lines: Stop tracing if sys is None
2014-07-31 22:53:57 +02:00
Florian Bruhin
c27f8b69d6
Trace lines on shutdown with --debug.
2014-07-31 21:21:07 +02:00
Florian Bruhin
70d8163353
Write to stderr in utils.debug.trace_lines.
2014-07-31 21:20:51 +02:00
Florian Bruhin
8fedf1a9be
Adjust shebangs to call python3
2014-07-31 21:14:05 +02:00
Florian Bruhin
c39bce79f6
Disable javascript/plugins when shutting down tab.
2014-07-31 20:45:18 +02:00
Florian Bruhin
682a395936
Shut down tabs while quitting
2014-07-31 20:40:21 +02:00
Florian Bruhin
55755262e1
Remove tab widgets properly when a tab is closed.
...
We forgot to do that which means we had a memory leak, and sound of tabs
continued to play when a tab was closed.
2014-07-31 19:34:30 +02:00
Florian Bruhin
d65fbb0b8c
Fix mixed tabs/spaces.
2014-07-31 19:32:00 +02:00
Florian Bruhin
cda0f561aa
Move removing of a tab out of close_tab.
2014-07-31 19:31:24 +02:00
Florian Bruhin
2358ed7d4c
Remove 'Good bye' log
2014-07-31 01:07:43 +02:00
Florian Bruhin
371c40f815
Explicitely setPage to None in WebView's __del__.
2014-07-31 00:51:11 +02:00
Florian Bruhin
d47f13e69b
Explicitely set qApp before/after calling exec_().
2014-07-31 00:48:32 +02:00
Florian Bruhin
6859ca9301
Fix lint
2014-07-30 18:56:01 +02:00
Florian Bruhin
ed4e3e2a75
Remove redundant .replace() in utils.misc.key_to_string.
2014-07-30 18:55:34 +02:00
Florian Bruhin
ffe2c7f91d
Use a string mapping for utils.misc.key_to_string.
2014-07-30 18:55:08 +02:00
Florian Bruhin
377706ec54
Handle not found crashlog gracefully
2014-07-30 18:45:56 +02:00
Florian Bruhin
d178c89a0e
Compact logged stylesheets
2014-07-30 18:27:18 +02:00
Florian Bruhin
36c4e8940e
Remove print we accidentally added.
2014-07-30 18:22:13 +02:00
Florian Bruhin
77ca7db46a
Handle early shutdown better
2014-07-30 18:21:40 +02:00
Florian Bruhin
8c78806e1c
Shutdown correctly if config is not initialized yet
2014-07-30 18:13:36 +02:00
Florian Bruhin
276315483d
Add some more logging to shutdown.
2014-07-30 18:11:35 +02:00
Florian Bruhin
19d0f832ad
Handle SIGTERM/SIGINT gracefully.
2014-07-30 18:11:22 +02:00
Florian Bruhin
17220d8ef5
Fix signal imports
2014-07-30 17:50:12 +02:00
Florian Bruhin
11ea911940
Clean up after removing shutdown code
2014-07-30 17:12:20 +02:00
Florian Bruhin
db51a51e5a
Add utilcmds and :later command.
2014-07-30 17:05:52 +02:00
Florian Bruhin
70faceea67
Check for overflows in custom Timer
2014-07-30 17:05:29 +02:00
Florian Bruhin
cb8af1de31
Merge branch 'shutdown'
...
Conflicts:
qutebrowser/widgets/webview.py
2014-07-30 16:39:01 +02:00
Florian Bruhin
b574fcfe19
Print '<Default configuration>' in crash report if it's unchanged
2014-07-29 22:51:32 +02:00
Florian Bruhin
0091b4729a
Make tabbedbrowser.now_focused private
2014-07-29 22:44:14 +02:00
Florian Bruhin
cf8a8ad3b4
Fix crash when closing tab then doing tab-focus-last.
2014-07-29 22:42:59 +02:00
Florian Bruhin
8ce779261f
Parse Content-Disposition headers more relaxed.
...
Before, we got an unhandled ValueError if there were multiple spaces in a
filename.
Instead of ignoring such a header altogether, we now add relaxed=True which
still tries to get the filename in this situation (and with a semicolon at the
line end).
Because the parser is also more relaxed in that second case, we mark a test as
expected failure.
2014-07-29 22:36:00 +02:00
Florian Bruhin
e1f9403876
Clean up hint command.
2014-07-29 02:24:04 +02:00
Florian Bruhin
425a7fd7c4
Simplify userscript running.
2014-07-29 02:05:15 +02:00
Florian Bruhin
b83dd59469
Add userscript/spawn targets to hints.
2014-07-29 01:45:42 +02:00
Florian Bruhin
016e8f3c8d
Don't explicitely fill commandline
2014-07-29 01:04:17 +02:00
Florian Bruhin
265019650b
Use enum for completions
2014-07-29 00:37:32 +02:00
Florian Bruhin
54246bacbe
Add some type checking for enums
2014-07-29 00:23:20 +02:00
Florian Bruhin
7c8f9bec0f
Use enum for keyboard modes.
2014-07-29 00:19:35 +02:00
Florian Bruhin
860ef75abc
Fix lint
2014-07-28 21:09:49 +02:00
Florian Bruhin
8d80ce2628
Switch to python 3.4 enums.
...
Our home-brewn enum wasn't really liked by pylint (many no-member errors), so
instead of adding some workaround, we just use the python 3.4 enum instead.
This however also means we need to depend on Python 3.4 and not 3.3. Maybe we
should use enum34 on Python < 3.3.
2014-07-28 20:41:42 +02:00
Florian Bruhin
54c7f29f04
Remove weird condition when cmd text ends with ' '.
...
For some reason we checked nargs if split is False. This caused the completion
to not get hidden with ":spawn ". Since this condition makes no sense (and
probably was converted wrong in be467d5e
) we remove it here.
2014-07-28 02:27:12 +02:00
Florian Bruhin
d60ff5ed27
Add a set-cmd-text command.
2014-07-28 02:16:37 +02:00
Florian Bruhin
76ff8aa30a
Add missing imports from current_url move.
2014-07-28 02:16:22 +02:00
Florian Bruhin
e0bd89b762
Add an {url} variable for commands.
...
Note this also means we don't support :spawn running in a shell anymore, as
{url} is evaluated earlier. However this should be fine, as there's no really
important use case for that anyways, and shell escaping on Windows is rather
unmaintainable.
2014-07-28 01:40:36 +02:00
Florian Bruhin
c2a7a67f30
Add some more init checks and use Tk for errors
2014-07-27 22:57:50 +02:00
Florian Bruhin
f86458a3b9
Remove shutdown code
2014-07-27 20:56:42 +02:00
Florian Bruhin
056e1bea76
Fix settabtext fuckup
2014-07-25 13:47:48 +02:00
Florian Bruhin
71a27d42d8
Don't escape & in tab titles anymore.
...
Now that we do the rendering ourselves, & doesn't have any special meaning
anymore, so we don't have to escape it (as &&) anymore.
2014-07-24 22:50:22 +02:00
Florian Bruhin
d4c3a65fe3
Start with manpage generation
2014-07-18 07:48:33 +02:00
Florian Bruhin
8f19da7e54
Fix lint
2014-07-17 21:35:27 +02:00
Florian Bruhin
abf5fbc063
Clean up config color handling
2014-07-17 16:06:14 +02:00
Florian Bruhin
34d1449cd2
Make it easier to disable tab indicator
2014-07-17 14:50:16 +02:00
Florian Bruhin
f7304298ab
Separate docstrings into command/documentation parts.
2014-07-16 20:09:41 +02:00
Florian Bruhin
1d0fa621b6
Formatting fixes
2014-07-16 18:05:17 +02:00
Florian Bruhin
a687388819
Change config descriptions to be asciidoc
2014-07-16 18:05:17 +02:00
Florian Bruhin
86b7ea4dfc
Merge branch 'tabbar'
2014-07-16 17:57:15 +02:00
Florian Bruhin
dd2027bb53
Focus webview when tabs change
2014-07-16 16:34:58 +02:00
Florian Bruhin
e3d9c252ab
Remove unneeded updateGeometry
2014-07-16 14:45:02 +02:00
Florian Bruhin
3b2acf32b5
Remove logging on resize
2014-07-16 14:17:10 +02:00
Florian Bruhin
5e06d420f9
Fix disconnecting tab signals
2014-07-16 14:11:28 +02:00
Florian Bruhin
1a1473a18e
Handle dirty tabbar layout correctly
2014-07-16 14:10:46 +02:00
Florian Bruhin
52c52e0675
Add a tab progress indicator
2014-07-16 13:51:16 +02:00
Florian Bruhin
bcbdf9090f
Make tab close mouse button configurable
2014-07-16 13:04:08 +02:00
Florian Bruhin
2d3575f6d1
Remove tab close buttons
2014-07-16 13:04:08 +02:00
Florian Bruhin
6289ef7981
Adjust vertical tabbar width
2014-07-16 13:04:08 +02:00
Florian Bruhin
7bcd8192a7
Add FIXME
2014-07-16 13:04:08 +02:00
Florian Bruhin
854d6dffcc
Various tab rendering fixes.
2014-07-16 13:04:08 +02:00
Florian Bruhin
81f3abd402
Remove unneeded tabInserted.
2014-07-16 13:04:08 +02:00