Commit Graph

577 Commits

Author SHA1 Message Date
Florian Bruhin
a90429fe6e Update needed dependencies
Fixes #2683
2017-06-01 19:30:32 +02:00
Florian Bruhin
a690d242a4 Update webengine dependency message 2017-06-01 14:03:46 +02:00
Florian Bruhin
7186dcb98f Send crash reports to private pastebin
Fixes #481
2017-05-29 09:20:10 +02:00
Florian Bruhin
8bd6974042 Open a window with an empty session
With general -> save-session on and only private windows open, we can easily get
a session file with "windows: []" in it. If we loaded such a file, we got no
windows at all when qutebrowser started.

Fixes #2664
2017-05-28 11:15:51 +02:00
Florian Bruhin
c32c01ffc0 Merge commit '419793c0b9ff4f293babea7623dcaf4787bbaa35' 2017-05-22 07:55:44 +02:00
Jay Kamat
00f001729b
Fix undo with pinned tabs
Add tests for undo with a pinned tab
Add tests for clone with a pinned tab
2017-05-21 21:03:33 -07:00
Jay Kamat
2a961c3951
Clean up pinned status to a centralized location
- Add support for :tab-clone with pinned tabs

Now tabbed_browser.set_tab_pinned can be called independently.
2017-05-21 19:49:10 -07:00
Florian Bruhin
00a7a0cee6 Reorganize pylint config
This removes various stuff we don't need anymoe, and also re-enables and fixes
the import order check.
2017-05-17 20:20:12 +02:00
Florian Bruhin
adb924a758 Use -p for :save-session --with-private 2017-05-16 06:28:21 +02:00
Florian Bruhin
6ee382ef30 Sort windows when saving sessions
This should help with flaky tests when the window order changes
2017-05-15 11:02:29 +02:00
Florian Bruhin
9805b43c85 Handle private browsing in sessions 2017-05-15 11:02:29 +02:00
Florian Bruhin
f907b6b6b0 Have an isolated command history for private windows 2017-05-15 11:02:26 +02:00
Jay Kamat
725bafea54
Merge branch 'master' into jay/pintab 2017-05-10 23:51:33 -07:00
Florian Bruhin
c6e31391de Fix most tests/lint 2017-05-10 09:19:24 +02:00
Florian Bruhin
1c50377c0a Initial work on new private browsing 2017-05-10 07:00:21 +02:00
Florian Bruhin
822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Florian Bruhin
1d0f187fab Adjustments for new pylint version 2017-04-13 18:22:16 +02:00
Fritz Reichwald
3d549bf607 Remove closeWriteChannel from detached start 2017-04-12 07:32:12 +02:00
Fritz Reichwald
bc7f8018c0 Close stdin after starting QProcess Fixes 2491 2017-04-12 06:56:38 +02:00
Jacob Sword
45dff6c0c8 update usage of debug-flag arguments 2017-04-08 16:54:08 -04:00
Florian Bruhin
4ec5700cbf Redirect qute:foo to qute://foo
Before, we just returned the same data for both, but then we'll run into
same-origin restrictions as qute:history and qute:history/data are not the same
host.
2017-04-06 21:18:58 +02:00
Martin Tournoij
e7755f5d9f
Add :debug-log-filter none
This allows us to clear any filters. Useful for users, and needed for
the tests.
2017-04-04 20:51:14 +01:00
Martin Tournoij
200e439a30
Fix crash of :debug-log-filter when --filter wasn't given
There was no `LogFilter`. The fix is to always initialize a
`LogFilter()` with `None`. as the "filter".

Fixes #2303.
2017-04-04 17:45:23 +01:00
Martin Tournoij
79a22f1f47
Allow pressing ^C when there's an unknown setting
All of it is just converting `objreg.get('xxx')` to `objreg.get('xxx',
None)` and adding a `if xxx is not None` check.

Fixes #1170
2017-04-01 21:14:35 +01:00
Florian Bruhin
1eda2b0ea4 Fallback to clipboard when primary selection is unsupported 2017-03-31 13:05:34 +02:00
Florian Bruhin
64feb62fb1 Paste clipboard when using shift-insert in prompts 2017-03-31 13:05:34 +02:00
Florian Bruhin
a55d1b1ee8 Save old socket for IPC
At least on Windows with Qt 5.8, we get readyRead notifications *after*
disconnect...
2017-03-31 13:03:17 +02:00
Ryan Roden-Corrent
a68f997d95 Make keyhint delay configurable.
ui.keyhint-delay controls the time from starting a keychain to showing the
keyhint dialog. Resolves #2462.
2017-03-22 21:50:26 -04:00
thuck
650b1de3b6 Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2017-03-19 14:26:48 +01:00
Florian Bruhin
99c7301fb4 Update IPC atime once all 3h
See #996
2017-03-16 09:24:49 +01:00
Florian Bruhin
8d9030ec47 Use debug log for on_timeout message 2017-03-13 07:01:21 +01:00
Florian Bruhin
eb2888a957 Merge commit 'd3b16bbd075f9e8c8656a402975d776088c2dab8' into pkill-nine/upstream-master-close_messages 2017-03-08 19:19:30 +01:00
Florian Bruhin
4278cd5e3e Remove unused operator imports 2017-03-08 19:10:29 +01:00
pkill9
d3b16bbd07 Add command to clear messages - cleaner 2017-03-08 10:49:15 +00:00
Florian Bruhin
f86f9cd92a Refactor qtutils.version_check API
Fixes #2423
2017-03-08 08:41:18 +01:00
Florian Bruhin
a1c7d179e3 Only call QApplication::sync() with QtWebEngine 2017-03-05 15:16:14 +01:00
Florian Bruhin
5ccafd62d4 Fix initial keyboard focus with QtWebEngine
Fixes #2321.
2017-03-04 18:11:34 +01:00
Florian Bruhin
e81edc8224 ipc: Delay deleting of QLocalSocket on disconnect
Fixes #2396.

See https://bugreports.qt.io/browse/QTBUG-59297 and
https://github.com/qutebrowser/qutebrowser/issues/2321#issuecomment-284024213
2017-03-04 18:11:34 +01:00
Florian Bruhin
1e42fd1319 Fix lint 2017-03-01 11:12:28 +01:00
Florian Bruhin
47a9c8e17c Also check compiled Qt version in version checks 2017-02-28 21:01:47 +01:00
Florian Bruhin
fc2250b3b2 Merge branch 'session-save-only-active-window' of https://github.com/danfis/qutebrowser into danfis-session-save-only-active-window 2017-02-25 17:55:42 +01:00
Florian Bruhin
cd2c547b6b Don't show error if no autosave session exists 2017-02-22 23:17:59 +01:00
Daniel Fiser
6e1ac8be78 Fixed indentation of SessionManager.save() arguments. 2017-02-22 10:37:55 +01:00
Daniel Fiser
bb5825e043 session-save: in case of --only-active-window, the win-id is determined in session_save(). 2017-02-22 10:22:30 +01:00
Daniel Fiser
bb74b2703f session-save: doc generated from docstring. 2017-02-22 09:59:29 +01:00
Florian Bruhin
b69d66e437 Actually check for Qt 5.7.1 2017-02-21 19:28:22 +01:00
Florian Bruhin
71f7b01ea7 Bring back PyQt (but not Qt) 5.7.0 support with QtWebEngine
This was originally removed in a86170f45, however Debian testing (Stretch) comes
with Qt 5.7.1, but PyQt 5.7.
2017-02-21 19:25:18 +01:00
Florian Bruhin
a179d6a738 Improve earlyinit Qt/PyQt version messages 2017-02-21 19:15:22 +01:00
Florian Bruhin
1708b38d7b Add SessionManager.{save,delete}_autosave 2017-02-20 07:43:41 +01:00
Florian Bruhin
ee25e900f8 Add error handling for autosave session 2017-02-20 06:44:23 +01:00
Florian Bruhin
a86170f45d Drop PyQt < 5.7.1 support for QtWebEngine 2017-02-17 14:42:57 +01:00
Florian Bruhin
2b76cca2b2 Improve earlyinit error messages 2017-02-12 21:19:58 +01:00
Florian Bruhin
87d1a2c7a3 Fix lint 2017-02-08 09:14:54 +01:00
Florian Bruhin
02198c4f65 Also check for QtWebKitWidgets in earlyinit 2017-02-08 00:57:47 +01:00
Daniel Fiser
c092840c04 Add optional argument --only-active-window to :session-save.
The new optional argument --only-active-window makes :session-save to
save only the tabs in the currently active window.
2017-02-07 10:38:41 +01:00
Florian Bruhin
29ffa3d134 Add a fullscreen notification overlay
From the spec:

  User agents should ensure, e.g. by means of an overlay, that the end user is
  aware something is displayed fullscreen. User agents should provide a means of
  exiting fullscreen that always works and advertise this to the user. This is
  to prevent a site from spoofing the end user by recreating the user agent or
  even operating system environment when fullscreen.

https://fullscreen.spec.whatwg.org/#security-and-privacy-considerations
2017-02-06 16:22:58 +01:00
Florian Bruhin
5e58764326 Fix lint 2017-02-05 19:52:59 +01:00
Florian Bruhin
9b843f24eb Re-enable segfault reports for QtWebEngine
Fixes #2174
2017-02-05 18:50:17 +01:00
Florian Bruhin
f3b39c55a0 Fix lint 2017-02-05 18:42:34 +01:00
Florian Bruhin
b1a95a3930 Add automatic backend selection in earlyinit 2017-02-05 17:09:04 +01:00
Florian Bruhin
de50f30b9b Replace all GitHub links 2017-02-05 00:13:11 +01:00
Florian Bruhin
148b34a50b Fix remaining Qt 5.8 QtWebEngine test failures 2017-02-04 13:28:38 +01:00
Florian Bruhin
90f472bf59 Temporary fix for Qt 5.8 segfaults
See #2261
2017-01-29 22:56:53 +01:00
Florian Bruhin
b47f90d24f Really fix Python 3.6 deprecation warnings
Before, the module regexes didn't actually work properly, but we thought the
warnings were gone as they only were shown once because of __pycache__.

Now we instead don't filter by module, but simply hide those messages globally
during the earlyinit dependency import (which is the first import).
2017-01-18 08:40:57 +01:00
thuck
b920de764f Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2016-11-23 08:10:11 +01:00
Florian Bruhin
81d67f8a2c Remove support for an empty data/config/cachedir
See #2115
2016-11-14 23:13:21 +01:00
thuck
9f70fa3ec8 Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2016-11-10 00:28:31 +01:00
thuck
d7f5f61f03 Implemented counter for total number of tabs
With this counter we can better control the space on the tabbar.
2016-11-09 23:50:41 +01:00
Florian Bruhin
df9bee33f4 Fix 100% coverage in misc.ipc 2016-11-08 21:56:54 +01:00
thuck
d8b5ca295e Merge branch 'master' of https://github.com/The-Compiler/qutebrowser into pintab 2016-11-08 19:53:46 +01:00
Florian Bruhin
57ee378ec5 Ignore None-socket in ipc.on_timeout 2016-11-08 12:17:44 +01:00
thuck
f9b1d998d4 Last configuration as pin changed to pinned 2016-11-07 22:32:42 +01:00
thuck
f8dffb4e5c Some modifications from initial feedback
Moved pin information from BrowserTab to TabData.
Changed attribute from pin to pinned.
Changed "ifs" to implicit check boolen value.
Removed blancked line on before else statement.
2016-11-07 08:02:25 +01:00
thuck
6f610e9c44 Initial development to support pin tabs #926
Done so far:
Two new commands pin/unpin, both accept a index to help the organization
(maybe this should be more a flag and not exactly two commands)
Crtl+p to pin, Crtl+O to unpin (not sure which should a good default
shortcut)
If user tries to close a pinned tab it's asked to confirm
If user tries to open a URL in a pinned tab it receives a message with a
information that the tab is pinned and ignore the openurl command
Preserve the pinned information across restart if session is activated

Missing:
Visual indication of the tab being pinned
Tab appearance being distinct over other tabs
Make pinned tabs to be the firsts on the tab bar

This is not ready, but it would be good to get some feedback earlier
2016-11-06 15:52:23 +01:00
Florian Bruhin
e3581a50ca Remove generated stylesheets again
We can just use jinja logic instead...
2016-11-03 08:40:41 +01:00
Daniel Karbach
c801caa19a log debug console status changes 2016-10-24 17:10:47 +02:00
Daniel Karbach
5d92934d76 less brutal synthetic segfault 2016-10-24 17:10:47 +02:00
Daniel Karbach
bdb96becd6 unit tests for misc.lineparser 2016-10-24 17:10:47 +02:00
Daniel Karbach
da2ba86aa5 use https for links in docs and elsewhere
refs #2039
2016-10-20 14:48:35 +02:00
Florian Bruhin
229faac9cb Stabilize :session-delete tests 2016-10-14 07:24:36 +02:00
Ryan Roden-Corrent
fbc084e416 Remove :<count>:cmd syntax support.
CommandRunner.parse had some logic for handling commands of form
:<count>:cmd. However, this complicated the parsing logic for something
that appears to only be used in tests. One could use it in a
userscript, but this is unlikely as it is undocumented. Removing
support for this simplifies the logic of parse.

The commnd `run-with-count` is added to provide this functionality.
It works like `repeat` but passes the count along to the command
instead of running the command multiple times.

This resolves #1997: Qutebrowser crashes when pasting commands.
This bug was caused by excess stripping of ':' from the command string
by _parse_count.
2016-10-10 08:02:30 -04:00
Florian Bruhin
f34d896ff4 Log total initialization time 2016-10-04 10:26:44 +02:00
Florian Bruhin
55cefd1ab7 Don't shadow outer name 2016-10-01 22:51:40 +02:00
Florian Bruhin
625bb7baa4 Clean up crash msgbox properly
Fixes #2004
2016-10-01 22:05:29 +02:00
Florian Bruhin
17ceba5ce4 Round correct edge for keyhint with top statusbar 2016-09-22 17:29:25 +02:00
Florian Bruhin
750dfd98af Generalize statusbar-attached website overlays
We already had some duplicated logic for completion/keyhint/messageview,
and plan to add prompt overlays too now - so here we refactor related
code to have a list of overlays instead, which are all
resized/positioned by the mainwindow when needed.

This also changes the size management, which gets moved into the
sizeHint of the respective overlay widgets.
2016-09-22 17:04:39 +02:00
Florian Bruhin
43fa5f55c1 Don't set QT_HARFBUZZ with Qt >= 5.4
Fixes #1948
2016-09-16 08:35:17 +02:00
Florian Bruhin
8403f2451f Add $PATH to crash info 2016-09-15 14:56:27 +02:00
Florian Bruhin
7e30792bfe Fix lint 2016-09-15 14:51:22 +02:00
Florian Bruhin
f16b96aa28 Initial implementation of new messages 2016-09-15 14:51:21 +02:00
Florian Bruhin
aa71c9ae58 Initial qute:* support for QtWebEngine 2016-09-14 10:18:25 +02:00
Florian Bruhin
4a2f0eea2f Fix import order in utilcmds 2016-09-11 20:29:19 +02:00
Florian Bruhin
4537b786f5 Ignore already deleted windows in :window-only 2016-09-11 20:29:05 +02:00
Florian Bruhin
f8f74400c6 Fix more lint 2016-09-07 18:57:00 +02:00
Florian Bruhin
d7f9e4735e earlyinit: Only display exception if there was one 2016-09-07 17:33:22 +02:00
Florian Bruhin
4d91ccfea5 Enforce Qt >= 5.6.0 for QtWebEngine 2016-09-07 17:31:48 +02:00
Florian Bruhin
7f013b7808 Fix lint 2016-09-06 17:00:25 +02:00
Florian Bruhin
f6ba859896 Move tabhistory.TabHistoryItem to misc.sessions
This makes browser.webkit.tabhistory contain only QtWebKit-specific
code.
2016-09-06 09:50:55 +02:00
Florian Bruhin
2658b7c4e7 pastebin: Accept HTTPS URLs
This will let us switch the URLs the pastebin returns to HTTPS some
day...
2016-09-05 22:06:26 +02:00
Florian Bruhin
0ad8578aa8 Make QtWebKit optional in earlyinit.py 2016-09-05 17:58:29 +02:00
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