Commit Graph

3318 Commits

Author SHA1 Message Date
Florian Bruhin
dcad41c92e Never delete crash log file.
We also want to log to the crash log when segfaults happen during exit.
2014-10-14 20:48:21 +02:00
Florian Bruhin
cf6d303ad1 Improve crash log handling because of single-instance. 2014-10-14 20:47:06 +02:00
Florian Bruhin
bfcb309460 Clear favicon correctly when loading a new page.
This was accidentally deleted in e608ccbe36
Fixes #187.
2014-10-14 18:54:28 +02:00
Florian Bruhin
1c551975c4 Check if currentWidget is None in tabbed_browser.on_mode_left.
Fixes #186.
2014-10-14 17:50:50 +02:00
Florian Bruhin
f9eec48414 Set urgent hint when opening IPC tab - closes #185 2014-10-14 11:51:17 +02:00
Florian Bruhin
cfc5e80d3e ipc: Fix opening of new empty window. 2014-10-14 10:10:24 +02:00
Florian Bruhin
2e2070ef6e Rename ipc-open-target to new-instance-open-target. 2014-10-14 09:59:01 +02:00
Florian Bruhin
f8d8e1507a Fix tests on windows 2014-10-14 08:18:06 +02:00
Florian Bruhin
bda3c9b1d0 Refactor Command._inspect_function. 2014-10-14 07:59:42 +02:00
Florian Bruhin
ef8873040a Add docstrings to signal debugging. 2014-10-14 07:59:07 +02:00
Florian Bruhin
bcf8040041 Whitespace fixes. 2014-10-14 07:58:50 +02:00
Florian Bruhin
7c0a23b1b7 Fix IPC when there's no main window available. 2014-10-14 07:58:16 +02:00
Florian Bruhin
0e9177eb4f Rename ipc param to process_args to via_ipc.
This prevents shadowing of the module.
2014-10-14 07:57:42 +02:00
Florian Bruhin
817259f4f5 Add ipc-open-target config option. 2014-10-14 07:37:12 +02:00
Florian Bruhin
ca85dde71f Merge branch 'ipc' 2014-10-13 23:19:04 +02:00
Florian Bruhin
191b1dd240 Open new window for IPC args. 2014-10-13 23:14:24 +02:00
Florian Bruhin
19be96b4a8 Better invalid data logging 2014-10-13 22:51:11 +02:00
Florian Bruhin
f9c2eb836f Adjust docstring 2014-10-13 22:48:37 +02:00
Florian Bruhin
6b07fd969a Add timeout to IPC server. 2014-10-13 22:47:32 +02:00
Florian Bruhin
4617aee317 Log all socket errors 2014-10-13 22:38:40 +02:00
Florian Bruhin
103ba3b8b0 Don't log PeerDisconnectedError. 2014-10-13 22:36:05 +02:00
Florian Bruhin
bdb7cc96b4 Handle multiple connections properly #2. 2014-10-13 22:35:10 +02:00
Florian Bruhin
de41dee0b5 Add ipc logging 2014-10-13 21:38:28 +02:00
Florian Bruhin
879cdf8904 Ignore invalid UTF-8 data. 2014-10-13 21:17:49 +02:00
Florian Bruhin
7d492d7556 Ignore invalid json data. 2014-10-13 21:16:38 +02:00
Florian Bruhin
c42fc53980 Handle multiple connections properly. 2014-10-13 21:12:15 +02:00
Florian Bruhin
9e2e684124 Whitespace 2014-10-13 20:38:40 +02:00
Florian Bruhin
795a6937ac Add missing @pyqtSlot decorators. 2014-10-13 20:37:09 +02:00
Florian Bruhin
5bc4f85dc5 Fix QLocalServer error checking. 2014-10-13 20:37:00 +02:00
Florian Bruhin
a849901693 Shut down IPC cleanly on exit. 2014-10-13 20:36:23 +02:00
Florian Bruhin
6dc0bfa2d2 Convert IPCServer to a class and handle connections async. 2014-10-13 20:11:13 +02:00
Florian Bruhin
46b15a1f11 userscripts: Remove invalid encoding param to os.open.
Fixes #182.

This was a regression introduced in 17dd4732ae.
2014-10-13 15:09:23 +02:00
Florian Bruhin
a3ee504c59 Add docstrings. 2014-10-13 07:59:03 +02:00
Florian Bruhin
93dd3d8d9d Fix check for QLocalSocket.UnknownSocketError 2014-10-13 07:49:26 +02:00
Florian Bruhin
8195f1875e Ignore QLocalSocket.ServerNotFoundError while connecting. 2014-10-13 07:49:01 +02:00
Florian Bruhin
2f0bbab635 Better IPC exceptions 2014-10-13 07:47:05 +02:00
Florian Bruhin
d861645d37 Remove wrong 'self' argument. 2014-10-13 07:43:22 +02:00
Florian Bruhin
5fc3332b6b Check errors correctly when connecting to socket. 2014-10-13 07:43:12 +02:00
Florian Bruhin
94b9bd42af Add missing "return True" when connected. 2014-10-13 07:42:15 +02:00
Florian Bruhin
476dd09534 Actually start IPC server. 2014-10-13 07:42:06 +02:00
Florian Bruhin
f759106a14 Error handling when writing to running instance. 2014-10-13 07:34:15 +02:00
Florian Bruhin
451a8be748 Small cleanup. 2014-10-13 07:31:56 +02:00
Florian Bruhin
4958da9c70 Error checking on connection. 2014-10-13 07:31:48 +02:00
Florian Bruhin
869fd4f752 Add an IPCError exception. 2014-10-13 07:11:45 +02:00
Florian Bruhin
ae61ca8af9 whitespace 2014-10-13 07:09:25 +02:00
Florian Bruhin
e351217740 Wait until socket bytes are written. 2014-10-13 07:09:16 +02:00
Florian Bruhin
fdb24ff597 Move IPC to its own file. 2014-10-13 07:06:57 +02:00
Claude
111f7b6e60 fixed a typo 2014-10-12 01:16:28 +02:00
Florian Bruhin
27fe73e1b8 Add debug function to log signals. 2014-10-11 11:40:15 +02:00
Florian Bruhin
86bb1f9890 Remove local server before connecting. 2014-10-11 11:39:02 +02:00
Florian Bruhin
1238f28833 Use a variable for socketname. 2014-10-11 11:38:03 +02:00
Florian Bruhin
f231f8815b QLocalsocket foo 2014-10-10 13:16:22 +02:00
Florian Bruhin
1761d98c1b Fix lint 2014-10-10 07:50:50 +02:00
Florian Bruhin
b42d701b0c debug-console: Only create when needed 2014-10-10 07:45:44 +02:00
Florian Bruhin
637ceb9bdd debug-console: Make objreg available by default. 2014-10-10 07:42:57 +02:00
Florian Bruhin
d9ffec7183 whitespace 2014-10-10 07:41:51 +02:00
Florian Bruhin
4edd2f7079 debug-console: Log completions. 2014-10-10 07:41:15 +02:00
Florian Bruhin
9dc72b4c37 debug-console: Use a sorted set for completions. 2014-10-10 07:38:14 +02:00
Florian Bruhin
8017dae75d debug console: refactoring 2014-10-10 07:34:34 +02:00
Florian Bruhin
2280250c16 debug console: Move prompt to output 2014-10-10 06:45:24 +02:00
Florian Bruhin
d08af6b8d8 debug-console: First attempt at completion. 2014-10-09 22:15:14 +02:00
Florian Bruhin
c6ccb56208 Handle exceptions while crash dialog is shown correctly. Fixes #168. 2014-10-09 06:56:04 +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
33043f0f6c Fix lint 2014-10-08 22:20:38 +02:00
Florian Bruhin
d9213ecf17 Prevent double-entering hint mode. Fixes #160. 2014-10-08 22:19:24 +02:00
Florian Bruhin
cbdade6518 Fix saving geometry if mainwindow is closed on shutdown. Fixes #159. 2014-10-08 22:03:12 +02:00
Florian Bruhin
cb951643b6 debug-console: Clean up appending of text. 2014-10-08 21:58:32 +02:00
Florian Bruhin
26d016b219 debug-console: Move cursor to end before inserting text. Fixes #162. 2014-10-08 21:54:25 +02:00
Florian Bruhin
b238149e1e Fix closing tabs with invalid URLs. Fixes #163. 2014-10-08 21:23:03 +02:00
Florian Bruhin
ffdc176d9d Make :set-cmd-text work without valid URL. Fixes #165. 2014-10-08 21:18:26 +02:00
Florian Bruhin
b1ed3a1106 Add bugs to download workaround comment. 2014-10-08 21:12:21 +02:00
Florian Bruhin
71308b45ac Add utils.qualname. Closes #169. 2014-10-08 21:11:04 +02:00
Florian Bruhin
b5b240c3f6 Add a workaround for deleted DownloadsView. Fixes #167. 2014-10-08 20:29:29 +02:00
Florian Bruhin
61a836fec5 Merge DownloadModel into DownloadManager. 2014-10-08 20:18:44 +02:00
Florian Bruhin
fe1215c74d Clean up selection model properly in completion.
http://qt-project.org/doc/qt-5/qabstractitemview.html#setModel :

This function will create and set a new selection model, replacing any model
that was previously set with setSelectionModel(). However, the old selection
model will not be deleted as it may be shared between several views. We
recommend that you delete the old selection model if it is no longer required.
2014-10-08 17:36:59 +02:00
Florian Bruhin
de86a26473 Fix DownloadView __repr__ if model is None. Fixes #170. 2014-10-08 17:19:51 +02:00
Florian Bruhin
b7f2a6d143 Use weakref for config.on_change. Fixes #156. 2014-10-08 10:40:46 +02:00
Florian Bruhin
7956f2b8e2 Clean up :later timers correctly on exceptions. 2014-10-08 07:52:49 +02:00
Florian Bruhin
50f7067d6c Add a :repeat command. 2014-10-08 07:46:21 +02:00
Florian Bruhin
d32a0c30c6 command: Remove unneeded has_count check. 2014-10-08 07:40:53 +02:00
Florian Bruhin
1a00d6168c command: Check for handlers with count and no default. 2014-10-08 07:40:39 +02:00
Florian Bruhin
e2763da8d6 Remove checks if standard dirs exist from unittests. 2014-10-08 07:17:34 +02:00
Florian Bruhin
704df6f619 Fix docstring. 2014-10-08 07:16:27 +02:00
Florian Bruhin
04b5c0e781 Add CACHEDIR.TAG to cache. Closes #19. 2014-10-08 07:16:00 +02:00
Florian Bruhin
ef0c72a99e Create standard dirs correctly. Fixes #20. 2014-10-08 07:11:25 +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
4abb5c8f36 Fix removing of eventfilter on shutdown if not present. 2014-10-08 06:38:03 +02:00
Florian Bruhin
f6695cac7d Small whitespace fix. 2014-10-08 06:22:20 +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
86f08a8536 Clean up overriding of javaScriptPrompt. 2014-10-08 05:20:56 +02:00
Florian Bruhin
596afab1ac Fix lint 2014-10-07 23:10:58 +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
f3ad1b71e6 Clean up objreg log text. This confused me in #159. 2014-10-07 22:21:51 +02:00
Florian Bruhin
4c29d1eafd Accept click focus in debug console. Fixes #142. 2014-10-07 21:42:45 +02:00
Florian Bruhin
a17017ca46 Add logging when closing window 2014-10-07 21:36:25 +02:00
Florian Bruhin
ab4a33f907 Remove per-window eventfilter. 2014-10-07 21:34:51 +02:00
Florian Bruhin
6202477db5 Add --left/--right arguments to :tab-only. Closes #46. 2014-10-07 20:56:47 +02:00
Florian Bruhin
4d092db114 Update outdated comment 2014-10-07 20:56:27 +02:00
Florian Bruhin
d8a917575d Add a cmdutils.check_exclusive function. 2014-10-07 20:39:02 +02:00
Florian Bruhin
8ca5c09e69 Add --left/--right/--opposite to :tab-close.
This fixes the updated version of #46.
2014-10-07 20:30:31 +02:00
Florian Bruhin
72a92c09dd Move config transforming of to Qt values to configtypes.
This is a preparation for #46.
2014-10-07 19:58:30 +02:00
Florian Bruhin
4092c48f92 Scroll debug console to bottom on output. Closes #158. 2014-10-07 18:01:20 +02:00
Florian Bruhin
6af33d0e85 Handle empty lines correctly in debug console. Fixes #157. 2014-10-07 17:56:39 +02:00
Florian Bruhin
12a72a4269 Revert "Disable line wrapping in debug console."
This reverts commit 179d108071.
2014-10-07 17:41:03 +02:00
Florian Bruhin
3e31e88921 Only close window (instead of quitting) when closing last tab.
This also renames the 'quit' value for tabs->last-close to 'close' to avoid
confusion.

Fixes #154.
2014-10-07 17:09:24 +02:00
Florian Bruhin
f9dc9f4acd Fix rapid hinting. Closes #148. 2014-10-07 07:45:29 +02:00
Florian Bruhin
068cc89458 Only start timer to process args if init was successful.
This fixes an exception when there is a config error (now displays normal error
box again).
2014-10-07 07:34:03 +02:00
Florian Bruhin
d2b3f89d78 Remove frame signal workaround for hints. See #152. 2014-10-07 07:15:14 +02:00
Florian Bruhin
f0990aec32 Fix loading of quickmarks with fuzzy URLs 2014-10-07 07:04:49 +02:00
Florian Bruhin
881e45d9eb Fix exception when saving quickmark (multiwin). 2014-10-07 07:02:29 +02:00
Florian Bruhin
1ad081a2db Fix lint 2014-10-06 22:30:37 +02:00
Florian Bruhin
ae44aa01a6 Set initial focused window correctly. 2014-10-06 22:29:18 +02:00
Florian Bruhin
dfc10a7d40 Revert "Fix opening of quickstart."
This reverts commit 202b5e2bb9.

window='current' really should work properly.
2014-10-06 22:24:29 +02:00
Florian Bruhin
12bbce2914 Spelling fix 2014-10-06 22:23:27 +02:00
Florian Bruhin
a19b6bf563 Fix :view-source 2014-10-06 22:23:12 +02:00
Florian Bruhin
15a2be877a Pass win_id correctly with invalid_url_error. 2014-10-06 22:22:59 +02:00
Florian Bruhin
202b5e2bb9 Fix opening of quickstart. 2014-10-06 22:16:52 +02:00
Florian Bruhin
572dc34c42 Fix url passed to url_invalid_error. 2014-10-06 22:15:35 +02:00
Florian Bruhin
08fdfebb50 Fix import of urlutils for url_invalid_error. 2014-10-06 22:15:26 +02:00
Florian Bruhin
fbb45953db Split parsing of initial args into three functions. 2014-10-06 22:15:11 +02:00
Florian Bruhin
dfb4e283e3 Remove unused import. 2014-10-06 22:14:57 +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
de37ed64ca Remove FIXME 2014-10-06 21:30:24 +02:00
Florian Bruhin
fd9a3fc5e7 Clean up mainwindow import mess. 2014-10-06 21:24:07 +02:00
Florian Bruhin
ecd31a6450 Add tab/window support to :help 2014-10-06 20:40:00 +02:00
Florian Bruhin
9281fa3992 Fix lint/bugs 2014-10-06 19:53:50 +02:00
Florian Bruhin
796dce86ae Remove go_back() and go_forward() from WebView.
If we use these in commands.py, we spawn a new window before checking if we can
go back/forward - but we want to check that before opening a new window.
2014-10-06 19:47:35 +02:00
Florian Bruhin
d2abd06513 Add missing keybindings for window actions. 2014-10-06 19:40:28 +02:00
Florian Bruhin
8eb0489357 Add rapid window hinting. 2014-10-06 19:39:48 +02:00
Florian Bruhin
52e72a8bec Fix window spawning with hints. 2014-10-06 18:47:55 +02:00
Florian Bruhin
6324751af6 More window support. 2014-10-06 17:58:40 +02:00
Florian Bruhin
2cd4642ece Pass window ID to scheme handlers. 2014-10-06 08:27:15 +02:00
Florian Bruhin
7e209dc285 Print tab registries in :debug-all-objects. 2014-10-06 07:41:34 +02:00
Florian Bruhin
d8cd599096 Fix wrong 'is' check. 2014-10-06 07:41:26 +02:00
Florian Bruhin
85ead4273b Register tab registry under window registry with ID. 2014-10-06 07:41:05 +02:00
Florian Bruhin
d3121034df Revert "Store window registries in objreg."
This reverts commit dfd3b3d9c4.

It turns out this makes it very hard to remove the window from the window
registry at the right time.
2014-10-05 23:09:35 +02:00
Florian Bruhin
180d6e45ef Fix closeEvent of MainWindow. 2014-10-05 23:09:04 +02:00
Florian Bruhin
d260b26105 Fix objreg._get_window_registry when non-mainwindow window is focused. 2014-10-05 22:41:44 +02:00
Florian Bruhin
dfd3b3d9c4 Store window registries in objreg. 2014-10-05 22:17:29 +02:00
Florian Bruhin
b6393a1841 Get rid of meta registry 2014-10-05 21:50:14 +02:00
Florian Bruhin
6dc997a971 Remove processEvent hack which doesn't help. See #147. 2014-10-05 21:29:01 +02:00
Florian Bruhin
0d2ce778f3 Ignore on_current_changed when last tab is closed. Fixes #146. 2014-10-05 19:47:12 +02:00
Florian Bruhin
4dcaa1fdec Be more forgiving when validating URLs. Fixes #141. 2014-10-03 16:58:30 +02:00
Florian Bruhin
18ff6ea06a Fix line breaking in debugging console. Fixes #144. 2014-10-03 12:37:32 +02:00
Florian Bruhin
179d108071 Disable line wrapping in debug console.
For some reason this does not fix #144.
2014-10-03 12:24:07 +02:00
Florian Bruhin
0a6a8b4b4a Don't parse HTML in debug console. Fixes #143. 2014-10-03 12:20:39 +02:00
Florian Bruhin
22b48ad248 Open quickstart page on first start.
Fixes #4.
2014-10-03 08:39:33 +02:00
Florian Bruhin
892b54e153 Fix saving of config. 2014-10-02 22:51:59 +02:00
Florian Bruhin
5eda621a7c Clean up KeyConfParser __init__ and make it work with None.
Fixes #137.
2014-10-02 22:49:58 +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
337574f40f Fix lint 2014-10-02 22:25:48 +02:00
Florian Bruhin
a8304d03ea Clean up get_standard_dir 2014-10-02 22:24:08 +02:00
Florian Bruhin
e74fa71a0a Seprate data/config dirs on Windows.
See #21.
2014-10-02 22:12:45 +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
3a66937205 Clean up argument handling in get_standard_dir 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
e4e8d16ee8 Fix crash on error pages with URLs not encodable in latin1.
It seems PyQt does some implicit latin1 encoding when we set the content
attribute to a string rather than a bytes object.

Fixes #127.
2014-10-02 06:28:49 +02:00
Florian Bruhin
00949db2cf Add testcases for jinja.
This was an attempt to get a breaking test for #127 but it seems jinja isn't
actually the issue.
2014-10-02 06:22:06 +02:00
Florian Bruhin
c75563907a Fix getting URL in :view-source.
Fixes #128.
2014-10-02 06:06:08 +02:00
Florian Bruhin
d674b90240 Clean up FIXMEs and add github URLs 2014-10-01 22:23:27 +02:00
Florian Bruhin
2df276085c Process events before creating BrowserPage. 2014-09-30 08:07:45 +02:00
Florian Bruhin
85f8366028 Fix lint 2014-09-30 07:49:01 +02:00
Florian Bruhin
f5a4d3a184 Move show_prompt/hide_prompt signals from prompt to prompter. 2014-09-30 07:37:31 +02:00
Florian Bruhin
b958d07869 prompter: Show prompt when restoring context.
This fixes being locked in prompt mode with no prompt when a website asks a
javascript question while another one is still visible.
2014-09-30 07:14:14 +02:00
Florian Bruhin
6b8ad67558 statusbar: Ignore subsequent _show_prompt_widget.
If it's already shown, we don't want to mess with stuff again.
2014-09-30 07:13:37 +02:00
Florian Bruhin
52ea924cbe prompter: Override locked mode for questions.
This fixes a crash ([1], "ValueError: Mode KeyMode.yesno not on mode stack!")
when a website asks a second javascript question (prompt/alert/confirm) while
another one is still running.

[1] http://paste.the-compiler.org/view/8c39f5ea
2014-09-30 07:11:54 +02:00
Florian Bruhin
8864c042c8 modeman: Make it possible to override a locked mode. 2014-09-30 07:11:37 +02:00
Florian Bruhin
61ea26b7b2 Fix str() of ConfigValue 2014-09-30 06:32:51 +02:00
Florian Bruhin
ce8409feb2 Add multi window support to :restore/:restart. 2014-09-29 22:37:46 +02:00
Florian Bruhin
6aeecb3803 Fix lints/bugs 2014-09-29 20:36:53 +02:00
Florian Bruhin
686f82c5c6 webview: Remove dead search method. 2014-09-29 20:17:22 +02:00
Florian Bruhin
e031cc60c8 tabbedbrowser: Don't store a list of tabs. 2014-09-29 20:17:11 +02:00
Florian Bruhin
106ad9f4ed userscripts: Don't store a list of runners. 2014-09-29 20:16:54 +02:00
Florian Bruhin
865389bb34 Make CommandRunner a QObject. 2014-09-29 20:16:38 +02:00
Florian Bruhin
45ac2e4835 Fix getting URL for startup commands. 2014-09-29 19:56:37 +02:00
Florian Bruhin
42a1d7028d Move :later back from commands to utilcmds. 2014-09-29 19:56:25 +02:00
Florian Bruhin
0cf8abab7c Fix running of startup commands. 2014-09-29 19:56:13 +02:00
Florian Bruhin
714c9d8b01 Add win_id parameter to commands which need it. 2014-09-29 19:14:11 +02:00
Florian Bruhin
24c48df988 Open about:blank if opening startpage fails. 2014-09-29 19:13:31 +02:00
Florian Bruhin
6e61f4c586 Support opening multiple windows via init args. 2014-09-29 18:50:46 +02:00
Florian Bruhin
e6fe358d73 Clean up correctly when a window is closed. 2014-09-29 10:43:06 +02:00
Florian Bruhin
b84eb6aeb0 Add missing utilcmds import. 2014-09-29 08:52:00 +02:00
Florian Bruhin
26604a683b Fix lint 2014-09-29 07:47:32 +02:00
Florian Bruhin
cdb2e34513 Use collections.UserDict for LineConfigParser. 2014-09-29 07:41:39 +02:00
Florian Bruhin
75ba75a0d7 Check arguments against None in objreg. 2014-09-29 07:17:11 +02:00
Florian Bruhin
895f51083d Some more objreg fixes for multi-window. 2014-09-29 07:17:01 +02:00
Florian Bruhin
36f7ff6154 Fix some objreg.get calls. 2014-09-28 23:23:02 +02:00
Florian Bruhin
9533312e0d Fix event filter when a non-Mainwindow dialog has an event. 2014-09-28 22:53:24 +02:00
Florian Bruhin
16c067e32d Simplify showing of main windows. 2014-09-28 22:46:37 +02:00
Florian Bruhin
2dea47b162 Register prompt per window 2014-09-28 22:44:12 +02:00
Florian Bruhin
cc0e164dcf First attempt at adding a --window to commands. 2014-09-28 22:41:43 +02:00
Florian Bruhin
d87b0bf301 Fix pyqtSlot error for downloads. 2014-09-28 22:41:11 +02:00
Florian Bruhin
7e017e66a0 Fix basekeyparser tests. 2014-09-28 22:24:49 +02:00
Florian Bruhin
dc7b32e460 Fix lint 2014-09-28 22:23:37 +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
65d1d21d2e Always use a list for namedtuple. 2014-09-28 00:43:08 +02:00
Florian Bruhin
0fadf6b091 Use a list as items-argument for usertypes.enum 2014-09-28 00:42:53 +02:00
Florian Bruhin
8636562579 Move config init out of Application 2014-09-28 00:27:22 +02:00
Florian Bruhin
86fdf981e3 Refactor init 2014-09-28 00:18:57 +02:00
Florian Bruhin
c9d5928dce Fix lint 2014-09-27 23:21:13 +02:00
Florian Bruhin
8635dc8848 Make it possible to go back/forward in a new tab. 2014-09-27 23:14:39 +02:00
Florian Bruhin
17f2241bc0 Add a :tab-clone command. 2014-09-27 23:13:11 +02:00
Florian Bruhin
4410536f69 Refactor :undo and save/restore history. 2014-09-27 22:56:50 +02:00
Florian Bruhin
4e42ff1304 Move tab_id_gen and add tab_id to webview repr. 2014-09-26 16:44:41 +02:00
Florian Bruhin
36fd2e5c7f Improve __repr__ methods. 2014-09-26 15:48:24 +02:00
Florian Bruhin
1960cfe114 Really fix keyevent_to_string. 2014-09-26 07:31:59 +02:00
Florian Bruhin
27117246b7 Fix modifier tests on OS X 2014-09-26 07:15:54 +02:00
Florian Bruhin
99da7b697b Fix lint on OS X 2014-09-26 07:12:08 +02:00
Florian Bruhin
d4fdbf5190 Disable OS X focus rect for MinimalLineEditMixin 2014-09-25 22:58:04 +02:00
Florian Bruhin
f8f0c69d79 Fix shutdown before prompter is alive. 2014-09-25 22:56:22 +02:00
Florian Bruhin
f421b7174f Add Ctrl+C shortcut to delete line in debug console. 2014-09-25 22:48:49 +02:00
Florian Bruhin
d1fdd5e776 Bump up default font size on OS X 2014-09-25 22:46:25 +02:00
Florian Bruhin
cdb33a04cc Fix Ctrl-key on OS X 2014-09-25 22:46:25 +02:00
Florian Bruhin
538d467c8d Set default geometry properly on first run. 2014-09-25 22:46:25 +02:00
Florian Bruhin
01159bad86 Fix division by zero in tabSizeHint on OS X 2014-09-25 22:46:25 +02:00
Florian Bruhin
2ebb0063be Really fix version info on OS X 2014-09-25 22:46:25 +02:00
Florian Bruhin
66d36442d7 Fix version info on OS X 2014-09-25 21:33:03 +02:00
Florian Bruhin
9855ad6906 tabbedbrowser: Connect cur_load_started only once. 2014-09-25 19:08:15 +02:00
Florian Bruhin
c188c6986d Call on_mode_entered only once for hints. 2014-09-25 19:06:38 +02:00
Florian Bruhin
0494bc3763 Improve modeman.maybe_leave logging/exception. 2014-09-25 18:45:16 +02:00
Florian Bruhin
6b459f43f1 Improve :debug-all-objects output. 2014-09-25 18:17:52 +02:00
Florian Bruhin
1239efa615 Set application title to "qutebrowser" on tabs without title. 2014-09-25 17:39:56 +02:00
Florian Bruhin
7649dca2ef tabbedbrowser: Improve titleChanged logging. 2014-09-25 17:36:40 +02:00
Florian Bruhin
f294e28fca Remove change_title signal in QWebPage.
When emitting it inside acceptNaviationRequest we don't know if javascript will
open a new window, so we could end up setting the title for the *wrong*
(current) tab.

It seems there isn't any good solution to this problem - in
QWebView.createWindow we won't know what the URL is - so we currently just
leave it blank.
2014-09-25 17:34:55 +02:00
Florian Bruhin
7b8829286c Merge branch 'objreg' 2014-09-25 08:08:08 +02:00
Florian Bruhin
55e2ccabf5 Fix lint 2014-09-25 07:58:08 +02:00
Florian Bruhin
143fdc5b9f Register tab registry in meta registry. 2014-09-25 07:50:07 +02:00
Florian Bruhin
1e7861660e Add 'meta' scope to objreg. 2014-09-25 07:49:46 +02:00
Florian Bruhin
78949a8c1b Use object registry for hintmanager. 2014-09-25 07:49:45 +02:00
Florian Bruhin
e8ce45c440 Add a tab-scope object registry. 2014-09-25 07:49:45 +02:00
Florian Bruhin
4067b584ec Add a registry argument to objreg.register. 2014-09-25 07:43:14 +02:00
Florian Bruhin
e527db1560 Add scope argument to cmdutils.register/commands. 2014-09-25 07:41:51 +02:00
Florian Bruhin
df5ac3ab2f Use object registry for keyparsers. 2014-09-25 07:41:18 +02:00
Florian Bruhin
8421ff7ad0 Fix :restart when installed as Python egg with launcher 2014-09-25 07:07:27 +02:00
Florian Bruhin
e029139764 Fix exception when adding quickmark with empty name. 2014-09-25 06:56:25 +02:00
Florian Bruhin
c77057e88e Add a scope parameter to objreg functions. 2014-09-25 00:30:52 +02:00
Florian Bruhin
4783df8c32 Avoid download_get signal. 2014-09-25 00:29:29 +02:00
Florian Bruhin
c19b8fe982 Fix tests for object registry. 2014-09-24 23:11:17 +02:00
Florian Bruhin
34a5ad48b2 Don't pass prompt object to prompter. 2014-09-24 22:25:11 +02:00
Florian Bruhin
027e7e054e Remove obsolete EnumBase usertype. 2014-09-24 22:25:11 +02:00
Florian Bruhin
05ff908c4f Update attributes in docstrings. 2014-09-24 22:25:11 +02:00
Florian Bruhin
f2b46dc2e9 Remove srcmodel attribute from completionfilter. 2014-09-24 22:25:11 +02:00
Florian Bruhin
cb35452cf0 Remove unused flag for keyparser. 2014-09-24 22:25:11 +02:00
Florian Bruhin
62e55499eb Privatize all attributes which aren't needed from the outside. 2014-09-24 22:25:11 +02:00
Florian Bruhin
75da8a7f1b Add missing parent=None 2014-09-24 22:25:11 +02:00
Florian Bruhin
507354c8d1 Use object registry for Prompt in Prompter. 2014-09-24 22:25:10 +02:00
Florian Bruhin
8cb6ba01e3 Use object registry for TabbedBrowser in SignalFilter. 2014-09-24 22:25:10 +02:00
Florian Bruhin
59058361b8 Add missing objreg import in browser.webpage. 2014-09-24 22:25:10 +02:00
Florian Bruhin
aa5e1922ef Remove _view attribute in BrowserPage. 2014-09-24 22:25:10 +02:00
Florian Bruhin
6a5c9ba138 Use object registry for CompletionView. 2014-09-24 22:25:10 +02:00
Florian Bruhin
7e8e9ee21f Get rid of _page attribute of WebView 2014-09-24 22:25:10 +02:00
Florian Bruhin
9868721cc7 Use object registry for webview.tabbedbrowser. 2014-09-24 22:25:10 +02:00
Florian Bruhin
b119100321 Get rid of _tabs attribute in CommandDispatcher. 2014-09-24 20:21:43 +02:00
Florian Bruhin
5e8144fafa Move cntwidget to commands. 2014-09-24 19:53:31 +02:00
Florian Bruhin
fd9c4b860a Use object registry for url_stack. 2014-09-24 07:32:05 +02:00
Florian Bruhin
387622623d Detach meta object registry from application. 2014-09-24 07:27:32 +02:00
Florian Bruhin
b0a9ecf094 Detach object registry from application. 2014-09-24 07:13:53 +02:00
Florian Bruhin
aa646463b0 Also use objreg API in app 2014-09-24 07:10:17 +02:00
Florian Bruhin
3c2e584c2a Make pylint shut up with _UNSET object. 2014-09-24 07:07:31 +02:00
Florian Bruhin
3f02451828 Move object registry to its own file. 2014-09-24 07:06:45 +02:00
Florian Bruhin
b121ceef21 Use object registry for last focused tab. 2014-09-24 06:41:51 +02:00
Florian Bruhin
6090bf418d Add utils.delete_object() 2014-09-24 06:41:39 +02:00
Florian Bruhin
d32d6c9b28 Allow a default value for utils.get_object. 2014-09-24 06:41:22 +02:00
Florian Bruhin
a2d3ca6565 Make it possible to update an object in the object registry. 2014-09-24 06:25:08 +02:00
Florian Bruhin
908a69af18 Better __repr__s 2014-09-23 23:31:17 +02:00
Florian Bruhin
9aa65a2341 Fix lint and bugs 2014-09-23 23:17:36 +02:00
Florian Bruhin
2b60cdb64c Object names cleanup 2014-09-23 23:05:55 +02:00
Florian Bruhin
04be586bca Use object registry for keyconfig. 2014-09-23 22:37:41 +02:00
Florian Bruhin
fe5d9939b9 Move debug console from app to utilcmd 2014-09-23 22:31:26 +02:00
Florian Bruhin
90820126b4 Update comment 2014-09-23 22:29:03 +02:00
Florian Bruhin
953e50721c Use object registry for config. 2014-09-23 22:28:28 +02:00
Florian Bruhin
07dde5be80 Fix downloading (getting messagebrige object). 2014-09-23 22:22:44 +02:00
Florian Bruhin
b818bc5896 Use object registry for downloadmanager. 2014-09-23 22:22:03 +02:00
Florian Bruhin
7a7b397c15 Use object registry for cmd-history. 2014-09-23 22:17:25 +02:00
Florian Bruhin
8af8e3530f Use object registry for args. 2014-09-23 22:13:10 +02:00
Florian Bruhin
297e37fdf2 Remove legacy instance= parameter support. 2014-09-23 22:08:05 +02:00
Florian Bruhin
37dbfde6ac Use object registry for app. 2014-09-23 22:06:46 +02:00
Florian Bruhin
a32ed36ba6 Use object registry for mainwindow. 2014-09-23 22:05:00 +02:00
Florian Bruhin
a76c4c8ba5 Use object registry for tabbedbrowser. 2014-09-23 22:01:46 +02:00
Florian Bruhin
487300f926 Use object registry for prompter. 2014-09-23 21:56:29 +02:00
Florian Bruhin
ffaf4f0cb0 Use object registry for completion. 2014-09-23 21:50:34 +02:00
Florian Bruhin
40812f81b6 Use object registry for status-cmd. 2014-09-23 21:50:34 +02:00
Florian Bruhin
9a3ceebf2e Use object registry for completer. 2014-09-23 21:39:42 +02:00
Florian Bruhin
f5b1d3ce4d Use object registry for command-dispatcher. 2014-09-23 21:35:08 +02:00
Florian Bruhin
5f45d3de60 Use object registry for modeman. 2014-09-23 20:02:48 +02:00
Florian Bruhin
d441471a17 Use object registry for app._timers. 2014-09-23 19:53:48 +02:00
Florian Bruhin
184babbd84 Remove destroyed QObjects from ObjectRegistry. 2014-09-23 19:53:48 +02:00
Florian Bruhin
58be65f4f0 Use object registry for messagebridge. 2014-09-23 19:53:48 +02:00
Florian Bruhin
1d535ae300 Use object registry for stateconfig. 2014-09-23 19:53:48 +02:00
Florian Bruhin
21bdf517b7 Use object registry for searchrunner. 2014-09-23 19:53:48 +02:00
Florian Bruhin
68cfe499fc Use object registry for rl_bridge. 2014-09-23 19:53:48 +02:00
Florian Bruhin
ab95234dad Add object registry support to command handler. 2014-09-23 19:53:48 +02:00
Florian Bruhin
10eb849ae7 Fix lint 2014-09-23 19:53:47 +02:00
Florian Bruhin
10f3c47ae2 Add __repr__ for cookies/cache. 2014-09-23 19:53:47 +02:00
Florian Bruhin
aa681f5ad2 Merge get_all_widgets into get_all_objects. 2014-09-23 19:53:47 +02:00
Florian Bruhin
30209f531e Improve get_all_objects output. 2014-09-23 19:53:47 +02:00
Florian Bruhin
9e5d8b2480 Add a meta-registry. 2014-09-23 19:53:47 +02:00
Florian Bruhin
dce5289b69 Rename global registry from obj to registry. 2014-09-23 19:53:47 +02:00
Florian Bruhin
dc7ad3e2de Use a normal UserDict for ObjectRegistry. 2014-09-23 19:53:46 +02:00
Florian Bruhin
ca2be960df Use object registry for cache/cookiejar. 2014-09-23 19:53:20 +02:00
Florian Bruhin
3b3675d1af utils: Add helper functions get_object/register_object. 2014-09-23 19:53:15 +02:00
Florian Bruhin
2694ab2e80 app: Make commandrunner/debugconsole private. 2014-09-23 19:51:52 +02:00
Florian Bruhin
097645ae8e app: Support object registry in get_all_objects. 2014-09-23 19:51:52 +02:00
Florian Bruhin
981604fc8b Add initial object registry. 2014-09-23 19:51:52 +02:00
Florian Bruhin
1ce1c91d69 app: Refactor get_all_objects. 2014-09-23 19:51:52 +02:00
Florian Bruhin
698e4049d3 Fix :bind command. 2014-09-23 17:40:56 +02:00
Florian Bruhin
f4876c7f4f Split docutils from utils 2014-09-23 04:22:51 +02:00
Florian Bruhin
9954a08ea2 Fix commands with ignore_args=True (e.g. :restart) 2014-09-22 22:46:03 +02:00
Florian Bruhin
a4079bb39e Split :navigate into several functions 2014-09-22 22:36:31 +02:00
Florian Bruhin
d5a294ae55 commands: Move tab opening to _open functions. 2014-09-22 22:27:19 +02:00
Florian Bruhin
207bb00c50 Add increment/decrement to :navigate 2014-09-22 21:51:09 +02:00
Florian Bruhin
4213550206 Add :navigate up 2014-09-22 21:16:21 +02:00
Florian Bruhin
4615d22a5a browser.commands: Refactor :navigate. 2014-09-22 21:08:11 +02:00
Florian Bruhin
9145ba9656 Adjust comment 2014-09-22 21:03:01 +02:00
Florian Bruhin
51413094bf Merge prev-page/next-page into a navigate command. 2014-09-22 21:01:52 +02:00
Florian Bruhin
bc01f3a780 Fix spelling of temporarily 2014-09-22 20:44:07 +02:00
Florian Bruhin
e26606b0d6 Add /usr/bin/env to shebangs 2014-09-22 20:21:00 +02:00
Florian Bruhin
688b9a57cb Add missing is_visible check for hints. 2014-09-22 20:06:17 +02:00
Florian Bruhin
812a0fdd41 Merge branch 'newcmd'
Conflicts:
	.flake8
	pkg/PKGBUILD.qutebrowser-git
	qutebrowser/browser/commands.py
	qutebrowser/browser/hints.py
	qutebrowser/config/configdata.py
	qutebrowser/network/qutescheme.py
	qutebrowser/test/config/test_configtypes.py
	qutebrowser/utils/utils.py
2014-09-22 19:09:48 +02:00
Florian Bruhin
53b617590f Maybe fix segfault on download errors. 2014-09-22 17:56:23 +02:00
Florian Bruhin
7cf9989bff Fix text color in command right click menu 2014-09-22 13:24:00 +02:00
Florian Bruhin
def417b8a5 Check if docs are up to date if running from git repo. 2014-09-21 22:15:56 +02:00
Florian Bruhin
81b6a92183 Add error if help was not found 2014-09-21 21:21:41 +02:00
Florian Bruhin
84cdb30bcb webelem: Avoid unnecessary ::geometry calls 2014-09-19 17:39:37 +02:00
Florian Bruhin
658053842e hints: Wrap elements after checking is_visible.
Wrapping thousands of elements is really slow (>3 seconds for hinting on a
reddit page, because we wrap ~2500 elements with 50 methods each), so we try to
filter the elements first before wrapping them, as the visible elements will be
much less.
2014-09-19 12:32:28 +02:00
Florian Bruhin
2686278b48 webelem: Make it possible to use is_visible with unwrapped elements. 2014-09-19 12:30:38 +02:00
Florian Bruhin
bc884ed51e webelem: Refuse to wrap a wrapper in WebElementWrapper. 2014-09-19 12:28:23 +02:00
Florian Bruhin
a0cc55037e webelem: Get rid of functools.wraps/functools.update_wrapper. 2014-09-19 11:35:10 +02:00
Florian Bruhin
1eb9bb079c Hide scrollbars via CSS. 2014-09-19 00:37:55 +02:00
Florian Bruhin
1bc5160453 Make it possible to use CSS strings in ui->user-stylesheet. 2014-09-19 00:35:17 +02:00
Florian Bruhin
c3531de71a Clean up autohide and make it work on start. 2014-09-18 19:06:43 +02:00
Florian Bruhin
076ed43ec0 Add auto-hide option for tabs. 2014-09-18 18:15:37 +02:00
Florian Bruhin
906a049382 Fix lint 2014-09-18 17:25:48 +02:00
Florian Bruhin
7f76c3ba13 safe_shlex_split: cleanup and don't do double-lexing 2014-09-18 16:58:38 +02:00
Florian Bruhin
1c1534b5f6 safe_shlex_split: Use real lexer object and handle ' correctly. 2014-09-18 16:57:07 +02:00
Florian Bruhin
0c4d15ea5a safe_shlex_split: Fix broken \' in test. 2014-09-18 16:56:50 +02:00
Florian Bruhin
7de0b85dda safe_shlex_split: Adjust docstring 2014-09-18 16:15:57 +02:00
Florian Bruhin
6a86924e60 safe_shlex_split: Give up after 3 tries. 2014-09-18 16:15:37 +02:00
Florian Bruhin
2e35685fe1 safe_shlex_split: Don't split None. 2014-09-18 16:15:13 +02:00
Florian Bruhin
38108c68a2 Add tests for single quote with safe_shlex_split. 2014-09-18 16:14:31 +02:00
Florian Bruhin
b2340611f2 Allow - in font names. 2014-09-18 13:25:52 +02:00
Florian Bruhin
cef1dfe368 Remove exception handling code for qutescheme.
The exceptions now get handled by @prevent_exceptions on the createRequest
method of the NetworkManager, causing the exception handler to pop up properly.
2014-09-16 22:08:10 +02:00
Florian Bruhin
3bded60ba6 Prevent exceptions in NetworkManager::createRequest. 2014-09-16 22:08:00 +02:00
Florian Bruhin
644dfe53e2 Add a decorator to prevent Exceptions (to prevent segfaults). 2014-09-16 22:06:48 +02:00
Florian Bruhin
5eef6d422d Better exception formatting and handling. 2014-09-16 08:20:19 +02:00
Florian Bruhin
2e419d413b Catch exceptions in version.version() in CrashDialog. 2014-09-16 07:34:27 +02:00
Florian Bruhin
8f2ad91086 Fix lint 2014-09-16 07:34:07 +02:00
Florian Bruhin
c47fa840a0 network.qutescheme: Workaround for segfault on exceptions. 2014-09-16 07:16:30 +02:00
Florian Bruhin
4bab430c32 utils.version: Use programmatic imports. 2014-09-16 07:16:15 +02:00
Florian Bruhin
d039a29fc9 Move more logic into earlyinit from qutebrowser.py. 2014-09-16 06:39:39 +02:00
Florian Bruhin
3234d9a821 earlyinit refactor: Use programmatic imports. 2014-09-16 06:21:40 +02:00
Florian Bruhin
18e56eca90 earlyinit: Fix text for debian. 2014-09-16 05:24:20 +02:00
Florian Bruhin
55216e207f configdata: Move Consolas further back in font list.
Consolas generally is quite a nice font, but in this font size it shows a lot
of bleeding and Courier New is much more readable, so we only use it as
fallback now.
2014-09-15 22:24:32 +02:00
Florian Bruhin
d1ddc8c6cb Fix lint 2014-09-15 22:01:13 +02:00
Florian Bruhin
f5ecba0d07 Move exit logging to app.py for Python2 compatibility. 2014-09-15 21:55:38 +02:00
Florian Bruhin
19afa69d87 view_source: Add line numbers. 2014-09-15 18:19:56 +02:00
Florian Bruhin
175d25b3c4 Merge branch 'master' of ssh://cmpl.cc:2323/qutebrowser 2014-09-15 18:01:20 +02:00
Florian Bruhin
3bd55b2140 Add keybinding for view_source. 2014-09-15 18:00:06 +02:00
Florian Bruhin
715aec991e Add view_source command. 2014-09-15 17:59:54 +02:00
Florian Bruhin
14cc77ff42 Add pygments as dependency. 2014-09-15 17:59:33 +02:00
Florian Bruhin
34b0cf429c command: Cleanup 2014-09-15 08:16:19 +02:00
Florian Bruhin
8a51aa759e command: Clean up ParamType. 2014-09-15 07:46:50 +02:00
Florian Bruhin
e1d93fa3fa Move inspect stuff from cmdutils to command. 2014-09-15 07:42:21 +02:00
Florian Bruhin
81aa08593b hints: Ignore invalid href's instead of crashing. 2014-09-15 06:54:05 +02:00
Florian Bruhin
ad2435fa0b hints: Small cleanup 2014-09-15 06:53:05 +02:00
Florian Bruhin
00193df99e hints: Fix URL resolving crash with new WebElement API. 2014-09-15 06:52:34 +02:00
Florian Bruhin
f7c0f8f11e Remove :get and use :set with ...? instead. 2014-09-15 06:24:15 +02:00
Florian Bruhin
22e6a26ec3 Fix function calls with changed attribute names. 2014-09-15 06:20:33 +02:00
Florian Bruhin
fa9d9b62b1 config: Use sectname/optname argument names. 2014-09-15 00:03:59 +02:00
Florian Bruhin
f2e68685d2 Fix doc generation with overridden argument names. 2014-09-15 00:03:39 +02:00
Florian Bruhin
4d3b3616a6 Fix lint 2014-09-14 23:56:19 +02:00
Florian Bruhin
063be350e4 cmdutils: Merge _param_to_argparse_args and _param_to_argparse_kw. 2014-09-14 23:34:55 +02:00
Florian Bruhin
66f0aa8d5f cmdutils: Bind keyword-only arguments as flags. 2014-09-14 23:25:40 +02:00
Florian Bruhin
fe08052641 command: Don't handle varargs if they are None 2014-09-14 23:16:54 +02:00
Florian Bruhin
b9216bca15 Fix hint command arguments. 2014-09-14 23:16:35 +02:00
Florian Bruhin
1fd8fb57a6 Use *args for commands where possible. 2014-09-14 23:10:51 +02:00
Florian Bruhin
f1f05516b3 command: Fix handling of count when it's not given. 2014-09-14 23:06:52 +02:00
Florian Bruhin
b2058e2f0e cmdutils: Default to nargs='+' for *args. 2014-09-14 22:56:02 +02:00
Florian Bruhin
d4f584684b command: Iterate over function signature when calling instead over namespace. 2014-09-14 22:48:25 +02:00
Florian Bruhin
4b759c5513 cmdutils: Make sure functions don't have **kwargs. 2014-09-14 22:48:00 +02:00
Florian Bruhin
cd8d137dd6 cmdutils: Bail out if instance is given but function takes no self. 2014-09-14 22:47:18 +02:00
Florian Bruhin
319ea242da cmdutils: raise TypeError instead of ValueError. 2014-09-14 22:46:48 +02:00
Florian Bruhin
ef31157f5e cmdutils: Use inspect.getdoc 2014-09-14 22:09:01 +02:00
Florian Bruhin
3391896037 Disable workaround for PyQt 5.3.2 2014-09-14 21:12:03 +02:00
Florian Bruhin
74b45aea47 conftypes: Better handling of ShellCommand. 2014-09-13 00:42:16 +02:00
Florian Bruhin
fea3524443 Remove 'or None' in docs. 2014-09-13 00:37:07 +02:00
Florian Bruhin
38c341e3ea Add count info in commands. 2014-09-13 00:33:54 +02:00
Florian Bruhin
80ef0782d5 Improve some docstrings. 2014-09-13 00:22:27 +02:00
Florian Bruhin
2336b5de43 Refactor qutehandlers so they are not classmethods. 2014-09-12 20:27:20 +02:00
Florian Bruhin
16caa9ba69 Handle qute://help more intuitively (load index.html) 2014-09-12 20:19:27 +02:00
Florian Bruhin
0c9d7723c8 Fix on_config_changed for tabbar (renamed to tabs) 2014-09-12 20:15:20 +02:00
Florian Bruhin
f2b10160cc Handle IOError with qute://help. 2014-09-12 20:10:13 +02:00
Florian Bruhin
ab0e600977 Error if unknown sections are in the config. 2014-09-12 17:53:27 +02:00
Florian Bruhin
052fa8e277 Don't emit config changed signals during init.
When we're initializing anyways nobody got a config value yet, so emitting the
signals just will mean code gets executed twice.

This reduces the startup time by about 1-2 seconds.
2014-09-12 17:38:40 +02:00
Florian Bruhin
cd14cbbfb8 Handle changed config correctly for interpolated values. 2014-09-12 17:26:47 +02:00
Florian Bruhin
a796482c83 Support !-keysections, don't bind leave-mode in normal mode. 2014-09-12 07:33:52 +02:00
Florian Bruhin
e516589fe3 Fix double default keybindings. 2014-09-12 07:18:04 +02:00
Florian Bruhin
c0e8352c95 Allow unbinding keys. 2014-09-09 23:12:55 +02:00
Florian Bruhin
4fde56a942 Allow binding keys. 2014-09-09 23:05:28 +02:00
Florian Bruhin
277dab4069 keyconfparser: Add empty sections. 2014-09-09 22:38:14 +02:00
Florian Bruhin
95d8091205 Fix double bindings 2014-09-09 22:34:20 +02:00
Florian Bruhin
30e926abf6 Check duplicate keychains 2014-09-09 22:29:17 +02:00
Florian Bruhin
e3d16f3bbe Full read-write support for key config. 2014-09-09 22:18:00 +02:00
Florian Bruhin
414ab88a0e Fix lint 2014-09-09 18:32:18 +02:00
Florian Bruhin
91514ad6c0 Add missing keyconfparser file. 2014-09-09 13:42:25 +02:00
Florian Bruhin
6f03f08111 Make new key config work (readonly) 2014-09-09 07:43:27 +02:00
Florian Bruhin
64183b5a26 Start moving keybindings 2014-09-08 16:53:33 +02:00
Florian Bruhin
070d5ae300 Add more documentation. 2014-09-08 12:21:47 +02:00
Florian Bruhin
1220f0c5fd Move webelem from utils to browser. 2014-09-08 10:30:05 +02:00
Florian Bruhin
6f22319158 webview: Fix insert mode check. 2014-09-08 10:23:18 +02:00
Florian Bruhin
25da8dd169 webelem: Fix debug output 2014-09-08 10:19:52 +02:00
Florian Bruhin
381b06e967 Fix lint 2014-09-08 07:44:32 +02:00
Florian Bruhin
5e6150e665 Add a :help command. 2014-09-08 07:36:18 +02:00
Florian Bruhin
0267dac2be Add --help documentation 2014-09-08 07:36:18 +02:00
Florian Bruhin
fc70d700b2 cmdutils: Force metavar if choices are given. 2014-09-08 07:36:17 +02:00
Florian Bruhin
dcfb52847f Nicer flag output in docs. 2014-09-08 07:36:17 +02:00
Florian Bruhin
4cf7e6e767 Add docstring for :quickmark-load. 2014-09-08 07:36:17 +02:00
Florian Bruhin
6674eedfae cmdutils: Add default value type to multitype_conv tuple. 2014-09-08 07:36:17 +02:00
Florian Bruhin
13a2506c6a argparser: Also catch TypeError for multitype_conv. 2014-09-08 07:36:17 +02:00
Florian Bruhin
47f42f9e5a commands.argparser: Make type tuples a set(). 2014-09-08 07:36:17 +02:00
Florian Bruhin
05f3809d01 Fix lint 2014-09-08 07:36:17 +02:00
Florian Bruhin
0a094c6e58 Refactor HintManager.start 2014-09-08 07:36:17 +02:00
Florian Bruhin
b453ae563e Clean up docstring parsing and move it into qutebrowser for commands. 2014-09-08 07:36:17 +02:00
Florian Bruhin
b5f28b6ff2 commands.argparser: Make ArgumentParser take args, add name. 2014-09-08 07:36:17 +02:00
Florian Bruhin
a656c8cfb0 commands: Add initial --help argument support. 2014-09-08 07:36:17 +02:00
Florian Bruhin
32e24479b9 commands.cmdutils: Clean up decorator. 2014-09-08 07:36:17 +02:00
Florian Bruhin
03a0a1c599 commands: Handle ArgumentParser exit. 2014-09-08 07:36:17 +02:00
Florian Bruhin
57d51ad9bb Lots of fixes for new command system.
Squashed commit:

- Fix getting current URL
- Get rid of *args for hints.
- Make enums work.
- Fix moving commands to utilcmds.
- Fix enums in argparse
- Fix arg splitting for hints.
- Fix default enum args.
- Fix argument splitting for hints if None is given.
- Fix set_cmd_text with flags and fix {url}.
- Fix unittests
- Fix tuple types for arguments.
- Fix scroll-page.
- Fix lint
- Fix open_target.
- Others
2014-09-08 07:36:17 +02:00
Florian Bruhin
d836e26107 Nicer debug printing of functions. 2014-09-08 07:36:17 +02:00
Florian Bruhin
a811f8cb07 Start initial newcmd stuff. 2014-09-08 07:36:17 +02:00
Florian Bruhin
84a034d7e9 More liberal quoting. 2014-09-08 07:35:18 +02:00
Florian Bruhin
522b408fde utils.completer: Quote strings for completion. 2014-09-08 07:12:55 +02:00
Florian Bruhin
6b8c597d18 Remove unused import. 2014-09-04 20:35:26 +02:00
Florian Bruhin
b856bf3a47 Improve webelement API 2014-09-04 20:30:59 +02:00
Florian Bruhin
becc4490bc Add FIXME to qurl 2014-09-03 22:56:54 +02:00
Florian Bruhin
b789d14513 Improve prev-page/next-page matching and logging. 2014-09-03 22:55:48 +02:00
Florian Bruhin
5ba3440369 Add details to colorama workaround. 2014-09-03 22:20:17 +02:00
Florian Bruhin
15b8c553c8 Fix rl-unix-line-discard by reimplementing QLineEdit::home. 2014-09-03 21:30:30 +02:00
Florian Bruhin
e3bb3af7ba Make it possible to use pdb for debugging. 2014-09-03 13:31:01 +02:00
Florian Bruhin
71796e9528 Fix statusbar text when entering insert mode via hints.
Before, hints cleaned the statusbar text delayed, clearing the "==== INSERT
MODE ====" in the statusbar.

Now we only reset the text if it wasn't changed.
2014-09-03 11:51:24 +02:00
Florian Bruhin
3e904f4c52 Fix crash when using commands on startup which need a widget. 2014-09-03 11:32:56 +02:00
Florian Bruhin
ccfc0b3c19 Get rid of most @property's.
They were problematic because they're executing hidden code, and also PyQt
hides exceptions happening inside them.
2014-09-02 23:37:47 +02:00
Florian Bruhin
a2e457ccc3 Remove old Ubuntu workaround. 2014-09-02 20:45:25 +02:00
Florian Bruhin
4caec2becb Document and mark workarounds. 2014-09-02 20:44:58 +02:00
Florian Bruhin
bcaba3f5ca Rename tests to reflect renamed modules. 2014-09-02 08:27:53 +02:00
Florian Bruhin
83e9638d42 Add fancy URL to tests. 2014-09-02 08:21:53 +02:00
Florian Bruhin
e112038a8b Handle IPv6 literals correctly. 2014-09-02 08:20:33 +02:00
Florian Bruhin
330af95778 Strip spaces in url string correctly. 2014-09-02 07:49:06 +02:00
Florian Bruhin
96c1d53222 urlutils: Strip URL before testing. 2014-09-02 07:11:01 +02:00
Florian Bruhin
892c02268a Shut down NetworkManager before deleting WebPage.
Now that the QWebPage actually is a parent of the QNetworkAccessManager, first
setting the page to None and then deleting the QNetworkAccessManager will get
us a RuntimeError because the underlying C++ object is already gone.
2014-09-02 07:02:21 +02:00
Florian Bruhin
7813f8f0c2 Remove unused cookiejar NetworkManager, fix parenting.
Before, the QWebPage got passed to the QNetworkAccessManager as cookiejar,
causing no parent to be set. Now, the QWebPage actually owns the
QNetworkAccessManager.
2014-09-02 07:00:02 +02:00
Florian Bruhin
71a2ade637 Fix URL detection corner cases. 2014-09-02 06:53:52 +02:00
Florian Bruhin
2bf616ff78 Adjust QWebSettings paths. 2014-09-01 21:56:30 +02:00
Florian Bruhin
428d70c746 Add a network disk cache. 2014-09-01 19:42:21 +02:00
Florian Bruhin
6d97da7bcc browser.downloads: Download with default name if path is given. 2014-09-01 17:51:49 +02:00
Florian Bruhin
0a646b110b Store cookies in binary format.
We saved/opened cookies as UTF-8 which lead to an exception on saving with a
cookie with an ä in it.

ISO-8859-1 would be more appropriate, but we trust Qt to make the right choice
and don't re-encode anything now.
2014-09-01 16:22:01 +02:00
Florian Bruhin
e163478782 Handle Shift-Return keypresses correctly. 2014-08-30 14:38:34 +02:00
Florian Bruhin
c0a88bf3d0 qute:log: Scroll to bottom on load 2014-08-29 07:38:07 +02:00
Florian Bruhin
d8fa2e8ef0 Fix lint 2014-08-29 07:34:44 +02:00
Florian Bruhin
d059c468af Merge branch 'ninja' 2014-08-29 07:33:43 +02:00
Florian Bruhin
f44896cc44 Add a VDEBUG logging level. 2014-08-29 07:33:37 +02:00
Florian Bruhin
2cc2e769c3 network.qutescheme: Make pylint shut up. 2014-08-29 07:07:21 +02:00
Florian Bruhin
1dce50309b First steps at using jinja2 for qute:log. 2014-08-29 06:59:44 +02:00
Florian Bruhin
0f0929ac78 Use jinja for most qute:... pages. 2014-08-29 06:41:18 +02:00
Florian Bruhin
c9ea83ca7b Fix lint 2014-08-29 06:14:52 +02:00
Florian Bruhin
bf515a4104 Adjust import 2014-08-28 22:11:30 +02:00
Florian Bruhin
d6b1b7be3a Handle exceptions in QWebPage::extension differently. 2014-08-28 22:11:10 +02:00
Florian Bruhin
350f1c1405 Use inherited templates for error page. 2014-08-28 20:14:40 +02:00
Florian Bruhin
dd3489b936 Add spaces in templates. 2014-08-28 20:14:40 +02:00
Florian Bruhin
a6ae129595 Use jinja for error page. 2014-08-28 20:14:40 +02:00
Florian Bruhin
0b15790f3d Use jinja for stylesheets. 2014-08-28 20:14:40 +02:00
Florian Bruhin
a4c87b4c54 Remove STYLESHEET class attribute from docstrings. 2014-08-28 20:14:40 +02:00
Florian Bruhin
0d42eaa152 Remove useless getraw() from ColorDict/FontDict. 2014-08-28 20:14:40 +02:00
Florian Bruhin
2fdf241da2 Add dependency on jinja2. 2014-08-28 20:14:40 +02:00
Florian Bruhin
6d2acc244c Use an LRU cache for stylesheets 2014-08-28 20:14:40 +02:00
Florian Bruhin
5176dac391 Raise exceptions in QWebPage::extensions properly. 2014-08-28 20:14:24 +02:00
Florian Bruhin
cb2dd62dc5 Fix lint 2014-08-27 22:23:37 +02:00
Florian Bruhin
3a73f9f532 Improve performance with statusbar error property 2014-08-27 21:03:43 +02:00
Florian Bruhin
af10d1c857 Fix cache invalidation for on_setting_changed. 2014-08-27 20:22:38 +02:00
Florian Bruhin
68ef9b97a3 Add an LRU cache to the config. 2014-08-27 20:16:04 +02:00
Florian Bruhin
562388fe52 Rename config.conftypes to config.configtypes. 2014-08-26 21:41:41 +02:00
Florian Bruhin
ce4a5affa4 Rename commands.utils to commands.cmdutils. 2014-08-26 20:48:39 +02:00
Florian Bruhin
270b822908 Simplify imports in keyinput.modeman. 2014-08-26 20:38:50 +02:00
Florian Bruhin
c72bfff306 Rename commands.exceptions to commands.cmdexc. 2014-08-26 20:38:10 +02:00
Florian Bruhin
5adf48ed3d Rename utils.url to utils.urlutils. 2014-08-26 20:33:41 +02:00
Florian Bruhin
8bd64382bd Rename utils.qt to utils.qtutils. 2014-08-26 20:25:11 +02:00
Florian Bruhin
d9a8cbe7ad Rename utils.misc to utils.utils 2014-08-26 20:20:17 +02:00
Florian Bruhin
b4298c2922 Remove 'as logger' imports. 2014-08-26 20:15:41 +02:00
Florian Bruhin
e04b31eb90 Remove qt_ prefix from qtutils functions. 2014-08-26 19:23:06 +02:00
Florian Bruhin
d625cde28c Clean up imports 2014-08-26 19:10:14 +02:00
Florian Bruhin
45608ee9f8 Add bugs URL to colorama issue 2014-08-26 06:35:58 +02:00
Florian Bruhin
1a24e953c6 Better way to deinit colorama 2014-08-25 22:26:52 +02:00
Florian Bruhin
f452b02b24 Turn off repainting while moving tabs.
Before we had some flashing because we're removing the tab, inserting the new
one, and then focusing the new one.
2014-08-25 15:41:19 +02:00
Florian Bruhin
2b85093d90 Fix ss/sl/sk keybindings. 2014-08-25 15:41:06 +02:00
Florian Bruhin
743cc47229 Default to delta=1 for gl/gr. 2014-08-25 15:40:48 +02:00
Florian Bruhin
03cb9c353b Fix clipboard selection in :paste on windows. 2014-08-25 15:28:07 +02:00
Florian Bruhin
984f984cf0 Fix lint. 2014-08-25 10:58:12 +02:00
Florian Bruhin
012482ce10 Fix colorama log issues on Windows when frozen.
With the new version of colorlog, colorama.init() gets called when opening
colorlog, which then lead to sys.stderr not being None anymore (but a wrapped
"None"), which lead to an exception when we checked isatty().

We now just unwrap these again.
2014-08-25 10:52:38 +02:00
Florian Bruhin
d2b7530c0a Merge branch 'master' of ssh://lupin/qutebrowser 2014-08-25 07:01:33 +02:00
Florian Bruhin
bbcf593f38 Fix logfilter 2014-08-25 06:58:41 +02:00
Florian Bruhin
66e670a96b Fix ignore_case for searching. 2014-08-25 06:56:14 +02:00
Florian Bruhin
e576ff608f utils.webelem: Don't treat select boxes as editable. 2014-08-22 07:54:48 +02:00
Florian Bruhin
c826db7e03 Make editor config configurable 2014-08-20 20:57:10 +02:00
Florian Bruhin
17dd4732ae Add explicit encoding to open() calls. 2014-08-20 20:33:14 +02:00
Florian Bruhin
05727b2584 Merge branch 'master' of ssh://cmpl.cc:2323/qutebrowser 2014-08-20 15:08:07 +02:00
Florian Bruhin
cd117ccabb Treat ACE editor as editable. 2014-08-20 15:07:33 +02:00
Florian Bruhin
d18a025d68 earlyinit: Beautify messages 2014-08-15 18:58:46 +02:00
Florian Bruhin
f1f5c344bc Whitespace fix 2014-08-14 15:11:48 +02:00
Florian Bruhin
36572bc0cb Add pypeg2 to version info 2014-08-14 15:08:33 +02:00
Florian Bruhin
9585b3c925 Add some logging for content-disposition 2014-08-14 14:59:13 +02:00
Florian Bruhin
c7bfe784e4 Adjust the rest of the code for rfc6266 -> pypeg2 2014-08-14 13:37:27 +02:00
Florian Bruhin
ef1035f2ba utils.rfc6266: Fix lint 2014-08-14 13:29:07 +02:00
Florian Bruhin
9cf80cf498 utils.rfc6266: Cleanup 2014-08-14 13:29:07 +02:00
Florian Bruhin
62b00e5ff6 utils.rfc6266: Test for invalid ISO-8859-1 and duplicate params. 2014-08-14 13:29:06 +02:00
Florian Bruhin
03ea837211 utils.rfc6266: Do parsing of ext-values earlier. 2014-08-14 13:29:06 +02:00
Florian Bruhin
33b1cc6916 utils.rfc6266: Remove percent_decode function. 2014-08-14 13:29:06 +02:00
Florian Bruhin
9ae5a90f5e utils.rfc6266: Remove unneeded IKeyword. 2014-08-14 13:29:06 +02:00
Florian Bruhin
532f739e26 tests: Fix rfc6266 testcase. 2014-08-14 13:29:06 +02:00
Florian Bruhin
acb5159791 utils.rfc6266: Nicer ext-param handling 2014-08-14 13:29:06 +02:00
Florian Bruhin
e159990363 utils.rfc6266: Initial implementation. 2014-08-14 13:29:06 +02:00
Florian Bruhin
f13607ced2 Fix lint 2014-08-14 13:28:48 +02:00
Florian Bruhin
1a91972a5c console: Ignore empty texts 2014-08-13 09:08:31 +02:00
Florian Bruhin
4cab864ea0 console: Add 'self' to locals. 2014-08-13 09:07:18 +02:00
Florian Bruhin
0ec6234030 widgets.misc: Prevent moving cursor to prompt in CommandLineEdit. 2014-08-13 09:02:53 +02:00
Florian Bruhin
3ea0f0d8a6 Make CommandPrompt aware of its prompt. 2014-08-13 07:45:57 +02:00
Florian Bruhin
4318a01774 console: Add qApp to locals. 2014-08-13 07:14:21 +02:00
Florian Bruhin
2586f5ca9a console: Never give focus to output view. 2014-08-13 07:10:36 +02:00
Florian Bruhin
47e405dda5 Stop history browsing at the correct places. 2014-08-13 07:10:24 +02:00
Florian Bruhin
9c69ea3c45 Use a validator function for ConsoleLineEdit.
The prompts provided (e.g. sys.ps1/sys.ps2) could change during the lifetime of
the validator.
2014-08-13 07:10:05 +02:00
Florian Bruhin
73214836da console: Set nicer font 2014-08-13 06:56:46 +02:00
Florian Bruhin
35d0fe2b52 console: Print prompts. 2014-08-13 06:54:08 +02:00
Florian Bruhin
5b61487130 Refactor different LineEdit classes. 2014-08-13 06:53:36 +02:00
Florian Bruhin
b9e4dd282c cmdhistory: Make history public. 2014-08-13 06:53:02 +02:00
Florian Bruhin
2e760a92cf debug-console: Handle I/O and exceptions. 2014-08-13 06:09:18 +02:00
Florian Bruhin
103a81a976 console: Set focus on line edit. 2014-08-13 05:15:58 +02:00
Florian Bruhin
2a40002c2d Add instance for :debug-console command. 2014-08-13 05:15:21 +02:00
Florian Bruhin
07fda5818c Add broken debugging console. 2014-08-13 00:13:32 +02:00
Florian Bruhin
0233d2b561 configdata: Default insert-mode-on-plugins to false 2014-08-12 23:26:21 +02:00
Florian Bruhin
48e81b34d0 http: remove change_content_type.
We're probably not going to need it.
2014-08-12 21:16:33 +02:00
Florian Bruhin
cdd7457aee utils.http: Return [None, None] in parse_content_type. 2014-08-12 21:12:13 +02:00
Florian Bruhin
dd2ed78f40 Handle wrong image/jpg mimetype in unsupportedContent slot. 2014-08-12 21:08:13 +02:00
Florian Bruhin
298f672084 Whitespace fix 2014-08-12 18:30:15 +02:00
Florian Bruhin
3c9aad8e26 Add some messages to searching 2014-08-12 17:32:50 +02:00
Florian Bruhin
5b915186d7 Add a 'smart' option for ignore-case. 2014-08-12 17:00:18 +02:00
Florian Bruhin
5b3abfa5dd tests: Disable logging properly. 2014-08-12 16:28:32 +02:00
Florian Bruhin
07100178f3 networkmanager: Formatting 2014-08-12 10:01:11 +02:00
Florian Bruhin
bad9031914 Change image/jpg Content-Type to image/jpeg.
This makes QtWebKit display images with a (nonstandard) image/jpg content-type,
e.g. http://m.c.lnkd.licdn.com/mpr/mpr/p/2/005/07b/08a/018245a.jpg (instead of
downloading them).
2014-08-12 09:57:40 +02:00
Florian Bruhin
7be3976890 tests: Add tests for tests.utils.http 2014-08-12 09:13:03 +02:00
Florian Bruhin
cf3fa25ef4 tests.utils.http: Add __init__.py 2014-08-12 09:04:26 +02:00
Florian Bruhin
91a701552d utils.http: Fix joining. 2014-08-12 09:03:59 +02:00
Florian Bruhin
157f5b211f tests: Adjust FakeNetworkReply to work with all headers. 2014-08-12 09:03:38 +02:00
Florian Bruhin
be811e5c62 utils.http: Add some Content-Type stuff 2014-08-12 07:30:53 +02:00
Florian Bruhin
c86e252a9b Change tests to use is_url instead of _is_url_naive. 2014-08-12 07:09:40 +02:00
Florian Bruhin
069371501a Hide QNetworkReplyImplPrivate warning message 2014-08-12 07:00:05 +02:00
Florian Bruhin
be2604cacd Add a new qutebrowser.utils.http module 2014-08-12 07:00:04 +02:00
Florian Bruhin
c51a891e89 utils.url: Add support for opening relative files. 2014-08-08 13:14:48 +02:00
Florian Bruhin
45657141a0 utils.url: Always treat URLs with explicit scheme as URL. 2014-08-08 13:05:46 +02:00
Florian Bruhin
8ab022407b confdata: Comment adjustments 2014-08-08 12:56:07 +02:00
Florian Bruhin
5355096fc3 Add Terminus to default ${_monospace} fonts. 2014-08-08 12:51:47 +02:00
Florian Bruhin
4ff9804f2c Fix lint 2014-08-07 14:47:39 +02:00
Florian Bruhin
1c2a44eebc mainwindow: Don't ensure the completion rect is valid.
This did lead to problems if there was an exception shortly after initializing the mainwindow.
2014-08-07 14:42:22 +02:00
Florian Bruhin
837b2b386e utils.debug: Add a broken qflags_key. 2014-08-07 14:41:39 +02:00
Florian Bruhin
318805a088 utils.debug: Format numbers as hex for qenum_key. 2014-08-07 14:41:07 +02:00
Florian Bruhin
5c50640a68 test_debug: Improve tests for qenum_key. 2014-08-07 14:40:34 +02:00
Florian Bruhin
7063f2445c cmdhistory: Make History more modular. 2014-08-07 14:39:42 +02:00
Florian Bruhin
b8ad04bbe7 test_conftypes: Fix lint. 2014-08-07 07:56:59 +02:00
Florian Bruhin
8756d9e644 test_conftypes: Test float point size correctly. 2014-08-07 07:56:47 +02:00
Florian Bruhin
186a831482 conftypes: Set namedweight correcly for QtFont. 2014-08-07 07:41:06 +02:00
Florian Bruhin
934aaf80c6 conftypes: Set pixel size correctly in QtFont. 2014-08-07 07:39:47 +02:00
Florian Bruhin
ef603090c8 test_conftypes: Activate test for QtFont. 2014-08-07 07:39:36 +02:00
Florian Bruhin
956f6ef5e6 test_conftypes: Use qenum_key for Font.__repr__ 2014-08-07 07:35:25 +02:00
Florian Bruhin
2546c871c8 utils.debug: Improve qenum_key. 2014-08-07 07:35:05 +02:00
Florian Bruhin
19b80c1e90 test_conftypes: Adjust docstring. 2014-08-07 07:34:46 +02:00
Florian Bruhin
e3f1cfe121 conftypes: Set default settings for QtFont. 2014-08-07 07:33:24 +02:00
Florian Bruhin
c8fe5bd1d2 conftypes: Remove quotes for QtFont. 2014-08-07 07:33:14 +02:00
Florian Bruhin
fef5a9944f conftypes: Use namedtuple for font descriptions. 2014-08-07 07:31:41 +02:00
Florian Bruhin
c7ee655750 Use pylint to check modelines and fix them. 2014-08-06 23:51:44 +02:00
Florian Bruhin
5a88028738 Rename qutebrowser.commands.managers module to .runners. 2014-08-06 15:58:08 +02:00
Florian Bruhin
aebce80b2b Rename {Command,Search}Manager to ...Runner 2014-08-06 15:38:25 +02:00
Florian Bruhin
eae81fa560 Cleanup 2014-08-06 14:44:00 +02:00
Florian Bruhin
fcd0d88b1f config: Default tabs -> select-on-remove to right. 2014-08-06 08:24:21 +02:00
Florian Bruhin
13b6fe24eb Reorder tab stuff in config. 2014-08-06 08:10:32 +02:00
Florian Bruhin
1217ed26ad Handle tab position of explicitely opened tab differently.
The default behaviour now should be the same as Chromium.
2014-08-06 07:58:07 +02:00
Florian Bruhin
49ebdff65c Make position of new tabs configurable and more natural. 2014-08-06 07:47:59 +02:00
Florian Bruhin
598fec7ce9 configdata: Remove duplicate keys in default config. 2014-08-06 07:11:33 +02:00
Florian Bruhin
98a026b2a2 Make sure there are no duplicate keys in default config. 2014-08-06 07:11:14 +02:00
Florian Bruhin
2868ea2236 default conf: Remove double ;b binding. 2014-08-06 06:58:15 +02:00
Florian Bruhin
681995600e conftypes: Fix wrong docstring. 2014-08-06 06:58:03 +02:00
Florian Bruhin
d0ed459b56 Fix quickmark-load-... keybindings (b/B). 2014-08-06 06:57:26 +02:00
Florian Bruhin
b2a227fb50 log: Clean up log formatting. 2014-08-05 23:35:20 +02:00
Florian Bruhin
7818366f0a Fix lint 2014-08-05 23:23:15 +02:00
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
Florian Bruhin
81ff622291 Improve highlight_color tests. 2014-07-16 13:04:08 +02:00
Florian Bruhin
93f2e4b24d Cleanup. 2014-07-16 13:04:08 +02:00
Florian Bruhin
7c8471e64c Nicer drawing of close cross. 2014-07-16 13:04:08 +02:00
Florian Bruhin
b47d53953b Add a highlight_color util function. 2014-07-16 13:04:08 +02:00
Florian Bruhin
20e8c464e6 Check for QtValueErrors in interpolate_color tests. 2014-07-16 13:04:08 +02:00
Florian Bruhin
ca74fa28ac Use a nicer Color() class for tests. 2014-07-16 13:04:08 +02:00
Florian Bruhin
b042b5cbc4 Try drawing our own tab button 2014-07-16 13:04:08 +02:00
Florian Bruhin
9a430b22a3 Calculate close button position correctly 2014-07-16 13:04:08 +02:00
Florian Bruhin
367ecb0e44 Override subElementRect properly. 2014-07-16 13:04:08 +02:00
Florian Bruhin
cd19697a77 Construct a copy of text_rect in tab_layout. 2014-07-16 13:04:08 +02:00
Florian Bruhin
7ad0dc6416 Remove magic constant. 2014-07-16 13:04:08 +02:00
Florian Bruhin
27d3c8d20f Rename option to opt. 2014-07-16 13:04:08 +02:00
Florian Bruhin
1d31f1eb48 Don't pass useless widget to tab_layout. 2014-07-16 13:04:07 +02:00
Florian Bruhin
465ff7406c Use self instead of super() 2014-07-16 13:04:07 +02:00
Florian Bruhin
1f9597153e Cleanup 2014-07-16 13:04:07 +02:00
Florian Bruhin
87e80451c7 Remove wrong validity check 2014-07-16 13:04:07 +02:00
Florian Bruhin
e608ccbe36 Draw tabbar ourselves #2 2014-07-16 13:04:07 +02:00
Florian Bruhin
92d28a66d5 Paint odd/even tabs in different colors 2014-07-16 13:04:07 +02:00
Florian Bruhin
256d7e90b9 Apply tabbar style to bar only 2014-07-16 13:04:07 +02:00
Florian Bruhin
c3428db029 Use self._style for overridden drawItemText 2014-07-16 13:04:07 +02:00
Florian Bruhin
9b21f37659 Try changing tabbar color 2014-07-16 13:04:07 +02:00
Florian Bruhin
b4aba0d0ee Don't display tab separator if unneeded 2014-07-16 13:04:07 +02:00
Florian Bruhin
ef237bc081 Remove obsolete tabbar options 2014-07-16 13:03:46 +02:00
Florian Bruhin
90adc100a2 Move style to widgets.tabwidget 2014-07-16 13:03:46 +02:00
Florian Bruhin
4acf046ed2 Force tab text to be left-aligned 2014-07-16 13:03:46 +02:00
Florian Bruhin
23baab1fc0 Merge branch 'master' of ssh://cmpl.cc:2323/qutebrowser
Conflicts:
	qutebrowser/utils/webelem.py
2014-07-16 11:09:13 +02:00
Florian Bruhin
98edd45fee Stop using self.sender() in signalfilter, connect signals to mainframe 2014-07-16 11:07:05 +02:00
Florian Bruhin
8757f016cb Fix lint 2014-07-16 10:40:11 +02:00
Florian Bruhin
e250d42f0b Better debugging for editing 2014-07-16 09:28:28 +02:00
Florian Bruhin
1f3b39eb75 Get rid of prevnext_rel selector group 2014-07-16 09:17:59 +02:00
Florian Bruhin
be460afc1c Make debug text more compact 2014-07-16 09:15:52 +02:00
Florian Bruhin
f8151bc8ed Fix insert modes where we can't get an element 2014-07-16 09:09:28 +02:00
Florian Bruhin
fed18d31f2 Merge branch 'editable' 2014-07-16 08:47:37 +02:00
Florian Bruhin
69a388a055 Merge branch 'master' of ssh://cmpl.cc:2323/qutebrowser 2014-07-16 08:47:32 +02:00
Florian Bruhin
958b114d29 Add stricter focus checking for editor 2014-07-16 08:46:52 +02:00
Florian Bruhin
fdc51cb628 Cleanup 2014-07-16 08:40:40 +02:00
Florian Bruhin
810e507da9 Add a focus_elem function to utils.webelem. 2014-07-16 07:55:30 +02:00
Florian Bruhin
bbd9d24334 Handle elements with contenteditable correctly for editor 2014-07-16 07:42:02 +02:00
Florian Bruhin
92e67b8018 Improve editable field selection.
Now it also gets the gmail compose window, but we can't actually edit its
value... It works in dwb though!
2014-07-16 07:15:31 +02:00
Florian Bruhin
d5c8e73b14 Use same focus code for insertmode/editor 2014-07-16 06:58:01 +02:00
Florian Bruhin
c369bde6ad Don't force minimum tab size. 2014-07-11 16:54:54 +02:00
Florian Bruhin
86edda69c1 Fix close-on-right-click for tabs. 2014-07-11 07:01:08 +02:00
Florian Bruhin
4114308193 Log exception on invalid config 2014-07-10 22:39:24 +02:00
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
fad22c63d9 Go back to using one NetworkManager per tab 2014-07-10 06:42:52 +02:00
Florian Bruhin
781390828f Merge branch 'master' of ssh://lupin/qutebrowser 2014-07-09 21:14:32 +02:00
Florian Bruhin
72b854049b Improvments for hints/page-prev/page-next 2014-07-09 21:14:15 +02:00
Florian Bruhin
5feee871ac Fix lint 2014-07-07 12:00:51 +02:00
Florian Bruhin
6d44cf1b6e Fix weird crash in on_tab_changed 2014-07-06 21:33:50 +02:00
Florian Bruhin
cea3cb4712 Only leave insert/hint mode if loading started in current tab 2014-07-04 17:32:17 +02:00
Florian Bruhin
f173583605 Documentation update for Qt 5.3.1 2014-07-04 14:37:31 +02:00
Florian Bruhin
117755863d Fix lint 2014-07-04 07:41:03 +02:00
Florian Bruhin
37ed9deecf Add tests for key_to_string and keyevent_to_string. 2014-07-04 07:35:33 +02:00
Florian Bruhin
539325db90 Move fake_keyevent to test.helpers 2014-07-04 07:35:04 +02:00
Florian Bruhin
734ee74e8a Use OrderedDict for modmask2str 2014-07-04 07:33:58 +02:00
Florian Bruhin
261bb85791 Handle escape key correctly 2014-07-03 07:52:58 +02:00
Florian Bruhin
70afe4d1fd Don't die on only-modifier keypresses. 2014-07-03 07:52:47 +02:00
Florian Bruhin
ea84ce7acf Force keybindings to lower case 2014-07-03 07:46:14 +02:00
Florian Bruhin
d45e883f6d Move NormalizeTests to test.utils.test_misc 2014-07-03 07:41:23 +02:00
Florian Bruhin
9b24ca39ea Move normalize_keystr to utils.misc 2014-07-03 07:34:09 +02:00
Florian Bruhin
f1ff2738da Don't normalize keys via QKeySequence.
This yields rather strange results with some exotic keys, and this
normalisation doesn't really do much anyways.
2014-07-03 07:16:24 +02:00
Florian Bruhin
1816e8419e Handle some special corner-case keys correctly 2014-07-03 07:14:30 +02:00
Florian Bruhin
03e83ff8e1 Move key to string converting to utils.misc 2014-07-03 06:51:24 +02:00
Florian Bruhin
058bab2348 Log key IDs in hex 2014-07-03 06:30:50 +02:00
Florian Bruhin
a52796e94d Handle all key modifiers correctly 2014-07-03 06:29:05 +02:00
Florian Bruhin
ae676323ff Turn auto-insert-mode off by default 2014-07-02 23:08:49 +02:00
Florian Bruhin
01485a2f9e Always display statusbar red on errors, even in insert mode 2014-07-02 23:08:29 +02:00
Florian Bruhin
b22ebb7778 Escape & in tab titles properly 2014-07-02 23:05:42 +02:00
Florian Bruhin
c18027f3ae Override QWebPage::acceptNavigationRequest.
We now do this instead of using linkDelegationPolicy and the linkClicked signal
of QWebView, as we are unable to get the target frame with linkClicked, causing
frames to open full-page instead of where they should.

See https://bugs.webkit.org/show_bug.cgi?id=37847
2014-07-02 22:17:36 +02:00
Florian Bruhin
4aab32cc5d Move asking of questions away from Prompt widget 2014-07-02 07:07:03 +02:00
Florian Bruhin
a466b672b3 Prompt comment cleanup 2014-07-02 06:52:30 +02:00
Florian Bruhin
5c84616ff4 Rename visible to _busy and make it private. 2014-07-02 06:42:23 +02:00
Florian Bruhin
3f85f63546 Remove unneeded hide_prompt. 2014-07-02 06:42:11 +02:00
Florian Bruhin
708d0a2885 Fix lint 2014-07-02 06:35:00 +02:00
Florian Bruhin
6d2dfc5758 Clear message properly in on_mode_left. 2014-07-02 06:34:59 +02:00
Florian Bruhin
8945befcb6 Prompt queue bugfixes. 2014-07-02 06:34:59 +02:00
Florian Bruhin
e5e4790e30 Add question prompt 2014-07-02 06:34:59 +02:00
Florian Bruhin
1b9bcbf56f Save old question correctly 2014-07-02 06:34:59 +02:00
Florian Bruhin
4cdf4fc45f Start fixing foo 2014-07-02 06:34:59 +02:00
Florian Bruhin
0d037c74d4 Fix lint 2014-07-01 07:57:19 +02:00
Florian Bruhin
29064850c7 Begin using unittest.mock.patch 2014-06-30 20:35:43 +02:00
Florian Bruhin
66f0ef8009 Adjust test_basekeyparser for the named Timer. 2014-06-29 22:15:01 +02:00
Florian Bruhin
dd125cd0be Mock out logging instead of disabling in test_basekeyparser. 2014-06-29 22:14:46 +02:00
Florian Bruhin
8d237229f5 Add __init__.py in test/keyinput 2014-06-29 21:17:38 +02:00
Florian Bruhin
400f619903 Handle user variables in path correctly 2014-06-28 01:15:31 +02:00
Florian Bruhin
1a73a90515 Fix downloading with relative filepaths 2014-06-27 18:30:20 +02:00
Florian Bruhin
07e799acff Disable messagehandler workaround on recent enough PyQt versions 2014-06-27 16:57:39 +02:00
Florian Bruhin
c6ad5622b4 Clean up earlyinit 2014-06-27 12:25:27 +02:00
Florian Bruhin
b79cdbc416 Clean up Question objects correctly 2014-06-27 07:56:16 +02:00
Florian Bruhin
cb6550debb Set WA_DeleteOnClose in report dialogs 2014-06-27 07:39:01 +02:00
Florian Bruhin
2aa756d96a Increase HTML log font size 2014-06-26 14:11:27 +02:00
Florian Bruhin
e95ef9ab4a Don't log scrolling 2014-06-26 14:10:53 +02:00
Florian Bruhin
46d621629f Fix download/question crashes 2014-06-26 13:36:00 +02:00
Florian Bruhin
ca3df5e169 Highlight and select text when searching 2014-06-26 11:10: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
eeef9aa930 Fix inverted ignore-case setting. 2014-06-26 10:04:08 +02:00
Florian Bruhin
92ff957543 Clean up message API 2014-06-26 07:58:00 +02:00
Florian Bruhin
15ca1b7f59 Add __repr__ to CrashDialog 2014-06-25 23:03:33 +02:00
Florian Bruhin
a083fe69db Add a :report command 2014-06-25 22:22:30 +02:00
Florian Bruhin
b8556bab00 Fix closing </b> 2014-06-25 22:07:22 +02:00
Florian Bruhin
7073d14cb8 Handle absolute paths for downloads better 2014-06-25 22:06:16 +02:00
Florian Bruhin
37ccac39d6 Fix lint 2014-06-25 21:23:22 +02:00
Florian Bruhin
09641d96f3 Fix HTML log output 2014-06-25 21:11:03 +02:00
Florian Bruhin
fcc0d8e911 Better workaround for hang-with-warnings bug 2014-06-25 20:18:00 +02:00
Florian Bruhin
a03d209cb0 Fix missing import 2014-06-25 18:38:41 +02:00
Florian Bruhin
2f3b1faeb9 Add workaround for freeze on mouser.com 2014-06-25 17:59:24 +02:00
Florian Bruhin
9238135867 Fix crashes after completion refactoring 2014-06-25 16:48:28 +02:00
Florian Bruhin
5c143da40b Don't update completion twice 2014-06-25 15:52:51 +02:00
Florian Bruhin
b72306ffe6 Reduce logging for completions 2014-06-25 15:52:40 +02:00
Florian Bruhin
36d032c330 Don't resize completion while typing when unnecessary 2014-06-25 15:31:00 +02:00
Florian Bruhin
158301d3df Reduce logging from modemanager 2014-06-25 15:26:59 +02:00
Florian Bruhin
3c82724d10 Don't die on invalid quickmarks 2014-06-25 11:03:26 +02:00
Florian Bruhin
46a3e2af92 Queue messages to the end of the eventloop.
When not doing this, error messages sent before the signals get connected (i.e.
during init) get lost.
2014-06-25 11:02:34 +02:00
Florian Bruhin
ab99669b4a Remove unused import 2014-06-25 10:03:13 +02:00
Florian Bruhin
c8cc92e8c2 Add basic HTML log 2014-06-25 10:00:27 +02:00
Florian Bruhin
411d57e539 Fix download-page 2014-06-25 10:00:09 +02:00
Florian Bruhin
efd34455b5 Shutdown tabs before removing 2014-06-25 07:45:01 +02:00
Florian Bruhin
daee57b37d Saner default values for some QWebSettings 2014-06-25 06:54:34 +02:00
Florian Bruhin
9b4cc6ab76 Nicer downloads when size is unknown 2014-06-24 17:57:52 +02:00
Florian Bruhin
c7f2b45cbd Always yank to clipboard if primary selection is unavailable 2014-06-24 12:04:36 +02:00
Florian Bruhin
24dbfc30cb Fix jumping of tabs when selected 2014-06-24 11:03:44 +02:00
Florian Bruhin
f849710df4 Strip URL for URL recognition 2014-06-24 08:40:53 +02:00
Florian Bruhin
af14e8bf94 Keep GPL closer to the original 2014-06-24 07:58:48 +02:00
Florian Bruhin
a114b46b81 Get colorama version correctly 2014-06-24 07:56:17 +02:00
Florian Bruhin
be75f45312 Add info if executable is frozen to version output 2014-06-24 07:46:01 +02:00
Florian Bruhin
4b95f369a4 Get rid of ipdb/IPython.
This caused more problems than it's worth really, and it does some black magic
I'm not comfortable with.
2014-06-24 07:42:49 +02:00
Florian Bruhin
3ce9945bc9 Merge branch 'restart' 2014-06-24 07:11:05 +02:00
Florian Bruhin
f1c0153409 Don't die when getting signals for invalid tabs 2014-06-24 07:01:15 +02:00
Florian Bruhin
f3f04b6f21 Make restart work when frozen 2014-06-24 06:52:49 +02:00
Florian Bruhin
65353773d1 First fix for :restart 2014-06-24 06:43:52 +02:00
Florian Bruhin
43bcb2a746 Remove mouse focus indicator on Windows in completion view 2014-06-23 21:02:55 +02:00
Florian Bruhin
b1f9139fd7 Fix lint 2014-06-23 20:33:41 +02:00
Florian Bruhin
ba9b846a20 Lower-case HTML attributes. 2014-06-23 20:32:40 +02:00
Florian Bruhin
9afab112aa Move select tag to non-configurable is_editable types. 2014-06-23 20:32:07 +02:00
Florian Bruhin
31e0cde35b Add tests for is_editable. 2014-06-23 20:31:47 +02:00
Florian Bruhin
2065f17cb5 Clean up tests 2014-06-23 19:44:21 +02:00
Florian Bruhin
fa95c24d7d Accept events properly 2014-06-23 18:21:12 +02:00
Florian Bruhin
81990f792f Avoid using QApplication for downloads 2014-06-23 17:30:28 +02:00
Florian Bruhin
da0bfb4861 Set window title based on page 2014-06-23 17:18:36 +02:00
Florian Bruhin
277bac618a Color statusbar in insert mode 2014-06-23 16:43:59 +02:00
Florian Bruhin
359e4bab6f Fix value models when config changed. 2014-06-23 16:43:04 +02:00
Florian Bruhin
b6ddda8f17 Show git timestamp in version 2014-06-23 16:19:43 +02:00
Florian Bruhin
98a2e80b38 Fix quickmarks 2014-06-23 16:12:35 +02:00
Florian Bruhin
70f224ba32 Make tab close on right click configurable 2014-06-23 15:47:31 +02:00
Florian Bruhin
914f7ace81 Fix Content-Disposition tests on Linux 2014-06-23 14:54:12 +02:00
Florian Bruhin
e5e49ed858 Split _is_object_editable from is_editable. 2014-06-23 14:48:18 +02:00
Florian Bruhin
c71e9e4c83 Add missing config import. 2014-06-23 14:48:07 +02:00
Florian Bruhin
dc91bcdf91 Don't crash if URLs are invalid in commands 2014-06-23 14:26:47 +02:00
Florian Bruhin
e5e466f6d1 Don't restore keyboard focus when hinting 2014-06-23 14:26:44 +02:00
Florian Bruhin
cf17af147e Fix and clean up insertmode checks 2014-06-23 14:26:34 +02:00
Florian Bruhin
fdb4b24148 Remove excess newlines 2014-06-23 12:28:55 +02:00
Florian Bruhin
f12d243f03 Clean up import 2014-06-23 12:17:13 +02:00
Florian Bruhin
19688f5055 Add tests for parse_content_disposition 2014-06-23 12:16:01 +02:00
Florian Bruhin
e4b10af41a Move filename checking to utils.misc 2014-06-23 12:15:10 +02:00
Florian Bruhin
752422c351 Add missing returns after calling superclass events.
We fscked that up in 9668994046.
2014-06-23 10:18:27 +02:00
Florian Bruhin
6774445497 Fix lint 2014-06-23 08:26:35 +02:00
Florian Bruhin
be68f98ce7 Don't crash on invalid icon rect 2014-06-23 08:20:40 +02:00
Florian Bruhin
0a205071be Add username to contact info 2014-06-23 08:16:00 +02:00
Florian Bruhin
593a2fe4ec Make it configurable whether to leave insertmode on click 2014-06-23 08:05:52 +02:00
Florian Bruhin
0028bd94cc Go to insertmode in google docs 2014-06-23 08:02:10 +02:00
Florian Bruhin
35ffc2c2c0 Don't crash if url is None in tabopen 2014-06-23 07:48:45 +02:00
Florian Bruhin
5efc9de434 Add comment about leaving insertmode 2014-06-23 07:47:42 +02:00
Florian Bruhin
8a8ca0c34f Split utils.misc into utils.{qt,misc} 2014-06-23 07:45:04 +02:00
Florian Bruhin
3443364de1 Fix lint 2014-06-23 07:12:19 +02:00
Florian Bruhin
5996651a2f Merge utils.signals into utils.debug 2014-06-23 07:11:15 +02:00
Florian Bruhin
6aff5fd374 Document js/qt loggers 2014-06-23 07:00:21 +02:00
Florian Bruhin
2690891cbe Better init logging 2014-06-23 06:37:47 +02:00
Florian Bruhin
4eeeb13927 Fix resizing completion on init 2014-06-23 06:23:33 +02:00
Florian Bruhin
ca576a1c82 Add some logging when restoring mainwindow size. 2014-06-23 06:20:37 +02:00
Florian Bruhin
c21fad491a Don't shut down before crash dialog 2014-06-22 23:57:48 +02:00
Florian Bruhin
c77ad57a42 Don't log missing config descriptions 2014-06-22 23:55:48 +02:00
Florian Bruhin
03098f861e Add logging for completion resizing 2014-06-22 23:52:50 +02:00
Florian Bruhin
d5834e0cf0 Don't crash on completion items without icon 2014-06-22 23:46:43 +02:00
Florian Bruhin
9668994046 Don't return values from events. 2014-06-22 23:37:16 +02:00
Florian Bruhin
8f85149c96 Don't accidentally call superclass event twice. 2014-06-22 23:37:06 +02:00
Florian Bruhin
983a0da520 Use toDisplayString for URL text. 2014-06-22 23:35:20 +02:00
Florian Bruhin
ba20300a2c Check if hit test result is null 2014-06-22 23:35:01 +02:00
Florian Bruhin
15126dfb3c Don't leave insert mode on non-insert clicks.
This proved to be a bad idea, as we only can guess what's an insert mode and
what isn't.
2014-06-22 23:34:19 +02:00
Florian Bruhin
7aea12ad35 Add comment about CodeMirror. 2014-06-22 23:34:05 +02:00
Florian Bruhin
46c19012ab Fix spelling in comment. 2014-06-22 23:33:55 +02:00
Florian Bruhin
231aa6f9b8 Add FIXME for QTime. 2014-06-22 23:33:43 +02:00
Florian Bruhin
4bd8a596f1 Check return values (e.g. indexOf) 2014-06-22 23:33:32 +02:00
Florian Bruhin
ef5b16556b More validity checks. 2014-06-22 23:32:49 +02:00
Florian Bruhin
bf9e829d4d Don't use .warn on loggers, use .warning instead. 2014-06-22 23:30:44 +02:00
Florian Bruhin
49fd08b30d Leave URLs encoded when setting commandline 2014-06-21 23:19:59 +02:00
Florian Bruhin
4d6dd808b1 Make ErrorNetworkReply readable 2014-06-21 23:14:18 +02:00
Florian Bruhin
fa9dd97f13 Improve qute:foo error message 2014-06-21 23:10:47 +02:00
Florian Bruhin
e0bb09cbce Set URL for special network replies 2014-06-21 23:10:22 +02:00
Florian Bruhin
d695baf355 Reply with error reply on invalid qute:* URLs. 2014-06-21 23:05:26 +02:00
Florian Bruhin
800fa381b1 Set request for ErrorNetworkReply. 2014-06-21 23:05:13 +02:00
Florian Bruhin
e8ded0a32a Cleanup 2014-06-21 23:04:03 +02:00
Florian Bruhin
3f37c0bb0b Use a list for pending requests 2014-06-21 23:03:51 +02:00
Florian Bruhin
5ab9755ac4 Fix vim modeline in models.completion 2014-06-21 22:41: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
14bcdafe47 Fix completion coloring 2014-06-21 17:50:29 +02:00
Florian Bruhin
664079c728 Don't raise CommandError in HintManager.fire 2014-06-21 17:41:25 +02:00
Florian Bruhin
e1aabc974c Remove completion bg from stylesheet 2014-06-21 17:38:04 +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
0dc2ecef46 Check QUrl objects for validity 2014-06-20 23:57:52 +02:00
Florian Bruhin
16758354e8 Fix missing return 2014-06-20 23:57:14 +02:00
Florian Bruhin
113221c731 Log some exceptions 2014-06-20 23:26:19 +02:00