Commit Graph

506 Commits

Author SHA1 Message Date
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
22e6a26ec3 Fix function calls with changed attribute names. 2014-09-15 06:20:33 +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
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
80ef0782d5 Improve some docstrings. 2014-09-13 00:22:27 +02:00
Florian Bruhin
381b06e967 Fix lint 2014-09-08 07:44:32 +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
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
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
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
ce4a5affa4 Rename commands.utils to commands.cmdutils. 2014-08-26 20:48:39 +02:00
Florian Bruhin
c72bfff306 Rename commands.exceptions to commands.cmdexc. 2014-08-26 20:38:10 +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
d625cde28c Clean up imports 2014-08-26 19:10:14 +02:00
Florian Bruhin
984f984cf0 Fix lint. 2014-08-25 10:58:12 +02:00
Florian Bruhin
66e670a96b Fix ignore_case for searching. 2014-08-25 06:56:14 +02:00
Florian Bruhin
17dd4732ae Add explicit encoding to open() calls. 2014-08-20 20:33:14 +02:00
Florian Bruhin
5b915186d7 Add a 'smart' option for ignore-case. 2014-08-12 17:00:18 +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
ee1b136807 Clean up pylint/noqa comments. 2014-08-04 03:47:09 +02:00
Florian Bruhin
7d9bd17aff Fix error message when executing command in wrong mode. 2014-08-02 16:15:59 +02:00
Florian Bruhin
425a7fd7c4 Simplify userscript running. 2014-07-29 02:05:15 +02:00
Florian Bruhin
54246bacbe Add some type checking for enums 2014-07-29 00:23:20 +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
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
ca3df5e169 Highlight and select text when searching 2014-06-26 11:10:31 +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
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
8a8ca0c34f Split utils.misc into utils.{qt,misc} 2014-06-23 07:45:04 +02:00
Florian Bruhin
113221c731 Log some exceptions 2014-06-20 23:26:19 +02:00
Florian Bruhin
d65587128f Add vim modelines to all files. 2014-06-19 09:04:37 +02:00
Florian Bruhin
1fef2d02b9 Add an :all-objects command and __repr__s 2014-06-17 11:03:42 +02:00
Florian Bruhin
af9e4ae072 Fix parent/child relationships 2014-06-17 07:17:21 +02:00
Florian Bruhin
7325cefdae Fix lint 2014-06-16 12:11:10 +02:00
Florian Bruhin
d76226626f Add debug argument for commands 2014-06-16 09:44:11 +02:00
Florian Bruhin
fd220b1b36 Raise CommandError instead of message.error where possible 2014-06-06 11:55:55 +02:00
Florian Bruhin
ec25821fae _foo.py file rename [2/2] 2014-06-03 15:01:57 +02:00
Florian Bruhin
fa1e03f56b _foo.py file rename [1/2] 2014-06-03 14:57:57 +02:00
Florian Bruhin
2eb26c96c4 More command splitting cleanup 2014-06-03 06:55:08 +02:00
Florian Bruhin
1d2d435231 Move split_cmdline() out of commands.managers 2014-06-03 06:55:08 +02:00
Florian Bruhin
fb7f1b381e Fix lint 2014-06-02 18:01:56 +02:00
Florian Bruhin
1e256699f8 Add topic-specific loggers 2014-05-23 16:11:55 +02:00
Florian Bruhin
1d5a1a29e8 Simplify calling commands with an instance.
We used to use a signal and a function in app.py which executes the command
handler. Now we instead use QCoreApplication.instance() which makes everything
a lot easier and cleaner.
2014-05-22 16:14:43 +02:00
Florian Bruhin
0c0cb48471 Fix lint 2014-05-22 15:44:16 +02:00
Florian Bruhin
22072eac7d Cleanup and documentation in commands/userscripts 2014-05-22 04:12:52 +02:00
Florian Bruhin
8d570b686c Initial userscript support 2014-05-21 19:53:58 +02:00
Florian Bruhin
d450257485 Add search-prev and bind N to it 2014-05-19 05:05:54 +02:00
Florian Bruhin
da2dc4861f Rename nextsearch command to search-next 2014-05-19 04:21:30 +02:00
Florian Bruhin
d1f921cc39 Print command name in ArgumentCountException 2014-05-19 04:06:12 +02:00
Florian Bruhin
f0d1d4ed45 Selectively queue messages rather than unqueueing. 2014-05-19 03:40:10 +02:00
Florian Bruhin
d901fe69e6 Rename some commands 2014-05-16 23:01:40 +02:00
Florian Bruhin
326280f910 Fix consistency and spelling in docstrings/comments 2014-05-15 16:27:34 +02:00
Florian Bruhin
603fbdf239 Range-check all values passed to C code. 2014-05-15 00:02:20 +02:00
Florian Bruhin
a045511962 Use exceptions for command errors 2014-05-14 18:00:40 +02:00
Florian Bruhin
df3528e454 Fix lint 2014-05-12 11:22:17 +02:00
Florian Bruhin
5a6208862e Add cmdutils.arg_or_count 2014-05-09 19:12:08 +02:00
Florian Bruhin
edc9d0810c Use QCoreApplication.instance() 2014-05-09 17:01:05 +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
667b255d01 Use QApplication for global singletons 2014-05-05 17:56:14 +02:00
Florian Bruhin
45e1feeb27 Handle arguments after aliases correctly when splitting. 2014-05-02 15:24:10 +02:00
Florian Bruhin
1655ddbfac Restore original command when splitting aliases 2014-05-02 15:23:45 +02:00
Florian Bruhin
554d5d2745 Fix command length (s/args/nargs) 2014-05-02 11:28:11 +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
0bf918631e Handle maxsplit=-1 correctly for completions 2014-05-01 20:18:29 +02:00
Florian Bruhin
533d82417e Refactor completion handling 2014-05-01 00:23:53 +02:00
Florian Bruhin
4e2517a94f Run sub-commands correctly 2014-04-30 10:47:46 +02:00
Florian Bruhin
995a0d19cc Clean up command exception handling 2014-04-30 10:43:40 +02:00
Florian Bruhin
689723508f Add broken JS checking for commands 2014-04-30 10:05:55 +02:00
Florian Bruhin
bfecafd686 Report if instance in cmdutils.register is missing 2014-04-28 00:01:21 +02:00
Florian Bruhin
8474bbdf6a Rename and reorder config options 2014-04-27 21:21:14 +02:00
Florian Bruhin
6e78f67a81 Rename keyinput stuff 2014-04-25 12:21:01 +02:00
Florian Bruhin
d4b35b6734 Rename {Command,Seach}Parser to *Manager 2014-04-25 12:04:11 +02:00
Florian Bruhin
937196e287 Rename package-private modules to _foo.py 2014-04-25 11:50:30 +02:00
Florian Bruhin
f437bc25bf Fix lint/cleanup 2014-04-25 11:21:00 +02:00
Florian Bruhin
b7440b1f79 Small exception handling cleanup in parsers.py 2014-04-25 11:02:41 +02:00
Florian Bruhin
7787a67c45 Add modes=[]/not_modes=[] to cmdutils.register 2014-04-25 10:10:58 +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
718295eb9f Use <> instead of @@ for special keys 2014-04-24 17:48:38 +02:00
Florian Bruhin
8648d88b51 Handle special keys instead of only modifiers 2014-04-24 17:43:19 +02:00
Florian Bruhin
0e3e588038 Add forward_unbound_keys setting 2014-04-24 16:53:16 +02:00
Florian Bruhin
2c5bb6a413 cmdutils.register: Support functions with no docstring 2014-04-23 07:32:00 +02:00
Florian Bruhin
55e3aca702 linting cleanup 2014-04-22 17:53:27 +02:00
Florian Bruhin
7758289f8b Register :nextsearch command. 2014-04-22 15:05:12 +02:00
Florian Bruhin
963066b4bd Remove some old FIXMEs 2014-04-22 14:45:24 +02:00
Florian Bruhin
d7b87e09c9 Implement modes and hint input. 2014-04-21 15:24:19 +02:00
Florian Bruhin
341481cd99 Allow bindings to be modified 2014-04-21 11:00:58 +02:00
Florian Bruhin
52c7376402 Split command-related stuff off from KeyParser 2014-04-21 10:45:57 +02:00
Florian Bruhin
39f580d9f1 Cleanup 2014-04-17 17:44:27 +02:00
Florian Bruhin
457e173592 More config cleanup.
This renames the config instance from "config" to "instance" and adds a
convenience get() function in the config module.
2014-04-17 15:26:27 +02:00
Florian Bruhin
b323706f5f Use maxsplit (passed to str.split()) instead bool 2014-04-17 12:06:27 +02:00
Florian Bruhin
4421862b3e Don't use shlex for splitting anymore 2014-04-17 11:49:19 +02:00
Florian Bruhin
97bde402fb Add docstring 2014-04-17 11:40:19 +02:00
Florian Bruhin
72340575af Remove value from on_config_changed signal again.
Turns out this causes more trouble than it's worth, and it's unintuitive
from which layer we get the value.
2014-04-17 11:39:25 +02:00
Florian Bruhin
7c64e8846a Refresh keybinds when config changes 2014-04-17 11:23:01 +02:00
Florian Bruhin
00dc4d6bc4 Remove set_trace 2014-04-17 11:09:12 +02:00
Florian Bruhin
a1a0325283 Use ChainMap for ValueList config section.
This also fixes the problem where no keybindings are loaded on the first
start.
2014-04-17 11:01:45 +02:00
Florian Bruhin
91e6f4c37d Better linting with config files 2014-04-16 11:05:58 +02:00
Florian Bruhin
e878fc538d Fix some checks 2014-04-16 10:02:34 +02:00
Florian Bruhin
24cdd88415 Fix weird 'no such command' message 2014-04-13 22:56:43 +02:00
Florian Bruhin
175eabdc80 Remove fallback values from config 2014-04-10 14:40:02 +02:00
Florian Bruhin
c5ca0e56be Remove blank lines before """ in docstrings.
pep257 has changed in this regard so we reflect this change.
2014-04-10 14:21:27 +02:00
Florian Bruhin
4ff86b660c Lint fixes 2014-04-10 12:24:41 +02:00
Florian Bruhin
237ff93908 Fix nargs handling 2014-04-10 11:58:05 +02:00
Florian Bruhin
e8f2698877 Improve argument count exception message 2014-04-10 09:56:06 +02:00
Florian Bruhin
6175f5c489 Use ConfigParser-like exceptions for config 2014-04-10 09:52:05 +02:00
Florian Bruhin
2442cf11ab Remove old logging 2014-04-10 09:40:16 +02:00
Florian Bruhin
60cb5ad85d Lint fixes 2014-04-10 07:42:21 +02:00
Florian Bruhin
e9317f807b Accept single int in register decorator for nargs 2014-04-10 07:04:02 +02:00
Florian Bruhin
c26430d08d Remove annoying two-word completions 2014-04-10 06:58:58 +02:00
Florian Bruhin
4c6a41dc94 Actually use nargs= from register_command decorator 2014-04-09 22:43:45 +02:00
Florian Bruhin
68413d8676 Better error for invalid argument count 2014-04-09 22:43:25 +02:00
Florian Bruhin
18bcae40c5 Fix completing when text ends with space #2 2014-04-09 21:15:18 +02:00
Florian Bruhin
72ab405040 Handle statusbar messages centrally 2014-04-09 20:47:24 +02:00
Florian Bruhin
fd3262e2ba Move split_cmdline to commands.parsers 2014-04-09 07:07:32 +02:00
Florian Bruhin
deb286272c Use command parser for completions 2014-04-09 06:58:17 +02:00
Florian Bruhin
1132f7bb6c Lint fixes 2014-03-24 11:48:56 +01:00
Florian Bruhin
fa6f464e23 Refactor completion model changing 2014-03-21 20:01:13 +01:00
Florian Bruhin
ce07baa901 Fix mainname bug 2014-03-10 00:39:15 +01:00
Florian Bruhin
ef8723d246 Remove parsers from cmdutils. 2014-03-10 00:39:15 +01:00
Florian Bruhin
1c43da163e Make this run again 2014-03-10 00:39:15 +01:00
Florian Bruhin
5564e4365e Post-refactor bugfixes 2014-03-10 00:39:14 +01:00
Florian Bruhin
40d7fc6f14 Start refactoring new config to use types 2014-03-10 00:39:14 +01:00
Florian Bruhin
98d15de460 Fix style issues 2014-03-10 00:39:14 +01:00
Florian Bruhin
369ee1f47e Config bugfixes.
Stylesheet still broken, but at least keybindings work.
2014-03-10 00:39:14 +01:00
Florian Bruhin
f079d6bf3b More config update/adoption 2014-03-10 00:39:14 +01:00
Florian Bruhin
4b3ae3f013 Style fixes 2014-03-10 00:39:14 +01:00
Florian Bruhin
265d8b7580 Avoid circular dependencies 2014-03-10 00:39:14 +01:00
Florian Bruhin
b6a28aba7b Add some documentation for decorators 2014-03-10 00:38:48 +01:00
Florian Bruhin
e30774e9d9 Fix variable name 2014-03-03 21:21:07 +01:00
Florian Bruhin
b75fc347dc Fix checks 2014-03-03 21:19:29 +01:00
Florian Bruhin
af0b6901be First kinda working version 2014-03-03 21:06:10 +01:00
Florian Bruhin
97ae3adb4a Working towards using getattr instead 2014-03-03 18:47:42 +01:00
Florian Bruhin
032ccb8b43 Try some broken component register foo 2014-03-03 17:56:53 +01:00
Florian Bruhin
b22b19d881 Start using (broken) decorators 2014-03-03 06:09:23 +01:00
Florian Bruhin
2df9b57981 Continue developing register_command decorator 2014-02-28 17:55:17 +01:00
Florian Bruhin
dcc3993091 Start implementing decorator 2014-02-28 17:00:25 +01:00
Florian Bruhin
d4df78b75f Add settrace command 2014-02-26 22:29:53 +01:00
Florian Bruhin
3b648a4c0d Move config to config subfolder 2014-02-23 18:14:40 +01:00
Florian Bruhin
b8b0d81ab3 Add command aliases 2014-02-21 20:19:01 +01:00
Florian Bruhin
5d32df1d54 Add :version command 2014-02-21 20:00:02 +01:00
Florian Bruhin
cf2133bb96 Add zoomin/zoomout commands. 2014-02-20 19:55:35 +01:00
Florian Bruhin
f70ad71f9c Add error strings to exceptions 2014-02-19 11:11:21 +01:00
Florian Bruhin
93065188a7 All-caps constants 2014-02-19 11:11:19 +01:00
Florian Bruhin
d58ef3ff84 Fix CommandParser.run exit status. 2014-02-19 11:11:18 +01:00
Florian Bruhin
9a990d56d9 Nicer docstrings 2014-02-19 10:58:32 +01:00
Florian Bruhin
5f83228c75 Reorder some methods, widgets not done yet 2014-02-18 17:54:17 +01:00
Florian Bruhin
911d5d3b4a Refactor ALL the things 2014-02-18 16:51:01 +01:00
Florian Bruhin
8fee32e6c4 Support multiple commands 2014-02-18 10:47:01 +01:00
Florian Bruhin
966ceba1e6 Import cleanup 2014-02-17 12:23:52 +01:00
Florian Bruhin
d5807169d1 Decorate slots with pyqtSlot.
This seems to reduce memory usage a bit and make things a bit faster.
2014-02-17 12:00:08 +01:00
Florian Bruhin
933296f47f Move models to qutebrowser.models 2014-02-14 17:41:12 +01:00
Florian Bruhin
203fa3eb34 Docstring grammar fixes 2014-02-13 18:57:19 +01:00
Florian Bruhin
029813c8eb Implement page-wise scrolling. 2014-02-13 10:28:09 +01:00
Florian Bruhin
39ed73c3cf python package cleanup 2014-02-10 15:06:46 +01:00
Florian Bruhin
01633007e0 Be PEP257 compliant. 2014-02-07 20:21:50 +01:00
Florian Bruhin
0648dce295 Add GNU GPL 2014-02-06 14:01:23 +01:00
Florian Bruhin
e2589a35b3 Add opencur and tabopencur 2014-02-06 13:34:49 +01:00
Florian Bruhin
888c1690de Add FIXME in _handle_single_key 2014-02-05 11:20:33 +01:00
Florian Bruhin
43c2e21daa Avoid code duplication in KeyParser 2014-02-05 11:08:11 +01:00
Florian Bruhin
9c19fd21d6 Implement handling keys with modifiers 2014-02-05 10:54:56 +01:00
Florian Bruhin
630ff1cbf6 Remove obsolete desc from docstring 2014-02-05 08:35:00 +01:00
Florian Bruhin
49803b051e Add :crash command 2014-01-30 14:58:32 +01:00
Florian Bruhin
ee9d8e74be Implement ignorecase/wrapsearch settings. 2014-01-30 12:03:34 +01:00
Florian Bruhin
7a2a7ab709 Reset search on new search 2014-01-30 11:53:58 +01:00
Florian Bruhin
53861306ff Don't choke on empty command string 2014-01-30 11:51:56 +01:00
Florian Bruhin
b158cd78b5 Allow non-None default for count 2014-01-30 07:08:45 +01:00
Florian Bruhin
85c44ed78c Implement count everywhere 2014-01-30 07:05:17 +01:00
Florian Bruhin
58103fa7e4 Implement yank/paste 2014-01-30 00:29:46 +01:00
Florian Bruhin
18c68ce74e Implement searching 2014-01-29 21:06:56 +01:00
Florian Bruhin
c0f01d9219 Allow other chars than : to be used for commandline 2014-01-29 20:25:41 +01:00
Florian Bruhin
e56099e0ec Docstringify ALL the things 2014-01-29 15:30:19 +01:00
Florian Bruhin
696362a0f6 Use docstrings instead of desc for command classes 2014-01-29 04:20:54 +01:00
Florian Bruhin
201e8f7c46 docstrings++ 2014-01-29 04:07:27 +01:00
Florian Bruhin
8dcdae00b9 Refactor command handling file layout 2014-01-29 06:30:00 +01:00
Florian Bruhin
f5af700f1c Refactor CommandParser 2014-01-29 06:18:01 +01:00
Florian Bruhin
6f3a2448ba pep8 fixes 2014-01-28 23:12:44 +01:00
Florian Bruhin
f059bf0b3d some pylint fixes 2014-01-28 19:52:09 +01:00
Florian Bruhin
80feee323f Fix long lines 2014-01-28 17:33:48 +01:00
Florian Bruhin
b83bf4e238 Rename scrollpercent{x,y} 2014-01-28 06:52:59 +01:00
Florian Bruhin
981aab8e7d Update command docstring 2014-01-28 06:45:38 +01:00
Florian Bruhin
c2ee83cb48 Add descriptions to commands 2014-01-28 06:37:56 +01:00
Florian Bruhin
480cf787b2 Hide internal commands 2014-01-28 06:22:09 +01:00
Florian Bruhin
90180509a2 Fix invalid argument count error 2014-01-27 22:32:22 +01:00
Florian Bruhin
f2223064b3 Merge completion branch
Squashed commit of the following:

commit 8bbf7242e7ae3168a0e8652ad643c7c1fe8670d3
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 21:34:35 2014 +0100

    foo

commit cc9a4eed6e7ca9599bcc40b40f43614040711714
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 21:33:09 2014 +0100

    fixes

commit b84c9207f8596dac0f47bf72cd178f8e3ee9ebb7
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 21:27:48 2014 +0100

    Make titles bold

commit d2ef899f90036b05856deb178e61de5d961e1342
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 21:18:01 2014 +0100

    Make tab work properly

commit ccc407093e39f1964c8e3ff2900c66b28dc7fe56
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 16:19:57 2014 +0100

    Add FIXME, remove showhide

commit cbe6d0a2b0614df839c75f1815f939c11e4ae3ba
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 16:12:55 2014 +0100

    Use stylesheet for highlight

commit 7eeb6e79f17bc8e7ccc1ec90f474d1c2b1c01c1e
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 16:01:50 2014 +0100

    Make highlighting work

commit 4fed5b9f7291109fd1c669c61501861223364b7d
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 17:49:30 2014 +0100

    First attempt at marking

commit 27a3bda214b7fc7741b4c12d723ccdf4073c0d5e
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 17:14:48 2014 +0100

    Funny broken marking

commit 2798cf75dd295ace2a33295e9a64dd373b7fd669
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 16:25:36 2014 +0100

    Make completion and filtering work

commit b213d9724bc9f4bb36204bd1b2c4aaf62a454e11
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 16:07:14 2014 +0100

    Implement dynamic source models

commit c7951e6b4346a1702509bea6d3694cc50550c9ed
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 14:44:31 2014 +0100

    Add custom filtering

commit 37b100f3a1a1f5a90592e34b268c08df684b0df9
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 14:43:57 2014 +0100

    Add default roles in model

commit 1610423c1dd36c0adc35743a38e2c3a81f3641ef
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 14:43:36 2014 +0100

    Remove dataChanged

commit 467712630b00a9ca2407903bdba977b5e66dd2bc
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 13:57:18 2014 +0100

    Fix stuff

commit 00bb46e0ef46b9ae61652bde3ae10d3252263e46
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 11:51:34 2014 +0100

    First attempt at a real CommandCompletionModel

commit a8be022f80d7d35049d1ae3d8431702e7a407698
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 10:25:48 2014 +0100

    Adapt completion view to size

commit ad6bf69a4257880ce14b0590bcb5381c718bb744
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 09:17:48 2014 +0100

    Fix stuff

commit 41c1fbfa942bab0a1a0db35f6b745b691c774b22
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 09:16:09 2014 +0100

    Hide CompletionView by default

commit 2ac8596dada6c7e079807bfd698377a9d3ffd0af
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 09:13:11 2014 +0100

    File shuffling

commit f0c85d5bee30095324be354934f3379c1c6a5291
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 09:04:29 2014 +0100

    Cleanup, don't show completionview

commit 177ac97acb2d611992869f122669d95a8dadcdbb
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 07:16:37 2014 +0100

    Add FIXME for eliding

commit 6b234c58928e9a231ec35e5080a27d7a8affebc4
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 07:12:55 2014 +0100

    Add TextOption to TextDocument

commit 195e95459b54bbdb0545cb0e4db417ab641cea28
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Jan 27 07:01:41 2014 +0100

    Resize QTreeView contents based on window size

commit 05b854bc812f0aabf5c6dcbdfa1dfd74ea495170
Author: Florian Bruhin <git@the-compiler.org>
Date:   Sun Jan 26 01:19:28 2014 +0100

    Split files

commit ff433b561179a562494c7d3558336a917edc497f
Author: Florian Bruhin <git@the-compiler.org>
Date:   Sun Jan 26 00:57:18 2014 +0100

    cleanup

commit bdb17de2fee65411b4dd1d0ad449329f0586f1e0
Author: Florian Bruhin <git@the-compiler.org>
Date:   Sun Jan 26 00:15:17 2014 +0100

    Make text drawing work properly

commit d844152074738df88ed79c2e1efc4eec4b6e5734
Author: Florian Bruhin <git@the-compiler.org>
Date:   Sat Jan 25 14:03:16 2014 +0100

    Split painting into functions

commit 585a9f6931a407117c4232ac14844d33233922f8
Author: Florian Bruhin <git@the-compiler.org>
Date:   Sat Jan 25 13:50:52 2014 +0100

    Use QTextDocument, things are getting better

commit 96fef2114e68766590ed33fa92c6f2bbac8adb11
Author: Florian Bruhin <git@the-compiler.org>
Date:   Sat Jan 25 13:08:58 2014 +0100

    Failed try to reimplement painting

commit d967285f24a7966674c8685e9e276e560e9cc066
Author: Florian Bruhin <git@the-compiler.org>
Date:   Sat Jan 25 11:15:07 2014 +0100

    Try drawing over text

commit 2687d891cc2f1ecd00cace78492cbffc745d9e5b
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Jan 24 23:06:44 2014 +0100

    First try at implementing delegate

commit c8bada0c7607df936df04b9c7796a03cc2e1a71a
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Jan 24 19:59:14 2014 +0100

    Don't allow categories to be selected

commit 6b56df5a0e2588d89d757f583070dd2ca78a6e15
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Jan 24 19:53:36 2014 +0100

    Add outline:0 to TreeView

commit 534ba6e191e711cc7abeea78c3bf470e9eaf0bfd
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Jan 24 17:57:57 2014 +0100

    More styling

commit 065d40c24d2746f49660485700e3e6327b28810d
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Jan 24 17:47:40 2014 +0100

    Add more commands, more styling for TreeView

commit 2362d01db40bbc923a51a8bc53ffbabfd18ebea0
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Jan 24 16:50:31 2014 +0100

    Adjust super()

commit 43ebedff6724af0f217acc14a325febd12c4ed0b
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Jan 24 16:50:20 2014 +0100

    Style CompletionView

commit 79c1010cf54bd8a3c3f4b2b4a9f97d8ae7d603fb
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Jan 24 13:06:12 2014 +0100

    Completion refactoring

    Clean up imports
    Whitespace
    Make items non-editable
    Rename nodeToIndex()
    Return QVariant() instead of None
    Remove comments
    Don't inherit TreeItem from object
    Get rid of getValue
    Get rid of child()
    Get rid of childCount
    Remove appendChild
    Get rid of columnCount
    Get rid of parent()
    Renames
    Refactor if
    Simplify columnCount
    Minor fixups

commit a7a6b95f56a87ef03359ec5f9e5d45a906112845
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Jan 24 13:04:28 2014 +0100

    Split completion out of command.py

commit cd1c6419ff4034a29a1b48c4ed6ca292944f5674
Author: Florian Bruhin <git@the-compiler.org>
Date:   Thu Jan 23 17:53:37 2014 +0100

    Fix

commit 7073edea92ff8384535f5db80c01168bb8462e75
Author: Florian Bruhin <git@the-compiler.org>
Date:   Thu Jan 23 17:28:03 2014 +0100

    More attempts

commit 7dc522667ba52e9b7f20b3b66e977d23258a3ff4
Author: Florian Bruhin <git@the-compiler.org>
Date:   Thu Jan 23 16:56:01 2014 +0100

    Get rid of parent in setupModelData

commit 5df4874e14818399494f3a47f7feea8b9f86cf69
Author: Florian Bruhin <git@the-compiler.org>
Date:   Thu Jan 23 16:51:52 2014 +0100

    First model/view experiments
2014-01-27 21:35:12 +01:00
Florian Bruhin
226adac899 Rename parse_check_run to run in CommandParser 2014-01-22 17:31:15 +01:00
Florian Bruhin
8e71f0cb8c Use commandparser.parse_check_run() for keys.py 2014-01-22 17:25:47 +01:00
Florian Bruhin
d56344f46a Move some things from x.foo.foo to x.foo (__init__.py) 2014-01-21 15:46:41 +01:00
Florian Bruhin
06b1683033 Add colon in set_cmd 2014-01-21 12:01:28 +01:00
Florian Bruhin
fdf765b267 Implement ScrollPercent{X,Y}, gg and G with count 2014-01-20 17:59:27 +01:00
Florian Bruhin
ac570be7aa Catch ValueError when parsing commands from keybindings 2014-01-20 17:52:39 +01:00
Florian Bruhin
5c8043a275 Add aliases for commands 2014-01-20 17:32:04 +01:00
Florian Bruhin
1373b4dab2 Use multiple CommandParser instances 2014-01-20 17:20:17 +01:00
Florian Bruhin
46e846afb9 Add FIXME 2014-01-20 17:05:56 +01:00
Florian Bruhin
5fce707bb2 Replace scroll{up,down,left,right} by scroll cmd 2014-01-20 17:05:47 +01:00
Florian Bruhin
1a6907b4b0 Refactor command/key handling again 2014-01-20 17:01:15 +01:00
Florian Bruhin
1095e24f98 Refactor ALL the things
- Remove super() where unneeded
 - Add docstrings where applicable
 - Remove setObjectName calls
 - Lots and lots of smaller changes
2014-01-20 15:58:49 +01:00
Florian Bruhin
7ed257467b Start implementing config storage 2014-01-20 12:26:02 +01:00
Florian Bruhin
646ad5efd4 Refactor partial matching in KeyParser._handle() 2014-01-20 09:09:57 +01:00
Florian Bruhin
8d8cc25344 Add FIXME for cmd parsing IndexError 2014-01-20 08:58:56 +01:00
Florian Bruhin
7341193cf0 More FIXME 2014-01-20 08:42:08 +01:00
Florian Bruhin
b5527c834b Add a FIXME for ambigious keys 2014-01-20 08:38:15 +01:00
Florian Bruhin
35dffad869 Fix parsing of single args 2014-01-20 08:36:36 +01:00
Florian Bruhin
6acac5cb71 Display keystring in statusbar 2014-01-20 07:01:39 +01:00
Florian Bruhin
d635cbd3fd Fix shlex parsing 2014-01-20 06:51:59 +01:00
Florian Bruhin
fd9ab82e8b Add :pyeval 2014-01-19 23:54:22 +01:00
Florian Bruhin
bd28c00cf1 Use shlex to split command args, add split_args property 2014-01-19 23:33:13 +01:00
Florian Bruhin
1e8cb42c00 Rewrite whole command system.
Every command signal now returns a tuple (count, args) and gets handled
in app.py by cmd_handler. This makes things easier in a lot of places.
2014-01-19 22:55:00 +01:00
Florian Bruhin
114c2c01d3 First broken attempt at implementing count 2014-01-19 22:25:54 +01:00
Florian Bruhin
bf99519046 More key refactoring 2014-01-19 20:45:01 +01:00
Florian Bruhin
fb54eb58c1 Start reworking key parsing 2014-01-19 19:41:34 +01:00
Florian Bruhin
bba3696630 commands: Implement scrollstart and scrollend 2014-01-19 18:43:47 +01:00
Florian Bruhin
8ca98da6c4 commands: Add debug output when command is called 2014-01-19 18:43:34 +01:00
Florian Bruhin
0dd204b182 Implement scroll{left,right} 2014-01-19 17:45:03 +01:00
Florian Bruhin
ff938fc0d5 Add undo command 2014-01-17 23:17:24 +01:00
Florian Bruhin
022fc7aa4e Add scrolling commands 2014-01-17 22:02:11 +01:00
Florian Bruhin
ff855d6ded Add commands reload/stop/back/forward/print 2014-01-17 21:51:38 +01:00
Florian Bruhin
5efa56c5bb Add logging 2014-01-17 20:03:21 +01:00
Florian Bruhin
3a76d52ffb Move keys.py to commands 2014-01-17 12:01:21 +01:00
Florian Bruhin
b14f3f63c5 Fix empty command handling 2014-01-17 12:00:13 +01:00
Florian Bruhin
4e9527fb4c More fixups 2014-01-17 11:55:16 +01:00
Florian Bruhin
df48208524 tolower() -> lower() 2014-01-17 11:29:06 +01:00
Florian Bruhin
6e700ba4ad Fix inspect namespacing 2014-01-17 11:28:46 +01:00
Florian Bruhin
f61debd2f4 Fix circular import 2014-01-17 11:28:35 +01:00
Florian Bruhin
04140d9777 Remove explicit command name 2014-01-17 11:14:19 +01:00
Florian Bruhin
61c90f293c Split commands to commands/utils 2014-01-17 10:57:27 +01:00