Commit Graph

265 Commits

Author SHA1 Message Date
Florian Bruhin
fd220b1b36 Raise CommandError instead of message.error where possible 2014-06-06 11:55:55 +02:00
Florian Bruhin
af17746c20 Actually respect cookies-store 2014-06-03 20:30:50 +02:00
Florian Bruhin
35a3cc661e Reorder webkit options 2014-06-03 20:28:51 +02:00
Florian Bruhin
da2d8e1048 Log js console messages as debug, not info 2014-06-02 22:18:41 +02:00
Florian Bruhin
161b2ef7af Fix whitespace/CRLF 2014-05-27 16:24:26 +02:00
Florian Bruhin
1ff193e4dd Replace page_ by page() 2014-05-27 16:04:45 +02:00
Florian Bruhin
0976f95db7 Fix docstring 2014-05-27 15:56:44 +02:00
Florian Bruhin
53655dac02 Don't inherit CommandDispatcher from QObject 2014-05-27 15:12:43 +02:00
Florian Bruhin
4538745ffb Implement QWebPage:javaScript* 2014-05-26 20:04:44 +02:00
Florian Bruhin
fa01bfbbad Add per-tab inspector like dwb.
This also means the webinspector will always be detached / in its own window.
2014-05-26 15:35:05 +02:00
Florian Bruhin
8f12df6553 Purge old cookies from cookiejar 2014-05-26 16:09:49 +02:00
Florian Bruhin
1e256699f8 Add topic-specific loggers 2014-05-23 16:11:55 +02:00
Florian Bruhin
0c0cb48471 Fix lint 2014-05-22 15:44:16 +02:00
Florian Bruhin
7308fa97c5 Leave hinting mode when insert mode is entered 2014-05-22 17:49:18 +02:00
Florian Bruhin
8cddbec9e3 Implement quickmarks 2014-05-22 16:44:47 +02:00
Florian Bruhin
f3fd247282 Make LineConfigParser iterable. 2014-05-22 16:40:54 +02:00
Florian Bruhin
8d570b686c Initial userscript support 2014-05-21 19:53:58 +02:00
Florian Bruhin
ecc838d02c Fix ALL the lint 2014-05-21 17:29:09 +02:00
Florian Bruhin
2df8500792 Move ExternalEditor to own file 2014-05-21 15:47:21 +02:00
Florian Bruhin
60f25373e3 Merge branch 'editor'
Conflicts:
	qutebrowser/browser/commands.py
	qutebrowser/utils/misc.py
2014-05-21 15:37:18 +02:00
Florian Bruhin
407af1b02c Pass elem to on_editing_finished 2014-05-21 14:24:45 +02:00
Florian Bruhin
a77a25e6c1 Keep a hard reference to ExternalEditor 2014-05-21 14:22:46 +02:00
Florian Bruhin
ebefdfb5a9 Fix pasting in new tab 2014-05-19 15:09:12 +02:00
Florian Bruhin
633b87f61b Yank cleanup 2014-05-19 11:56:51 +02:00
Florian Bruhin
fe81e46f7c Small clipboard cleanup 2014-05-19 09:52:58 +02:00
Florian Bruhin
118d3e03cd Revert "Make scroll bars hideable"
This reverts commit 1bfbdd79e4.

Conflicts:
	qutebrowser/browser/commands.py
	qutebrowser/config/configdata.py
	qutebrowser/widgets/webview.py
2014-05-19 09:50:56 +02:00
Florian Bruhin
8ed373423a Fix undo 2014-05-18 08:19:27 +02:00
Florian Bruhin
869c0d82e1 Really fix tabclose 2014-05-18 08:18:20 +02:00
Florian Bruhin
d643d6ce44 Fix broken :yank 2014-05-18 08:14:11 +02:00
Florian Bruhin
578a58145c Fix tab closing 2014-05-18 08:08:58 +02:00
Florian Bruhin
1ec0766587 Rename CurCommandDispatcher to CommandDispatcher 2014-05-18 08:04:27 +02:00
Florian Bruhin
844e536fff Command cleanup 2014-05-17 23:22:10 +02:00
Florian Bruhin
c7cf0aaf9a Clean up webview and move commands 2014-05-17 22:38:07 +02:00
Florian Bruhin
d901fe69e6 Rename some commands 2014-05-16 23:01:40 +02:00
Florian Bruhin
19da80e58e Improve logging in signal filter 2014-05-16 21:49:35 +02:00
Florian Bruhin
1bfbdd79e4 Make scroll bars hideable 2014-05-16 14:20:37 +02:00
Florian Bruhin
d3eaeaac91 First steps at getting rid of signal cache 2014-05-15 17:57:08 +02:00
Florian Bruhin
326280f910 Fix consistency and spelling in docstrings/comments 2014-05-15 16:27:34 +02:00
Florian Bruhin
603fbdf239 Range-check all values passed to C code. 2014-05-15 00:02:20 +02:00
Florian Bruhin
cf02330b42 Make hinting work again.
6b2d2713f7 broke this as we accidentally
iterate over self._frames before setting it.
2014-05-14 18:54:34 +02:00
Florian Bruhin
a045511962 Use exceptions for command errors 2014-05-14 18:00:40 +02:00
Florian Bruhin
ed61244964 Make sure scroll count is int 2014-05-14 17:28:47 +02:00
Florian Bruhin
651eab1032 Return after error when there's no hint to follow 2014-05-14 14:56:13 +02:00
Florian Bruhin
6b2d2713f7 Clean up HintManager.start() 2014-05-13 21:13:53 +02:00
Florian Bruhin
0b3854bff1 Work around segfault in hintmanager 2014-05-13 13:42:30 +02:00
Florian Bruhin
d9bb1e904f Support back/forward mouse buttons 2014-05-13 09:53:29 +02:00
Florian Bruhin
7b2961f23e Fix some backslash-quotes 2014-05-12 15:58:09 +02:00
Florian Bruhin
fd43248d89 Remove needs_js for editor 2014-05-12 14:05:05 +02:00
Florian Bruhin
419caf7116 Rename rect_on_screen to rect_on_view 2014-05-12 10:05:00 +02:00
Florian Bruhin
50f31ca7cb Handle visibility of elements on screen correctly 2014-05-12 10:04:27 +02:00
Florian Bruhin
4eebe2dc57 First try at hinting with frames 2014-05-12 07:49:44 +02:00
Florian Bruhin
5a6208862e Add cmdutils.arg_or_count 2014-05-09 19:12:08 +02:00
Florian Bruhin
7966298a64 Don't pass parent to print dialogs. 2014-05-09 17:40:19 +02:00
Florian Bruhin
edc9d0810c Use QCoreApplication.instance() 2014-05-09 17:01:05 +02:00
Florian Bruhin
59a89d31fe Add reasons why modes are entered/left 2014-05-09 16:03:46 +02:00
Florian Bruhin
1785294a43 Fix some lint 2014-05-09 15:30:27 +02:00
Florian Bruhin
f7e6dc0244 Add zoom command. 2014-05-09 14:20:26 +02:00
Florian Bruhin
95f2950335 Add stop command (ctrl-s) 2014-05-09 13:11:47 +02:00
Florian Bruhin
05f38e15a6 Add command home 2014-05-09 13:09:37 +02:00
Florian Bruhin
70c8df095e Switch from appdirs to QStandardPaths 2014-05-08 22:33:24 +02:00
Florian Bruhin
4eb6f896b0 Remove unused import in hints.py 2014-05-08 20:36:23 +02:00
Florian Bruhin
e2a2ed8850 Support QWebView::createWindow (opening windows via js) 2014-05-08 20:36:05 +02:00
Florian Bruhin
14873285e6 Fix enum bugs 2014-05-06 21:09:09 +02:00
Florian Bruhin
164dcfb6bd Always click elements in the center when hinting 2014-05-06 21:07:20 +02:00
Florian Bruhin
557805c8b2 Don't pass an empty QPrinter to QPrintDialog.
This was garbage collected on Linux when the dialog was opened, leading
to segfaults when the printer was changed in the dialog.

But actually we don't need it at all, so we just drop it.
2014-05-06 18:31:08 +02:00
Florian Bruhin
e2ded2e0ad Add logging to handle_partial_key 2014-05-06 17:02:44 +02:00
Florian Bruhin
764c37c8d6 Hide elements instead of deleting them 2014-05-06 17:02:32 +02:00
Florian Bruhin
e683d85799 Add quick and dirty fix for hint clicking 2014-05-06 14:03:48 +02:00
Florian Bruhin
f6c3e00d59 Use NoneString config type for settings with Qt defaults.
This fixes wikipedia looking ugly because setUserStylesheet gets called
with an empty string.
2014-05-06 12:20:02 +02:00
Florian Bruhin
70d6efff96 Elements might be deleted already when hint mode is left 2014-05-06 10:04:40 +02:00
Florian Bruhin
e5000c315d Revert "Use global HintManager"
This reverts commit a76d68f564.

WTF. I thought I reset --hard-ed that one?
2014-05-06 07:11:20 +02:00
Florian Bruhin
3eaf1ec6d8 Remove old logging 2014-05-05 22:34:58 +02:00
Florian Bruhin
a76d68f564 Use global HintManager 2014-05-05 20:28:29 +02:00
Florian Bruhin
c8fd0937b0 Revert "Use global object dict for global objects"
This reverts commit bf2c7831c8.

This was a bad idea as we need to access some of the main attributes
from commands via instance=...
2014-05-05 20:12:20 +02:00
Florian Bruhin
bf2c7831c8 Use global object dict for global objects 2014-05-05 19:12:47 +02:00
Florian Bruhin
36e52721da Fix CRLFs in cookies.py 2014-05-05 17:56:35 +02:00
Florian Bruhin
667b255d01 Use QApplication for global singletons 2014-05-05 17:56:14 +02:00
Florian Bruhin
40720d3451 Whoops 2014-05-05 16:36:59 +02:00
Florian Bruhin
ae95b5ea3b Basic cookie handling 2014-05-05 16:28:43 +02:00
Florian Bruhin
3b75bbf495 Adjust shell_escape to maybe work on windows 2014-05-05 11:09:10 +02:00
Florian Bruhin
9cf713cbe4 Use a metaclass for Enums for easier reverse mapping 2014-05-05 10:08:06 +02:00
Florian Bruhin
4ebe643ea6 Use simple enums for constants 2014-05-05 07:45:36 +02:00
Florian Bruhin
ff37f03725 Explain why we use subprocess/QProcess. 2014-05-03 14:27:44 +02:00
Florian Bruhin
9e609bae8d Add :spawn command 2014-05-03 14:25:22 +02:00
Florian Bruhin
af68474fc3 Make sure frame is not None in HintManager.start 2014-05-02 18:57:59 +02:00
Florian Bruhin
efc613811f Implement numeric hints 2014-05-02 17:53:16 +02:00
Florian Bruhin
615a2e0bb5 Handle invalid hinting modes/targets 2014-05-02 11:25:24 +02:00
Florian Bruhin
ae0966a384 Fix encoding issues on windows.
locale.getpreferredencoding(False) returns cp1252 on Windows, which is
unable to parse our nice unicode arrows.

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

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

Also this uses shlex for splitting again, like earlier.
2014-05-02 10:28:41 +02:00
Florian Bruhin
678abca244 Make user agent configurable 2014-05-02 06:55:55 +02:00
Florian Bruhin
7aef865b0d Lint fixes 2014-05-01 19:42:51 +02:00
Florian Bruhin
cb8f824f01 Add basurl 2014-05-01 16:40:14 +02:00
Florian Bruhin
5d80831752 prevpage/nextpage updates 2014-05-01 16:35:26 +02:00
Florian Bruhin
a3126635d4 Revert changes in _click 2014-05-01 15:29:18 +02:00
Florian Bruhin
fd678ff864 Make hints work 2014-05-01 15:27:32 +02:00
Florian Bruhin
12b36de5b5 Start implementing prev/next 2014-05-01 00:26:18 +02:00
Florian Bruhin
b9d7c7e7d9 Lint fixes 2014-05-01 00:24:53 +02:00
Florian Bruhin
545e63aa0e Bundle editor functions 2014-04-30 11:27:59 +02:00
Florian Bruhin
903d1876af Handle editor errors 2014-04-30 10:59:43 +02:00
Florian Bruhin
1488e54567 Fix docstrings 2014-04-30 10:46:20 +02:00
Florian Bruhin
689723508f Add broken JS checking for commands 2014-04-30 10:05:55 +02:00
Florian Bruhin
bc02df0bde Add open_editor command 2014-04-29 22:16:44 +02:00
Florian Bruhin
9fd7f8b975 Rewrite HintManager.fire to use handler dicts 2014-04-29 09:09:42 +02:00
Florian Bruhin
0d92e34310 Fix/silence checks 2014-04-28 00:05:14 +02:00
Florian Bruhin
a0f27fed61 Add manual hint following 2014-04-27 21:59:23 +02:00
Florian Bruhin
9252ef94ca Consistent string chars 2014-04-25 16:53:23 +02:00
Florian Bruhin
bc077f7503 Check if currentFrame() is None when starting hints 2014-04-25 13:21:14 +02:00
Florian Bruhin
875666265b s/BrowserTab/WebView/g 2014-04-25 12:24:26 +02:00
Florian Bruhin
6e78f67a81 Rename keyinput stuff 2014-04-25 12:21:01 +02:00
Florian Bruhin
926194849c Use normal commands for hint mode 2014-04-24 23:47:02 +02:00
Florian Bruhin
0def82fe8c Fix lint 2014-04-24 22:49:06 +02:00
Florian Bruhin
9320c813f7 Add set_cmd_text to MessageBridge 2014-04-24 21:28:24 +02:00
Florian Bruhin
c674d96cfe Reorganize input modules into keyinput subpackage 2014-04-24 21:03:45 +02:00
Florian Bruhin
ecdd887664 Split KeyParser into KeyParser (non-chain) and KeyChainParser 2014-04-24 19:21:38 +02:00
Florian Bruhin
8648d88b51 Handle special keys instead of only modifiers 2014-04-24 17:43:19 +02:00
Florian Bruhin
b372c23b80 Move hint webelem code to utils.webelem 2014-04-24 16:30:59 +02:00
Florian Bruhin
3d292fbc27 Use a stack for current modes 2014-04-24 06:44:58 +02:00
Florian Bruhin
8b5daad367 Add ModeManager 2014-04-23 21:15:47 +02:00
Florian Bruhin
387d0e3be6 Document hint lastChild() hack 2014-04-23 14:34:00 +02:00
Florian Bruhin
61802725a6 Actually use message.error for errors 2014-04-23 06:17:29 +02:00
Florian Bruhin
55e3aca702 linting cleanup 2014-04-22 17:53:27 +02:00
Florian Bruhin
a1650579e9 Reword FIXME comments 2014-04-22 14:35:56 +02:00
Florian Bruhin
70e1a0300c Add explicit types for editable hinting 2014-04-22 14:33:40 +02:00
Florian Bruhin
b167f1f8d8 Clarify QTBUG comment 2014-04-22 14:26:07 +02:00
Florian Bruhin
0de249e904 Support frames correctly in HintManager 2014-04-22 14:23:55 +02:00
Florian Bruhin
ebd3ab778f Make scrolling work with multiple frames 2014-04-22 14:17:17 +02:00
Florian Bruhin
26124920cd Display warnings if at beginning/end of history 2014-04-22 14:06:32 +02:00
Florian Bruhin
5d95c7e19c Remove unused import 2014-04-22 12:10:27 +02:00
Florian Bruhin
ce274aa9c8 Fix printing 2014-04-22 11:16:45 +02:00
Florian Bruhin
78060fc879 Get rid of temp_message signal 2014-04-22 10:08:56 +02:00
Florian Bruhin
1e27f5537d Filter javascript-links from hinting 2014-04-22 09:53:21 +02:00
Florian Bruhin
fec353809b Nicer statusbar texts when hinting 2014-04-22 09:41:43 +02:00
Florian Bruhin
233289228b Reposition hints if contents size changed 2014-04-22 09:35:59 +02:00
Florian Bruhin
8d891bf168 Hints style fixes 2014-04-22 09:35:49 +02:00
Florian Bruhin
ee5e066d86 Display message when hinting. 2014-04-22 09:06:38 +02:00
Florian Bruhin
7e2b590da1 Spelling fix 2014-04-22 08:46:21 +02:00
Florian Bruhin
03c1e1d896 cleanups 2014-04-21 23:53:13 +02:00
Florian Bruhin
65f2409d03 hints: Handle relative/javascript links correctly 2014-04-21 23:44:45 +02:00
Florian Bruhin
ba7f56f5e9 Add different hinting modes (yank, backtab, rapid) 2014-04-21 23:33:36 +02:00
Florian Bruhin
6ce415fc5e Make hint-labels non-clickable. 2014-04-21 23:32:58 +02:00
Florian Bruhin
6bbb5fe598 Add emitted signals to hintmanager docstrings. 2014-04-21 23:32:44 +02:00
Florian Bruhin
9caac26873 Handle no found elements to hint gracefully 2014-04-21 19:31:28 +02:00
Florian Bruhin
a11b14fd2d Implement more hinting modes 2014-04-21 19:29:11 +02:00
Florian Bruhin
67bf654d57 Handle scrolled frame correctly 2014-04-21 18:20:30 +02:00
Florian Bruhin
979685e37a Click topleft of elements 2014-04-21 17:41:51 +02:00
Florian Bruhin
ee8ba55676 Support esc to abort hinting 2014-04-21 17:17:34 +02:00
Florian Bruhin
de0e96ab2d Add clicking on links 2014-04-21 16:59:03 +02:00
Florian Bruhin
c2aa9517ea Mark partial hint matches 2014-04-21 15:45:29 +02:00
Florian Bruhin
d7b87e09c9 Implement modes and hint input. 2014-04-21 15:24:19 +02:00
Florian Bruhin
5a3966ca82 Fix lint, add documentation 2014-04-21 11:03:43 +02:00