Commit Graph

577 Commits

Author SHA1 Message Date
Florian Bruhin
cf070d48f2 WebEngine: Disable createWindow for Qt < 5.7.1
Fixes #1911.

The bugfix is backported in my qt5-webengine-debug package, and
QUTE_QTBUG54419_PATCHED can be set to force qutebrowser to use
createWindow.
2016-09-05 15:08:00 +02:00
Florian Bruhin
1cdf90f1c7 pastebin: Start sending API key
This is not enforced on the server yet, but this way we can do so after
a few releases (and break crash reports for older releases).
2016-09-01 22:57:35 +02:00
rmortens
384e3d1d88 Add change format for debug-log-level cmd 2016-08-24 08:40:11 -06:00
Florian Bruhin
bcb06f0cc6 Fix lint 2016-08-19 15:47:35 +02:00
Florian Bruhin
e074192cc4 Update docs 2016-08-19 15:27:56 +02:00
Florian Bruhin
7e3d1ccd24 Simplify :debug-log-filter implementation 2016-08-19 15:08:15 +02:00
Florian Bruhin
e1cd905163 Move :window-only below :debug-log-* in utilcmds 2016-08-19 15:06:08 +02:00
Florian Bruhin
71b0876188 Improve :debug-log-filter message
This changes the message so it resembles the default choices=... one,
and also changes the argument to "filters" because that sounds nicer as
a metavar.
2016-08-19 15:03:19 +02:00
Florian Bruhin
75c3b1a9f8 Fix test for :debug-log-level with invalid level
Since we're getting dictionary keys in choices=..., we need to sort them
so we get a consistent message.
2016-08-19 14:57:21 +02:00
knaggita
1d5a3a6175 Add :debug-loglevel :debug-logfilter commands 2016-08-19 14:12:19 +02:00
Florian Bruhin
882d1a5e88 Move :window-only to misc.utilcmds 2016-08-16 11:05:02 +02:00
Florian Bruhin
57896dc00e Merge branch 'clip' of https://github.com/blyxxyz/qutebrowser into blyxxyz-clip 2016-08-10 20:38:54 +02:00
Jan Verbeek
63b9b61e75 Add ClipboardError superexception 2016-08-10 12:33:01 +02:00
Florian Bruhin
a24391d40d Fix lint 2016-08-10 09:20:30 +02:00
Florian Bruhin
26af2b3089 Fix grammar mistake 2016-08-10 08:48:04 +02:00
Florian Bruhin
dfd58d456a Merge branch 'pythonoptimize-fix' of https://github.com/lejenome/qutebrowser into lejenome-pythonoptimize-fix 2016-08-10 08:47:34 +02:00
Florian Bruhin
fb3da578c5 Fix lint 2016-08-09 17:28:14 +02:00
Moez Bouhlel
c04adb94b2
DocstringParser - support python with optimizations on 2016-08-08 10:01:50 +01:00
Jan Verbeek
ebfe23c376 Merge https://github.com/The-Compiler/qutebrowser into clip
Also make it possible to use multiple variables in one argument.
2016-08-07 13:14:46 +02:00
Florian Bruhin
b6fbd3ce3a Merge branch 'better-variables' of https://github.com/blyxxyz/qutebrowser into blyxxyz-better-variables 2016-08-07 11:33:01 +02:00
Jan Verbeek
38508274e0 Improve clipboard exceptions, migrate bindings 2016-08-07 00:46:23 +02:00
Daniel Schadt
9a4655443f os.unlink -> os.remove
The functions do the same, but remove sounds better.
2016-08-07 00:11:58 +02:00
Daniel Schadt
f23a28079c editor: fix external editor on windows
On windows, only one process can open a file in write mode at once. We
didn't close the handle we got (self._oshandle) before _cleanup, which
means that we had the file open the whole time, which means that the
external editor couldn't write back the changes.

This patch closes the file while the external editor is running and only
opens it once the editor is closed. We re-opened the file anyway, so
this shouldn't be a huge change. Additionally, tempfile.NamedTemporaryFile
is used instead of mkstemp, as we don't have to deal with os-level file
handles that way.
2016-08-06 20:04:25 +02:00
knaggita
d25e1fde04 Add :debug-log-capacity command 2016-08-05 15:05:27 +02:00
Florian Bruhin
029ea2e5a7 Add miscwidgets.WrapperLayout.wrap
This makes it easier for an user of WrapperLayout to wrap a widget.
2016-08-04 19:22:44 +02:00
Jan Verbeek
c7c5a98506 Allow {url} and {url:pretty} as parts of arguments
This makes commands like `:open web.archive.org/web/{url}` possible.
This commit also adds a no_replace_variables command register argument
that stops the replacement from happening, which is important for
commands like `:bind` and `:spawn` that take a command as an argument.
2016-08-04 02:43:02 +02:00
Florian Bruhin
dbccb12b49 Move WrapperLayout to miscwidgets 2016-08-03 13:08:25 +02:00
Ryan Roden-Corrent
a086095954 Implement unix_filename_rubout.
unix_filename_rubout deletes to the previous slash or whitespace,
unlike the previously implemented backwards-kill-word which treats and
non-alphanumeric character as a boundary.

To illustrate, given the text 'foo/bar.baz', unix_filename_rubout will
delete 'bar.baz' while backwards-kill-word will delete only 'baz'.

See #1710.
2016-07-30 19:34:38 -04:00
Ryan Roden-Corrent
6bcdacf1ce Implement readline's backward-kill-word.
This restores the previous behavior of `unix-word-rubout` as
`backward-kill-word`, which is closer to the naming used in readline.
It is bound to <Alt-Backspace> by default, though <Ctrl-Backspace> will
also work due to a builtin binding.

Resolves #1698.
2016-07-30 07:27:29 -04:00
Florian Bruhin
caab826e8a Use repr() for IPC logging messages 2016-07-28 07:14:54 +02:00
Florian Bruhin
0eb74dcc1b Hide harfbuzz warning if frozen 2016-07-27 12:15:10 +02:00
Florian Bruhin
7b82d81784 Improve error message on OS X without QtWebEngine 2016-07-27 12:13:22 +02:00
Florian Bruhin
3ccb691e9f tab API: Rename scroll to scroller
The scroll attribute did overwrite QWidget.scroll which is unfortunate.
2016-07-26 13:19:07 +02:00
Florian Bruhin
e887d9a381 Remove useless super-calls 2016-07-23 18:39:27 +02:00
Jean-Louis Fuchs
ef01566621 Initialize qt logging to qutebrowser as early as possible 2016-07-23 09:54:13 +00:00
Florian Bruhin
63e466f019 Remove @pyqtSlot for some non-QObject classes
Not sure if I got all, but at least I got the ones which fail
immediately on start.

See #1669.
2016-07-21 14:56:12 +02:00
Florian Bruhin
d867a789c2 Re-enable crash reports for QtWebEngine 2016-07-17 14:27:01 +02:00
Florian Bruhin
ff89ae7839 Merge branch 'master' of https://github.com/blyxxyz/qutebrowser into blyxxyz-master 2016-07-13 21:21:37 +02:00
Jan Verbeek
bbc46d28ff Use lists instead of tuples for comparing
Per one of the diff comments on #1597:
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
2016-07-12 22:05:32 +02:00
Jan Verbeek
cafe7181c7 Blacklist command-accept, hide repeat-command
prompt-accept was blacklisted instead of command-accept.
2016-07-12 16:48:33 +02:00
Florian Bruhin
d315a3131d Require QtWebEngine with --backend webengine 2016-07-11 22:51:05 +02:00
Florian Bruhin
7e36884cbd Add some debug logging to early QWEW import
See #1640
2016-07-11 13:49:24 +02:00
Florian Bruhin
6a07d231f4 pykint: Add some disable=unused-variable 2016-07-11 13:18:31 +02:00
Florian Bruhin
b4f993e2ab Add an early-import for QtWebEngineWidgets 2016-07-11 09:18:05 +02:00
Florian Bruhin
2befebaf3a Don't use properties for AbstractTab
Otherwise exceptions in there could be hidden by Python/PyQt.

Some places are not changed yet, as there are also other renames in the
next commits.
2016-07-08 10:05:46 +02:00
Florian Bruhin
0207f8758b Only disable reports with --backend webengine 2016-07-07 18:32:52 +02:00
Florian Bruhin
e1bad17f2a Split up SessionManager._save_tab_item 2016-07-07 18:32:52 +02:00
Florian Bruhin
f72f82fb0c QtWebEngine: Fix userData() call on session saving 2016-07-07 18:32:52 +02:00
Florian Bruhin
4de48620e3 Fix loading of sessions 2016-07-07 18:32:52 +02:00
Florian Bruhin
9f130c6b27 Disable crash reports 2016-07-07 18:32:52 +02:00
Florian Bruhin
16c397a9d2 Fix various zooming issues 2016-07-07 18:32:52 +02:00
Florian Bruhin
34d3d2cda6 Full scrolling implementation 2016-07-07 18:32:52 +02:00
Florian Bruhin
363f3d7ea7 Replace scroll_pos by scroll_pos_px()/_perc() 2016-07-07 18:32:52 +02:00
Florian Bruhin
ed716b2b90 Make session saving work 2016-07-07 18:32:52 +02:00
Florian Bruhin
70117265d6 Fix some a/an misspellings
Thanks to https://github.com/jwilk/anorack
2016-07-05 08:34:03 +02:00
Jan Verbeek
955478799b Shorten repeat-command description, remove .i, .o
If .i and .o exist there's a delay before . gets accepted.
2016-07-04 13:39:00 +02:00
Jan Verbeek
9678fd1e09 Make argument description more clear + style fix 2016-07-01 19:17:50 +02:00
Jan Verbeek
2ab1d35a7c Remove useless import and global declaration, add missing whitespace 2016-06-30 03:13:40 +02:00
Jan Verbeek
320b9cac3f Move repeat-command, make it work with multiple modes, improve tests 2016-06-30 02:22:02 +02:00
Edgar Hipp
bfeba3cee6 Update readline.py 2016-06-22 17:15:03 +02:00
Edgar Hipp
9e1c7e0117 Update readline.py 2016-06-22 16:30:38 +02:00
Florian Bruhin
4fccc89d7d Split browser into browser/browser.webkit 2016-06-13 11:18:21 +02:00
Florian Bruhin
f70a75978b Move browser.network.pastebin to misc 2016-06-13 09:48:53 +02:00
Florian Bruhin
01a622bf02 history tests: Sync with :save better 2016-06-08 22:32:39 +02:00
Florian Bruhin
c686008325 LineParser: Don't write anything without data 2016-06-08 10:36:30 +02:00
Florian Bruhin
cca26f0f13 Fix lint 2016-06-08 09:45:05 +02:00
Florian Bruhin
4b78b22b9a Remove unnecessary method
This is already inherited from LineParser
2016-06-08 09:30:18 +02:00
Florian Bruhin
21d53b0265 Merge branch 'history-clear' of https://github.com/EliteTK/qutebrowser into EliteTK-history-clear 2016-06-08 09:28:36 +02:00
Florian Bruhin
9880f5bd5f Handle FileNotFoundError in ipc.listen
Fixes #1530
2016-06-07 16:48:43 +02:00
Florian Bruhin
1d87eee4d7 Fix starting when sys.stderr is None 2016-05-27 14:48:46 +02:00
Florian Bruhin
29aedef420 Fix :debug-console with PyQt 5.6 2016-05-27 00:18:23 +02:00
Florian Bruhin
c96722f169 Merge branch 'better_keyhints' of https://github.com/rcorre/qutebrowser into rcorre-better_keyhints 2016-05-25 22:04:51 +02:00
Ryan Roden-Corrent
f58e2d91dc Add a keyhint blacklist.
Replace the setting ui.show-keyhints with ui.keyhint-blacklist, which
is a list of globs for keychains that shouldn't be hinted. This allows
users to prevent showing keyhints for keychains they already know.

keyhint-blacklist='*' is equivalent to show-keyhints=False.

Resolves #1515.
2016-05-24 20:46:39 -04:00
Florian Bruhin
c6cb8e5099 Remove unneeded "# pragma: no branch" comments
Those are not needed anymore with coverage 4.1.
2016-05-24 15:40:50 +02:00
Florian Bruhin
11363b9533 Fix some invalid "# pragma: no cover" comments
We accidentally used "# pragma: no coverage" instead.
2016-05-24 15:40:18 +02:00
Ryan Roden-Corrent
b1aaf0f10f Only show keyhints after a short delay.
If a user knows the keychain and can type it quickly, we shouldn't
annoy them with a popup. Only show the keyhint if the user doesn't
complete their keychain in 500ms.

The isVisible() check in the tests is somewhat invalid now because it
is never immediately visible and I don't want to add a delay to unit
tests. I added a check that text() is not set for one test that was
only checking isVisible().

Addresses part of #1515.
2016-05-23 21:21:03 -04:00
Ryan Roden-Corrent
b1440a1804 Implement utils.is_special_key.
The check `key.startswith('<') and key.endswith('>') is repeated many
times in code to check for a special key. Replace all these with a call
to the same function.
2016-05-19 20:48:48 -04:00
Ryan Roden-Corrent
5992b81850 Don't show keyhint if there are no hints.
Currently, the keyhint window is shown even if the keystring matches no
possible bindings. This causes an empty keyhint window to hang around
after entering hinting mode.

Instead, the window is now hidden if no bindings match the current
keystring.

Resolves #1507.
2016-05-19 07:02:23 -04:00
Florian Bruhin
5b65ec17fd Set Qt.RichText textFormat for KeyHintView 2016-05-18 07:35:56 +02:00
Florian Bruhin
d0af80fbd5 Merge branch 'keystring' of https://github.com/rcorre/qutebrowser into rcorre-keystring 2016-05-18 07:33:17 +02:00
Florian Bruhin
a0d0b6464f Use typing.py-like annotations for command args
This means:

- An annotation like (int, str) is now typing.Union[int, str].
- utils.typing got expanded so it acts like the real typing.py, with
  issubclass() working properly with typing.Union and __union_params__
  being set.
- A literal string doesn't exist anymore as annotation, instead
  @cmdutils.argument now has a 'choices' argument which can be used like
  @cmdutils.argument('arg', choices=['val1', 'val2']).
- Argument validating/converting is now entirely handled by
  argparser.type_conv instead of relying on python's argparse, i.e.
  type/choices is now not passed to argparse anymore.
2016-05-18 06:55:17 +02:00
Florian Bruhin
c33f0c3512 Use @cmdutils.argument for completions 2016-05-18 06:55:17 +02:00
Florian Bruhin
1611562271 Get rid of dict annotations 2016-05-18 06:55:17 +02:00
Florian Bruhin
35135c4b0d Use @cmdutils.argument for win_id/count 2016-05-18 06:55:17 +02:00
Ryan Roden-Corrent
e810317057 Restore bottom padding of keyhint widget.
Previously, negative bottom padding was used (probably to compensate
for a trailing <br>). With the table format, this is no longer
necessary and causes the last line to be drawn too low.
2016-05-17 20:10:52 -04:00
Felix Van der Jeugt
acb60a1bf4 align using a table 2016-05-16 07:14:34 -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
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
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
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
Florian Bruhin
73fbfb9731 Replace 'nargs' annotation by star_args_optional
Before we used a {'nargs': '*'} annotation for the respective argument
to tell qutebrowser it's optional for the commandline. Now we instead
use a star_args_optional argument for @cmdutils.register as a first step
towards freeing up argument annotations for PEP 484.

See #637.
2016-05-09 22:49:24 +02:00
Florian Bruhin
d2be8a28ca Also ignore segfaults in paintEvent 2016-05-04 23:06:26 +02:00
Florian Bruhin
2d0604ec08 Remove unused imports 2016-05-04 22:15:47 +02:00
Florian Bruhin
034f8585a6 Disable segfault reports for Qt mainloop crashes 2016-05-04 21:50:44 +02:00
Florian Bruhin
2a343cb3a1 Various code style improvements 2016-04-27 20:25:27 +02:00
Florian Bruhin
fd20b46b33 Split IPCServer.on_ready_read into two methods 2016-04-26 23:14:03 +02:00
Florian Bruhin
3c8598f691 Work around PyQt 5.6 segfault when using IPC
PyQt 5.6 seems to segfault when emitting None with a signal which is
declared as emitting a string:

https://www.riverbankcomputing.com/pipermail/pyqt/2016-April/037375.html

We now avoid this by using an empty string explicitly instead of None.
2016-04-26 22:30:27 +02:00
Florian Bruhin
59c4cdd1c2 Revert "Break up circular import on Python 3.4"
This reverts commit e5be48fcc0.
There are other circular imports as well.
2016-04-26 22:14:59 +02:00
Florian Bruhin
e5be48fcc0 Break up circular import on Python 3.4 2016-04-26 21:44:30 +02:00
Florian Bruhin
37b5f49c85 Fix types in @pyqtSlot decorations
PyQt 5.5 enforces correct type signatures, and there were a lot of
places where we were simply wrong, causing qutebrowser to not start at
all...
2016-04-26 20:34:38 +02:00
Florian Bruhin
da24e43fa5 Remove crowdfunding notes 2016-04-25 22:32:29 +02:00
Florian Bruhin
a33aa524de Don't crash if data is None while saving session
Under some circumstances I can't reproduce (switching/turning off
monitors?) it seems it's possible that SessionManager.save gets called
with last_window=True, without on_last_window_closed being called.

This might be to one of the Qt screen management bugs fixed in Qt 5.6,
which would explain why I can't reproduce it.

Instead of crashing, let's log the error and not save the session.
2016-04-10 17:47:14 +02:00
Florian Bruhin
642dc46ba9 flake8: Add hacking 2016-04-08 07:35:53 +02:00
Florian Bruhin
272eb28d7b Fix saving of history titles
This is a regression introduced in d83d2e4.
2016-04-01 07:53:44 +02:00
Florian Bruhin
d83d2e442e Work around getting an empty session title.
Fixes #879.
Supersedes #880.
2016-03-31 06:38:09 +02:00
Florian Bruhin
86ab33c558 Pass HTTPClient to PastebinClient as argument 2016-03-29 19:21:15 +02:00
Florian Bruhin
bec8bd0285 Mention QtWebEngine in segfault report dialog 2016-03-27 23:11:45 +02:00
Florian Bruhin
952daf0479 Well, this is embarassing. Fix segfault reports. 2016-03-27 22:53:05 +02:00
Florian Bruhin
0830b400fe Merge branch 'editor_crash_behaviour' of https://github.com/EliteTK/qutebrowser into EliteTK-editor_crash_behaviour 2016-03-17 21:40:17 +01:00
Florian Bruhin
0df4da5b91 Also display XDG_* in crash reports 2016-02-23 08:47:53 +01:00
Florian Bruhin
2b2331754d Combine launch/crash time into one section. 2016-02-17 07:10:01 +01:00
Florian Bruhin
36019c0cab Split long lines. 2016-02-17 07:04:25 +01:00
avk
d551591b42 Added crash time to crash report 2016-02-12 11:59:45 +01:00
Florian Bruhin
b6f1dd963d Handle Shift-Insert correctly in prompt mode.
Fixes #1299.
2016-02-10 06:40:54 +01:00
Florian Bruhin
79f83a033d Add a fake clipboard for tests
There are a lot of problems and flakiness with using a real clipboard.

Instead we now have a :debug-set-fake-clipboard command to set a text, and use
logging when getting the contents.

Fixes #1285.
2016-02-03 20:27:11 +01:00
Oliver Caldwell
4cd7d193f1 Simplify arg placeholder replacement 2016-01-31 22:56:11 +00:00
Oliver Caldwell
e9128ebb2a Relax editor templating
I tried to set my editor to `termite -e "vim -f {}"`, termite being a
pretty cool and light terminal I use within my i3wm Arch linux box.

So when I open my editor I want it to launch a terminal with Vim inside
instead of GVim for various reasons.

The validation rejected this at first because it was looking for '{}'
inside ['foo', 'bar', 'baz {}'], essentially. So I need it to look
inside the sub-strings, not just the list.

Then after validation I need to perform the '{}' replacement inside the
sub-string too, not just replacing the whole string.
2016-01-26 09:18:43 +00:00
Tomasz Kramkowski
6894033f8d lineparser: Add clear() method.
The lineparser clear method, implemented for all lineparser subclasses,
clears the underlying file and also empties any lineparser data
structures.
2016-01-23 22:35:19 +00:00
Florian Bruhin
7fa0dc68bf flake8: Add flake8-pep3101 plugin.
Checks for old string formatting.
https://pypi.python.org/pypi/flake8-pep3101/
2016-01-22 19:40:10 +01:00
Florian Bruhin
f74d1f26c7 flake8: Add flake8-string-format plugin.
string format checker, plugin for flake8
https://pypi.python.org/pypi/flake8-string-format/
2016-01-22 19:00:29 +01:00
Florian Bruhin
8bdb1b6b14 flake8: Add flake8-copyright plugin.
Adds copyright checks to flake8
https://pypi.python.org/pypi/flake8-copyright/
2016-01-22 17:46:33 +01:00
Florian Bruhin
58fb2826ee flake8: Add flake8-putty plugin.
Apply a bit of putty to flake8.
https://pypi.python.org/pypi/flake8-putty/
2016-01-22 17:33:58 +01:00
Florian Bruhin
7e3507aba1 flake8: Add flake8-debugger plugin.
flake8 debug statement checker
https://github.com/JBKahn/flake8-debugger
2016-01-22 17:33:58 +01:00
Florian Bruhin
526441bcae Fix new flake8 lint.
For some reason these issues weren't shown with pytest-pep8/flakes.
2016-01-22 17:33:58 +01:00
Florian Bruhin
364d069e74 Stop IPC timeout timer while executing command.
This hopefully helps with #1183.
2016-01-08 13:48:19 +01:00
Florian Bruhin
d84b15d35c ipc: Add missing 0x prefix for logged socket IDs. 2016-01-08 13:09:49 +01:00
Florian Bruhin
ff2024a565 Add socket IDs to ipc debug messages. 2016-01-08 12:02:36 +01:00
Florian Bruhin
c7edb8e1f2 Make QApplication available to :debug-pyeval. 2016-01-06 07:14:49 +01:00
Florian Bruhin
05281a7d1f Add a --quiet argument to :debug-pyeval.
Closes #1156.
2016-01-06 06:19:37 +01:00
Florian Bruhin
129990857a Point out crash reports are currently public.
See #481.
2016-01-05 07:07:45 +01:00
Florian Bruhin
7001f068b3 Restart correctly after reporting crash.
Fixes #1128.
2016-01-05 07:02:20 +01:00
Florian Bruhin
a5f2ac5f03 Adjust copyright years. 2016-01-04 07:12:39 +01:00
Florian Bruhin
5c769d8000 Report stdout/stderr of failed subprocesses. 2015-12-18 21:23:33 +01:00
Florian Bruhin
eff0e4c7cc pylint: Enable useless-suppression globally.
We deactivate it locally where needed, i.e. where we are sure it's some
platform-specific thing.
2015-12-01 23:01:09 +01:00
Florian Bruhin
150a83d8f4 pylint: Remove unneeded supressions. 2015-12-01 22:03:58 +01:00
Tomasz Kramkowski
c575435782 misc/editor: Fix tempfile deleted on error / editor crash
This patch attempts to fix an issue where an error occuring in
misc/guiprocess or the editor process crashing would delete the
temporary file thus making it impossible to recover changes not commited
to the form field from the editor.
2015-12-01 20:22:05 +00:00
Florian Bruhin
6f9b02741a Switch from map() to list comprehensions. 2015-12-01 07:16:32 +01:00
Florian Bruhin
e26c499bd6 lineparser: Log after saving is done.
This will make end to end tests easier as we can easily wait until saving is
done.
2015-11-28 23:35:04 +01:00
Florian Bruhin
8cf6ace0e7 Ignore deleted windows when saving session.
This hopefully helps with a crash on Windows which happens from time to time
during some multi-window tabs.feature tests:

Traceback (most recent call last):
  File "...\mainwindow\mainwindow.py", line 446, in closeEvent
    self._do_close()
  File "...\mainwindow\mainwindow.py", line 405, in _do_close
    objreg.get('session-manager').save_last_window_session()
  File "...\misc\sessions.py", line 247, in save_last_window_session
    self._last_window_session = self._save_all()
  File "...\misc\sessions.py", line 183, in _save_all
    win_data['geometry'] = bytes(main_window.saveGeometry())
RuntimeError: wrapped C/C++ object of type MainWindow has been deleted
2015-11-28 20:30:41 +01:00
Florian Bruhin
8faf4717e5 Make :debug-console toggle the console. 2015-11-24 18:32:18 +01:00
Florian Bruhin
c7f386cec0 Avoid logging in signal handlers.
If we don't do that, we can get this:

--- Logging error ---
Traceback (most recent call last):
  File ".../python3.5/logging/__init__.py", line 984, in emit
    self.flush()
  File ".../python3.5/logging/__init__.py", line 964, in flush
    self.stream.flush()
RuntimeError: reentrant call inside <_io.BufferedWriter name='<stderr>'>
Call stack:
  [...]
  File ".../qutebrowser/app.py", line 122, in qt_mainloop
    return qApp.exec_()
  File ".../qutebrowser/utils/objreg.py", line 118, in on_destroyed
    log.destroy.debug("schedule removal: {}".format(name))
  File ".../python3.5/logging/__init__.py", line 1267, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File ".../python3.5/logging/__init__.py", line 1415, in _log
    self.handle(record)
  File ".../python3.5/logging/__init__.py", line 1425, in handle
    self.callHandlers(record)
  File ".../python3.5/logging/__init__.py", line 1487, in callHandlers
    hdlr.handle(record)
  File ".../python3.5/logging/__init__.py", line 855, in handle
    self.emit(record)
  File ".../python3.5/logging/__init__.py", line 984, in emit
    self.flush()
  File ".../python3.5/logging/__init__.py", line 964, in flush
    self.stream.flush()
  File ".../qutebrowser/misc/crashsignal.py", line 365, in interrupt
    log.destroy.info("Do the same again to forcefully quit.")
Message: 'Do the same again to forcefully quit.'
Arguments: ()
2015-11-18 20:21:23 +01:00
Florian Bruhin
374b448e51 Get rid of unnecessary file.readline() calls. 2015-11-10 18:44:42 +01:00
Florian Bruhin
4451165a27 Change IPC warnings to debug.
This seems to show up on Ubuntu Trusty (with older Qt) as well...
2015-11-01 23:11:42 +01:00
Florian Bruhin
c2ea2aa6d7 Remove unused import. 2015-10-07 22:05:22 +02:00
Florian Bruhin
7db1f65425 ipc: Avoid using QLocalServer.setSocketOptions.
This causes problems with AddressInUseError being swallowed.

Fixes #997.
2015-10-07 21:52:09 +02:00
Jonas Schürmann
afc166a13e Coding style fixes #1002 2015-10-06 22:59:49 +02:00
Jonas Schürmann
45c9768c16 Added --target command line argument #922
This argument is used to override the new-instance-open-target config
option.
2015-10-05 21:15:52 +02:00
Florian Bruhin
d229e90724 Fix some splelling mistakes. 2015-10-04 15:41:42 +02:00
Florian Bruhin
b42b12b7a5 Fix ipc.py coverage. 2015-10-02 08:17:50 +02:00
Florian Bruhin
454b2348a8 ipc: Actually use CONNECT_TIMEOUT. 2015-10-02 08:11:37 +02:00
Florian Bruhin
ea663f9975 IPC: Handle socket timeout correctly.
Hopefully fixes #975.
2015-10-02 08:11:26 +02:00
Florian Bruhin
8e52e5f2fc Don't use deprecated logging calls. 2015-10-01 21:39:42 +02:00
Alexey Nabrodov
54d4f4f48b refactor and test 2015-10-01 15:57:11 +03:00
Alexey Nabrodov
be332fe723 init env vars in crash report 2015-10-01 14:11:35 +03:00
Florian Bruhin
9ab14c0384 Fix IPC coverage. 2015-09-16 07:16:07 +02:00
Florian Bruhin
73cb981ebb Add some more IPC logging. 2015-09-15 23:05:50 +02:00
Florian Bruhin
ff24ba5437 ipc: Fix atime timer interval. 2015-09-15 22:59:53 +02:00
Florian Bruhin
3bdfa3001c ipc: Always use standarddir.runtime(). 2015-09-15 22:31:37 +02:00
Florian Bruhin
c4c06467da Add missing pyqtSlot decorator. 2015-09-11 08:32:37 +02:00
Florian Bruhin
d15cc07ed3 Log executed command for GUIProcess.
See #797.
2015-09-11 06:24:05 +02:00
Florian Bruhin
087e9a4266 Fix ipc on Windows, take 2. 2015-09-10 08:04:02 +02:00
Florian Bruhin
87ccc31cce ipc: Add some more tests for _atime_timer. 2015-09-10 08:02:19 +02:00
Florian Bruhin
1dba5b0bbd ipc: Fix _atime_timer shutdown on Windows. 2015-09-10 07:52:26 +02:00
Florian Bruhin
d2bce5dca9 ipc tests: Try to disconnect _atime_timer.
For some reason this fails during teardown on OS X!?

    File "/Users/buildbot/buildbot/slave/osx/build/qutebrowser/misc/ipc.py", line 357, in update_atime
      path = self._server.fullServerName()
    File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/mock.py", line 895, in __call__
      _mock_self._mock_check_sig(*args, **kwargs)
    File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/unittest/mock.py", line 107, in checksig
      sig.bind(*args, **kwargs)
    File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 2652, in bind
      return args[0]._bind(args[1:], kwargs)
    File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py", line 2537, in _bind
      param = next(parameters)
    File "/Users/buildbot/buildbot/slave/osx/build/.tox/py34/bin/../lib/python3.4/_collections_abc.py", line 512, in __iter__
      for key in self._mapping:
    File "/Users/buildbot/buildbot/slave/osx/build/.tox/py34/lib/python3.4/collections/__init__.py", line 91, in __iter__
      curr = root.next
2015-09-10 07:49:45 +02:00
Florian Bruhin
e6cf76e40c Fix coverage and lint. 2015-09-10 07:44:45 +02:00
Florian Bruhin
58073fd768 ipc: Update the atime of the socket all 6h.
See #888.
2015-09-10 07:38:11 +02:00
Florian Bruhin
2ca8070e7a Add workaround for OS X issue. 2015-09-09 20:48:23 +02:00
Florian Bruhin
f7d3070c34 ipc: Fix start when a stale legacy server exists. 2015-09-09 19:39:01 +02:00
Florian Bruhin
b135569d5c ipc: Add workaround for NameError w/ SocketOptions. 2015-09-09 19:31:52 +02:00
Florian Bruhin
69e735c42e ipc: Add username to hash instead. 2015-09-09 19:31:52 +02:00
Florian Bruhin
4daa7e6979 Don't add username to FIFO name on Linux.
The runtime directory already has a qutebrowser subdir.
2015-09-09 19:31:52 +02:00
Florian Bruhin
3573b57130 Set socket permissions correctly. 2015-09-09 19:31:52 +02:00
Florian Bruhin
78cb0eaf85 More work on #888 (new IPC path).
First trying the legacy path and then using the new one works fine now, but the
permissions are still wrong.
2015-09-09 19:31:52 +02:00
Florian Bruhin
44b1ca5c2f Fix comment. 2015-09-09 19:31:52 +02:00
Florian Bruhin
d18c33987d Quick pep8 fix.
This is already fixed in the new-ipc-path branch, but let's at least get this
straight in master.
2015-09-09 08:06:56 +02:00
Florian Bruhin
6a0994038e Start working on #888 (new IPC path). 2015-09-06 19:50:22 +02:00
Florian Bruhin
bfd8faafef Add a protocol version to IPC.
Fixes #909.
2015-09-06 18:43:24 +02:00
Florian Bruhin
b95fd2c814 Test raw json data for IPC. 2015-09-06 18:06:23 +02:00
Florian Bruhin
e9608a6aea Add qutebrowser version to IPC data.
See #909.
2015-09-06 18:06:03 +02:00
Florian Bruhin
9b1d0af20d ipc: Simplify exception handling. 2015-09-04 07:16:16 +02:00
Florian Bruhin
ea0cbea1dd ipc: Use a custom class for exceptions. 2015-09-04 07:12:23 +02:00
Florian Bruhin
2a4cd02704 100% coverage for misc.ipc. 2015-09-04 06:58:46 +02:00
Florian Bruhin
0d0e704b6b ipc: Reduce logging on Windows.
Otherwise the tests fail there...
2015-09-03 23:33:41 +02:00
Florian Bruhin
fab6e2eafc ipc: Fix exception handling on AddressError. 2015-09-03 23:13:55 +02:00
Florian Bruhin
a6b9d28b96 ipc: Fix sleep time on AddressError. 2015-09-03 23:13:29 +02:00
Florian Bruhin
b40fb4dd43 ipc: Handle None-socket in slots correctly. 2015-09-03 20:48:51 +02:00
Florian Bruhin
3a5cd8f3ff Revert "Remove test_ipc workaround again."
This reverts commit f4d2e0746e.
2015-09-03 06:51:15 +02:00
Florian Bruhin
f4d2e0746e Remove test_ipc workaround again. 2015-09-03 06:36:33 +02:00
Florian Bruhin
efe40fa7e0 Try different workaround for test_ipc issues. 2015-09-03 06:12:36 +02:00
Florian Bruhin
e0c6a322c6 ipc: Pass socket to send_to_running_instance. 2015-09-02 23:32:06 +02:00
Florian Bruhin
82c647a87d ipc: Mark on_ready_read cornercase as no-cover. 2015-09-02 23:32:06 +02:00
Florian Bruhin
1953bb8458 ipc: Disconnect on invalid data. 2015-09-02 23:32:06 +02:00
Florian Bruhin
6b4b65e585 ipc: Clarify comment. 2015-09-02 23:32:06 +02:00
Florian Bruhin
cbcd6261b1 ipc: Add got_invalid_data signal. 2015-09-02 23:32:06 +02:00
Florian Bruhin
0c3ee46fe0 Merge branch 'autoupdate_tests' of https://github.com/acogneau/qutebrowser into acogneau-autoupdate_tests 2015-09-01 08:48:52 +02:00
Alexander Cogneau
e499d8932f 100% misc.autoupdate coverage 2015-08-31 01:10:04 +02:00
Florian Bruhin
8913c1883e ipc: Fix missing import. 2015-08-30 22:57:45 +02:00
Florian Bruhin
6dbd669efe ipc: Disconnect properly from server. 2015-08-30 20:35:50 +02:00
Florian Bruhin
a1cb47936a IPC: Fix shutdown when self._socket is None. 2015-08-30 20:35:34 +02:00
Florian Bruhin
39e40a7887 ipc: Pass args to send_to_running_instance. 2015-08-29 23:09:44 +02:00
Florian Bruhin
fe493f8565 ipc: Pass socket name to IPCServer. 2015-08-29 21:26:22 +02:00
Florian Bruhin
d5668dd687 ipc: Don't listen in IPCServer.__init__ already. 2015-08-27 23:09:25 +02:00
Florian Bruhin
a7bf0744e0 Move some IPC code from app.py to ipc.py. 2015-08-27 23:04:27 +02:00
Florian Bruhin
ff6e96347b ipc: Refactor _get_socketname to take better args. 2015-08-27 22:32:29 +02:00
Florian Bruhin
1a062035eb Log IPC server name to debug log. 2015-08-24 19:28:09 +02:00
Florian Bruhin
201f2f67d3 sessions: Logging/error message improvements. 2015-08-24 17:12:20 +02:00
Florian Bruhin
b783069f48 SessionManager: Factor out name handling in save. 2015-08-23 21:54:55 +02:00
Florian Bruhin
2556e2e27b Remove unused import. 2015-08-23 18:29:02 +02:00
Florian Bruhin
17215822bc sessions: Use try/except to create base-path. 2015-08-23 18:17:10 +02:00
Florian Bruhin
3d5599facb Move session dir handling out of SessionManager. 2015-08-22 22:53:03 +02:00
Florian Bruhin
685bbaae6d 100% test coverage for misc.editor. 2015-08-19 09:34:44 +02:00
Florian Bruhin
07c6c40548 Set messagebox = None without Tk in checkpyver. 2015-08-19 06:39:22 +02:00
Florian Bruhin
1a61e53daa 100% test coverage for misc.checkpyver. 2015-08-19 05:58:52 +02:00
Florian Bruhin
e4a0f1972f tests: Improve MessageMock and use it. 2015-08-18 21:38:18 +02:00
Florian Bruhin
3a85afe1f4 Use datetime.ctime(). 2015-08-07 22:32:02 +02:00
Alexander Cogneau
43e0ac1844 Fix PEP8: line too long warning 2015-08-07 21:15:40 +02:00
Alexander Cogneau
73c28c12f3 Show launch time in crash logs. 2015-08-07 20:36:38 +02:00
Florian Bruhin
61df5fcd7a Skip confirm-quit checks when crashing.
Fixes #853.
2015-08-06 21:08:20 +02:00
Florian Bruhin
c13f7e5f78 Remove dead ShellLexer code. 2015-08-02 13:05:19 +02:00
Florian Bruhin
dc4d4e70e4 Make sure state is valid in ShellLexer. 2015-08-02 12:44:54 +02:00
Florian Bruhin
b3869fe42b sessions: Store zoom/scroll-pos per history entry.
Also fixes #728.
2015-06-27 18:06:18 +02:00
Florian Bruhin
9ca06ecfa2 Use pkg_resources instead of distutils for version
Fixes #767. See #770.
2015-06-18 20:54:05 +02:00
Florian Bruhin
f17131f6c2 Change Qt links to point to qt.io. 2015-06-12 16:59:33 +02:00
Florian Bruhin
33ad0ab1fc Fix startDetached return value for GUIProcess. 2015-06-11 23:02:47 +02:00
Florian Bruhin
8a87b5d357 Rename GUIProcess.started to _started.
It's unneeded for this to be public, and it conflicts with the pyqtSignal.
2015-06-11 20:30:37 +02:00
Florian Bruhin
ad401e035f Proxy QProcess signals. 2015-06-11 20:30:37 +02:00
Florian Bruhin
62d2018695 Add cmd/args/started to GUIProcess. 2015-06-11 20:30:28 +02:00
Florian Bruhin
163bc2e12e Add GUIProcess.
This aims to unify the code which spawns a process and then shows statusbar
notifications when it exited, etc.
2015-06-11 20:30:03 +02:00
Florian Bruhin
17bb9fc21c Use QProcess instead of subprocess.
Closes #646.
Fixes #688.
2015-06-11 20:28:04 +02:00
Florian Bruhin
b57027f800 Fix pylint warnings on Windows. 2015-06-10 18:35:33 +02:00
Florian Bruhin
a82b0d007d Enforce a Qt with SSL support. 2015-06-07 10:47:28 +02:00
Florian Bruhin
36803cba06 Switch from flake8 to pytest-{mccabe,flakes,pep8}. 2015-06-02 20:51:06 +02:00
Florian Bruhin
d8e58b5886 Fix some typos. 2015-06-01 22:45:40 +02:00
Martin Tournoij
d20872d576 Fix feedback from #690 2015-05-29 14:50:15 +02:00
Martin Tournoij
c76221c14e Use a specific 'qutebrowser_editor_' prefix for <C-e> instead of 'tmp'.
Why does this matter? In my vimrc I have this:

	" When using dwb <C-e>; assume markdown, and don't store in viminfo since these are
	" temporary files
	autocmd BufRead,BufNewFile /home/martin/.cache/dwb/edit* setlocal ft=markdown viminfo=

I would like to do the same with qutebrowser, but this is not possible with a
file name like '/tmp/tmpSJsgSG4'
2015-05-29 02:07:20 +02:00
Florian Bruhin
f6ad556f34 Get rid of --no-crash-dialog. 2015-05-17 01:03:34 +02:00
Florian Bruhin
315725a3ac Print info with --no-err-windows on earlyinit errs. 2015-05-17 00:48:15 +02:00
Florian Bruhin
002346a125 Clean up exception_hook. 2015-05-17 00:44:04 +02:00
Florian Bruhin
3f98bf372e Merge branch 'smoke'
Conflicts:
      doc/qutebrowser.1.asciidoc
      qutebrowser/app.py
      qutebrowser/config/config.py
      qutebrowser/qutebrowser.py
      tox.ini
2015-05-17 00:28:56 +02:00
Florian Bruhin
9be5992a9a Smoke test WIP 2015-05-16 23:43:34 +02:00
Florian Bruhin
d7999577dd Fix shutdown from pdb. 2015-05-16 23:13:36 +02:00
Florian Bruhin
54131e9d3e Add --basedir arg with multiple instance support.
Closes #510.
2015-05-16 23:10:20 +02:00
Florian Bruhin
183049ef2e Make sure self._opened is reset on exceptions. 2015-05-16 22:48:13 +02:00
Florian Bruhin
c762340a0c Add --datadir/--cachedir arguments. Closes #136. 2015-05-16 22:12:27 +02:00
Florian Bruhin
c236046a73 Avoid double-opening LineParser.
Hopefully helps with diagnosing #670.
2015-05-14 15:11:16 +02:00
Florian Bruhin
3b5b49daac Move quitter/signal/crash_handler out of qApp. 2015-05-07 09:23:34 +02:00
Florian Bruhin
8aec5244de Fix crash restart. 2015-05-06 07:11:14 +02:00
Florian Bruhin
f499fd85d0 Fix IPC. 2015-05-01 14:46:17 +02:00
Florian Bruhin
d3a7b2e4ca Big refactoring of app.py. 2015-04-30 07:37:25 +02:00
Florian Bruhin
4925091ede Merge branch 'master' of github.com:The-Compiler/qutebrowser 2015-04-22 07:43:01 +02:00
Florian Bruhin
7439586334 Move special params to cmdutils.register decorator
See #637.
2015-04-20 19:33:05 +02:00
Florian Bruhin
0195cb31bb Don't set scope in cmdutils.register w/o instance. 2015-04-20 18:55:22 +02:00
Florian Bruhin
94d49b4801 Add :message-{info,error,warning} commands. 2015-04-20 18:32:15 +02:00
Florian Bruhin
43df32949d Refactor IPC exceptions handling.
Also fixes an IPC error when qutebrowser was started twice without delay
between the invocations.
2015-04-17 19:24:27 +02:00
Florian Bruhin
987bab9960 Merge pull request #19 from hackebrot/parametrize-sub-tests
Parametrize sub tests
2015-04-14 07:01:53 +02:00
Florian Bruhin
b609f993c3 Add a timeout to HTTPClient.
Fixes #629.
2015-04-13 20:59:05 +02:00
Florian Bruhin
9381aac501 Merge {Pastebin,PyPIVersion}Client into HTTPClient. 2015-04-13 20:42:28 +02:00
Florian Bruhin
c071bcbec8 Clean up loggers. 2015-04-13 08:49:04 +02:00
Florian Bruhin
f85ba8645f Handle a missing session folder at some places. 2015-04-13 08:38:12 +02:00
Florian Bruhin
f865b87a74 Show a message and update notifier on reports.
Fixes #340.
Fixes #447.
See #429.
2015-04-10 08:09:18 +02:00
Bruno Oliveira
29c51c288b Fix small typo in docstring 2015-04-09 18:47:25 -03:00
Florian Bruhin
20f0ef7ccc Ignore ;; for splitting with some commands.
Fixes #405.
2015-04-06 17:00:52 +02:00
Florian Bruhin
d83da987ae Move SessionManager init to sessions.py. 2015-04-05 23:44:25 +02:00
Florian Bruhin
9b8f5e3ff0 Make the default session name configurable.
See #523.
2015-04-05 23:30:43 +02:00
Florian Bruhin
8bbff689b4 Add a -t/--temp flag to :session-load.
See #523.
2015-04-05 16:06:41 +02:00
Florian Bruhin
17ebbc37c5 Add a -c/--current parameter to :session-save.
See #523.
2015-04-05 16:04:03 +02:00
Florian Bruhin
ac63fc073f save: Add possibility to mark things dirty on add.
KeyConfig needs this feature, because it can fix some deprecated commands
during __init__ and emit its dirty-signal, but that happens before the saveable
is added.
2015-04-03 19:07:29 +02:00
Florian Bruhin
953119ef75 Revert "Minor QWebSettings fix."
Happy April's fools!

This reverts commit a98060e020.

Conflicts:
	qutebrowser/app.py
	qutebrowser/misc/utilcmds.py
2015-04-02 14:56:42 +02:00
Florian Bruhin
1fb848249e Handle sessions starting with _ as internal.
:session-{load,save,delete} now refuses to handle sessions starting with _,
unless a new -f/--force parameter is given.
2015-04-01 22:31:19 +02:00
Florian Bruhin
6e435ad215 Add state config sections when initializing. 2015-04-01 18:26:45 +02:00
Florian Bruhin
8ebac8d38c Various spelling fixes. 2015-03-31 21:11:47 +02:00
Florian Bruhin
eb3b0b960f Use hunter for line tracing. 2015-03-31 20:38:46 +02:00
Florian Bruhin
a98060e020 Minor QWebSettings fix.
If you're reading the diff, congrats. Please be quiet and don't spoil the fun
for others though! :)
2015-04-01 00:06:34 +02:00
Florian Bruhin
33dff70357 :session-load: Add a -c/--clear argument.
See #523.
2015-03-30 07:13:13 +02:00
Florian Bruhin
dff8f73a11 :session-save: Show which session was saved.
This also adds a -q/--quiet argument to not print this.

See #523.
2015-03-30 07:13:13 +02:00
Florian Bruhin
1d1ac1ef6f Save session to load in state file.
Before, we always loaded the default session (if it existed) and then deleted
it. This was surprising as the default session was deleted even when another
session was loaded.

Now we don't delete it at all, and save the session to load in the state file.

See #523.
2015-03-24 07:12:35 +01:00
Florian Bruhin
f77c0f9afa Simplify package output in earlyinit.py.
It doesn't really help much to have package names for distributions in there,
and it's way too much effort. Closes #475.
2015-03-20 07:16:47 +01:00
Florian Bruhin
e8e6d8409b Adjust pylint exceptions. 2015-03-11 20:14:39 +01:00
Florian Bruhin
aca44da26e Force saving with :save even w/o auto-save-config. 2015-03-10 22:24:34 +01:00
Florian Bruhin
60b6519b04 lineparser: Call _prepare_save() properly. 2015-03-08 21:53:42 +01:00
Florian Bruhin
181426b50a AppendLineParser: Strip newlines in __iter__. 2015-03-08 21:53:42 +01:00
Florian Bruhin
2010e8115b lineparser: Rename _open_for_reading to _open. 2015-03-08 21:53:42 +01:00
Florian Bruhin
27f4ada799 Add AppendLineParser and use it in WebHistory.
The former approach (always reading the whole history from disk) was rather
inefficient, and we had performance problems e.g. when marking text in Qt
documentation.
2015-03-08 21:53:42 +01:00
Florian Bruhin
5b4b793538 Split LineParser into multiple classes.
There is now:
    - BaseLineParser
    - LineParser
    - LimitLineParser
2015-03-08 21:53:42 +01:00
Florian Bruhin
99de995813 Rename/move config.parsers.line.LineConfigParser.
It's now misc.lineparser.LineParser since it handles other stuff than just
config.
2015-03-08 21:53:42 +01:00
Florian Bruhin
0ebef4069e Remove debug console completing completely.
Turns out pylint doesn't like it if stuff is unused because we commented code
out ;)
2015-02-26 17:56:45 +01:00
Florian Bruhin
813ce9a513 Disable completion for debug console.
As long as it's broken it's more annoying rather than useful.
See #117.
2015-02-26 17:48:47 +01:00
Florian Bruhin
fcbd69e209 Clean up standarddir handling #2.
We already attempted this in c5a2039da4, but
having the directories as module attributes means they'll be created on start
(rather than when they're actually used), and it'd also be impossible to change
them after init for some reason in the future.

To still have a nice short API, we simply change the attributes to functions.
2015-02-26 07:01:22 +01:00
Florian Bruhin
0f9a1fe178 Display ImportError messages in earlyinit errors. 2015-02-23 15:16:30 +01:00
Florian Bruhin
c5a2039da4 Refactor QStandardPaths handling. 2015-02-22 19:13:51 +01:00
Florian Bruhin
14f2420500 Fix wrong parsing of faulthandler logs. 2015-02-19 22:45:37 +01:00
Florian Bruhin
2d4b03fbc9 Improve parsing of faulthandler logs. 2015-02-19 21:38:02 +01:00
Florian Bruhin
5b33f6c5fe Re-add save-session setting. 2015-02-17 07:45:06 +01:00
Florian Bruhin
56b0ae2b6e Get rid of mainwindow.MainWindow.spawn. 2015-02-16 22:56:12 +01:00
Florian Bruhin
46ca0e447e Get rid of the save-session setting for now.
With the way quitting is handled currently, it's hard to save the session on
quit as the windows will already be closed.
2015-02-16 21:33:24 +01:00
Florian Bruhin
8f1d81a644 Add session support.
Closes #12.
See #499.
See #11.

This adds PyYAML as a new dependency.

It adds the following new commands:

    :session-delete <name>
    Delete a session.

    :session-load <name>
    Load a session.

    :session-save [<name>]
    Save a session.

    :wq [<name>]
    Save open pages and quit.

And the following new settings:

    general -> save-session:
    Whether to always save the open pages.
2015-02-16 20:26:09 +01:00
Florian Bruhin
1cf34e7984 Force saving the config if new options were added. 2015-02-13 23:53:56 +01:00
Florian Bruhin
c2f9cae770 Don't show line edit text in its repr().
Previously we showed self.text in the __repr__ of MinimalLineEdit. This however
is a bad idea, because it exposes passwords to the debug log when the currently
focused widget is logged.
2015-02-11 23:33:31 +01:00
Florian Bruhin
31e71ed6d9 Fix copyright years.
Files created in 2015 don't need to have 2014 as copyright year.
2015-02-06 00:21:57 +01:00