Commit Graph

8163 Commits

Author SHA1 Message Date
Liam BEGUIN
b66d5e1ce9 Fixed indentations 2016-05-17 19:58:27 -04:00
Ryan Roden-Corrent
822d148713 Update key hint tests for new format.
Change the unit tests to expect the new tabular format.
Also generally clean up the tests -- refactor from a class to
module-level functions as there was no need for a class here.
2016-05-17 07:04:53 -04:00
Panagiotis Ktistakis
959f777f92 Assert that hovered link generates a valid QUrl 2016-05-17 10:28:33 +03:00
Liam BEGUIN
531a5071f6 updated inputs-group 2016-05-17 00:38:23 -04:00
Ryan Roden-Corrent
86f95c302d Explain timeout vs partial-timeout better in docs. 2016-05-16 21:40:30 -04:00
Felix Van der Jeugt
acb60a1bf4 align using a table 2016-05-16 07:14:34 -04:00
Liam BEGUIN
3b0354518b Added basic inputs-group to :hint 2016-05-15 22:46:12 -04:00
Ryan Roden-Corrent
3cd252ef82 Clean up html for keyhint text.
The \t was behaving the same as a space and the <b> was doing nothing.
2016-05-15 22:33:53 -04:00
Ryan Roden-Corrent
8eee5def5d Add unit tests for the keyhint widget.
- validate keyhint text for a partial keychain
- ensure special keybindings are not suggested
- ensure it is not visible when disabled
- ensure changes to the suffix color are picked up
2016-05-15 22:20:52 -04:00
Ryan Roden-Corrent
581a521b4d Allow setting mock keybindings for unit tests.
Implement mock_key_config.set_bindings_for to set bindings that will be
retrieved by mock_key_config.get_bindings_for.
This is useful for testing the new keyhint ui.
2016-05-15 22:18:16 -04:00
Ryan Roden-Corrent
d506d7793f Further clean up keyhints.
Don't show special keys in the keyhint window as these currently cannot
be part of keychains.
Use a rounded border on the top-right corner and square on the rest.
2016-05-15 12:32:36 -04:00
Panagiotis Ktistakis
224c877fec Hide passwords in hovering URLs 2016-05-15 19:07:10 +03:00
Florian Bruhin
0c1e82a103 Fix lint 2016-05-15 11:53:58 +02:00
Florian Bruhin
6fc2217b07 Merge branch 'rcorre-messages' 2016-05-15 11:51:20 +02:00
Florian Bruhin
76a755634b Update changelog 2016-05-15 11:51:09 +02:00
Florian Bruhin
9b28d90543 Improve output if :messages is used without errors 2016-05-15 11:50:29 +02:00
Florian Bruhin
b704c911ae Fix running qute:log and qute:plainlog
This failed because dict.get('level') returned None with no level
parameter, and the subsequent [0] raised:

    Traceback (most recent call last):
      File ".../qutebrowser/utils/utils.py", line 624, in wrapper
        return func(*args, **kwargs)
      File ".../qutebrowser/browser/network/networkmanager.py", line 445, in createRequest
        op, req, outgoing_data)
      File ".../qutebrowser/browser/network/qutescheme.py", line 107, in createRequest
        data = handler(self._win_id, request)
      File ".../qutebrowser/browser/network/qutescheme.py", line 189, in qute_log
        level = urllib.parse.parse_qs(request.url().query()).get('level')[0]
    TypeError: 'NoneType' object is not subscriptable
2016-05-15 11:33:30 +02:00
Florian Bruhin
bb31787931 Regenerate docs 2016-05-15 11:21:02 +02:00
Florian Bruhin
e21039094d Merge branch 'messages' of https://github.com/rcorre/qutebrowser into rcorre-messages 2016-05-15 11:20:06 +02:00
Florian Bruhin
8193644a04 Merge branch 'forkbong-set-cmd-text-variables' 2016-05-15 11:09:37 +02:00
Florian Bruhin
a9ab6abafd Document {url} and {url:pretty} for :set-cmd-text 2016-05-15 11:09:16 +02:00
Florian Bruhin
3831dc38f7 Regenerate authors 2016-05-15 11:09:08 +02:00
Florian Bruhin
0888f676f3 Change go/gO/xO/wO bindings to use {url:pretty}
This is now possible with #1494.
See #1483.
2016-05-15 11:06:54 +02:00
Florian Bruhin
b75d1629a8 Merge branch 'set-cmd-text-variables' of https://github.com/forkbong/qutebrowser into forkbong-set-cmd-text-variables 2016-05-15 11:01:58 +02:00
Florian Bruhin
6b4efc1822 Fix log output in crash report
With the changes to get rid of colorlog, we broke this, as e.g. {green}
was an undefined key for the vanilla logging.Formatter used for the
in-RAM log. Now we instead use a ColoredFormatter with colors turned
off.
2016-05-15 10:46:46 +02:00
Florian Bruhin
33236b5314 Make tox -e mkenv work
This is a common typo, so let's just make things work. It does the exact
same thing as tox -e mkvenv.
2016-05-15 09:59:44 +02:00
Ryan Roden-Corrent
231950aa88 Increase default value for input.partial-timeout.
Increase from 500 to 2500.
This allows the user more time to read hints shown in the new keyhint
popup.
2016-05-14 19:30:39 -04:00
Ryan Roden-Corrent
d592a3e764 Clean up keyhint implementation.
From code review:

- escape all strings used in the keyhint html
- read the prefix color each time the hint is shown
- use show/hide instead of setVisible
- clean up pylint/flake8 errors
- use CssColor instead of QssColor for keyhint.fg.suffix
- add some padding to the keyhint popup
2016-05-14 19:30:28 -04:00
Florian Bruhin
a1bac9509b Merge branch 'ismail-s-patch-1' 2016-05-14 23:52:43 +02:00
Florian Bruhin
e476a21876 Regenerate authors 2016-05-14 23:52:36 +02:00
Florian Bruhin
827ad3fb13 Merge branch 'patch-1' of https://github.com/ismail-s/qutebrowser into ismail-s-patch-1 2016-05-14 23:52:22 +02:00
Panagiotis Ktistakis
c88883fcb3 Decode URL in statusbar when hovering over it 2016-05-14 19:52:24 +03:00
Ryan Roden-Corrent
e7ff717d52 Show key hints for all modes, not just normal. 2016-05-14 12:50:26 -04:00
Ryan Roden-Corrent
8406746889 Show possible keychains from current input.
When the current keystring is a partial match for one or more bindings,
show the possible bindings in a small overlay.

The overlay is partially transparent by default, but the background
color is configurable as ui->keystring.bg.
2016-05-14 12:50:26 -04:00
Ryan Roden-Corrent
fcd233a675 Clean up :messages implementation.
- Add log.LOG_LEVELS to map names to levels (instead of using
  logging._levelToName)
- Test that log pages do not contain messages below the requested level
- Use pythons urllib.parse.parse_qs instead of Qt's UrlQuery
- Document tab, bg, window args for :messages
- Clean up style
2016-05-14 12:45:22 -04:00
Panagiotis Ktistakis
9527712daa Add tests for {url:pretty} in :set-cmd-text 2016-05-14 18:44:05 +03:00
Ryan Roden-Corrent
c36f760114 Add bdd test for page not containing plaintext.
You can now use 'the page should not contain the plaintext ...' in a
feature test.
2016-05-14 07:10:58 -04:00
Ryan Roden-Corrent
800c1c3cf8 Add :messages command to show past messages.
This adds a 'level' query parameter to qute://log and qute://plainlog.
For example, qute://log?level=warning will show an html page containing
log entries with severity warning or greater.
If the query is omitted, the original behavior of qute://log is
preserved.

:messages [level] is a command that opens qute://log?level=<level>.
By default, level defaults to 'error' as an easy way to see missed
error messages.
2016-05-14 07:10:58 -04:00
Ismail
d6fede7f1d Change 'commands' to 'keybindings' 2016-05-13 23:32:45 +01:00
Ismail
40c2bc7151 Add more commands to docs 2016-05-13 23:29:04 +01:00
Florian Bruhin
42460c3c04 tox: Update pyparsing to 2.1.4
- Split out the '==' behavior in ParserElement, now implemented
  as the ParserElement.matches() method. Using '==' for string test
  purposes will be removed in a future release.

- Expanded capabilities of runTests(). Will now accept embedded
  comments (default is Python style, leading '#' character, but
  customizable). Comments will be emitted along with the tests and
  test output. Useful during test development, to create a test string
  consisting only of test case description comments separated by
  blank lines, and then fill in the test cases. Will also highlight
  ParseFatalExceptions with "(FATAL)".

- Added a 'pyparsing_common' class containing common/helpful little
  expressions such as integer, float, identifier, etc. I used this
  class as a sort of embedded namespace, to contain these helpers
  without further adding to pyparsing's namespace bloat.

- Minor enhancement to traceParseAction decorator, to retain the
  parse action's name for the trace output.

- Added optional 'fatal' keyword arg to addCondition, to indicate that
  a condition failure should halt parsing immediately.
2016-05-13 21:21:14 +02:00
Florian Bruhin
c64e5c9bd5 Get rid of the colorlog dependency
colorlog was problematic for various reasons:

- Not commonly packaged for Linux distributions
- Calling colorama.init() automatically on import
- Not supporting {foo} log formatting
- Not supporting an easy way to turn colors off

Instead we now do the log coloring by hand, which is simpler and means
everyone will have colored logs.
2016-05-13 21:19:33 +02:00
Panagiotis Ktistakis
bb45392c1b Use the right split function 2016-05-13 19:32:35 +03:00
Ismail
9264bd077a Add basic commands to docs 2016-05-13 17:13:45 +01:00
Panagiotis Ktistakis
ecfa6cfc63 Split arguments using qutebrowser.utils.split 2016-05-13 18:59:24 +03:00
Panagiotis Ktistakis
7488f2a5cb Remove unused imports 2016-05-13 18:58:42 +03:00
Panagiotis Ktistakis
38edb1b16d Properly replace variables in set-cmd-text command
This fixes #123 and allows variables like {url:pretty} to be used with
set-cmd-text
2016-05-13 18:12:53 +03:00
Florian Bruhin
a9a853baf0 Improve message stack output
The output failed the tests as it was parsed as invalid. Indenting helps
with that.

This also simplifies things a bit by having a _log_stack function and
shows the type of stack we're printing.
2016-05-13 08:27:11 +02:00
Florian Bruhin
4a551a6758 Show exception stack when handling cmdexc errors. 2016-05-13 07:43:44 +02:00
Florian Bruhin
b6abada50a Fix lint 2016-05-13 06:42:09 +02:00