Commit Graph

613 Commits

Author SHA1 Message Date
Florian Bruhin
ad5008152c Move browser.webkit.history to browser.history 2016-08-10 14:45:52 +02:00
Niklas Haas
2223a285ef Remove ui -> hide-mouse-cursor setting
This was currently almost completely broken, yet nobody complained. The
new behavior (in the previous commit) makes this always hide the mouse
cursor, even when an input field has focus.

Since the only two easy options to implement are "never hide" and
"always hide", combined with the fact that both are sort of useless to
an end-user, just remove the option until somebody wants it back.
2016-08-09 23:32:17 +02:00
Niklas Haas
16c2268d09 Fix last-focused-main-window's behavior
Right now, get('last-focused-main-window') essentially returns the same
as qApp.activeWindow(), since it's None when no window is focused. This
seems somewhat contrary to its original intent, so I've changed it to
only ever update the object.

This actually fixes another bug as well: on_focus_changed's new is not
always a MainWindow - in fact it's a WebView on my end. To fix this,
directly use the QApplication.activeWindow() to find the current focus.

That second bit in particular actually some related bugs that probably
nobody ever noticed or bothered reporting:

* _maybe_hide_mouse_cursor currently pretty much never gets called
* :adblock-update doesn't actually show any downloads
* ... probably more
2016-08-09 22:41:40 +02:00
Florian Bruhin
cd905841e0 Don't log on_focus_changed warning if new is None 2016-07-26 23:27:20 +02:00
Florian Bruhin
f4f6a3dac1 Merge branch 'open-download' of https://github.com/Kingdread/qutebrowser into Kingdread-open-download 2016-07-26 10:32:34 +02:00
Florian Bruhin
76eab7617b Remove @pyqtSlot for functions and non-QObjects
Fixes #1669
2016-07-23 11:42:50 +02: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
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
Daniel Schadt
81b2688c70 downloads: use global TempDownloadManager
This way, all temporary downloads will end up in the same directory and
everything is cleaned up at program exit, not when the corresponding
window is closed.
2016-07-12 16:52:01 +02:00
Florian Bruhin
ebf9bc4e0a Improve version output 2016-07-06 23:47:59 +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
Florian Bruhin
4fccc89d7d Split browser into browser/browser.webkit 2016-06-13 11:18:21 +02:00
Florian Bruhin
483a5f8103 Fix sharing of cookie jars with private browsing
Fixes #1219
2016-06-08 16:35:43 +02:00
Florian Bruhin
9beb68bb5c Ignore symlinks when recompiling for :restart
Otherwise broken symlinks (*cough* emacs *cough*) cause this to fail
with FileNotFoundError.
2016-06-08 12:56:37 +02:00
Florian Bruhin
ea1d8902d5 Add logging for #1484 2016-05-24 21:35:48 +02:00
Florian Bruhin
0fb6e508e6 Merge branch 'master' of https://github.com/Yatekii/qutebrowser into Yatekii-master 2016-05-24 21:32:24 +02:00
Noah Huesser
299c66b82c Possibly fixed issue: #1484 2016-05-23 11:32:27 +02:00
Florian Bruhin
c33f0c3512 Use @cmdutils.argument for completions 2016-05-18 06:55:17 +02:00
Florian Bruhin
4807746e8f Add @pyqtSlot for qApp.focusChanged slot 2016-04-29 22:25:27 +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
Xitian9
c76d4479ee Open command line urls explicitly. 2016-04-15 18:50:42 +10:00
Jimmy
1c10a1aecf Adds new buffer command with completion.
`buffer` takes either a tab index or a string and focuses the specified
tab. The index can be of the form [0-9]+ which will switch to the
relevant tab in the current window or [0-9]+/[0-9]+ (that is
win_id/index) which will focus the specified window before switching
tabs. If a string is passed the list of open tabs across all windows is
sorted based on title and url (just like in the completion widget) and
the top result is selected.
2016-03-31 14:00:36 +13: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
Sorokin Alexei
04afcef239 Use system icon for windows if available 2016-02-02 00:48:07 +03:00
Florian Bruhin
041aa61508 Make :restart work with --temp-basedir.
Fixes #1244.
2016-01-19 06:51:36 +01:00
Florian Bruhin
a5f2ac5f03 Adjust copyright years. 2016-01-04 07:12:39 +01:00
Florian Bruhin
150a83d8f4 pylint: Remove unneeded supressions. 2015-12-01 22:03:58 +01:00
Florian Bruhin
e405492667 Ignore errors when removing temp basedir. 2015-11-24 17:50:39 +01:00
Florian Bruhin
3905884a84 Disable all QWebSettings storage when quitting.
This hopefully helps with issues on the Windows buildbot:

    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):
      File "C:\Users\florian\buildbot\slave\win8\build\.tox\py34\lib\shutil.py", line 371, in _rmtree_unsafe
	os.unlink(fullname)
    PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\florian\\AppData\\Local\\Temp\\qutebrowser-basedir-ixuexfeu\\data\\local-storage\\qrc__0.localstorage'
2015-11-24 17:24:14 +01:00
Florian Bruhin
75178b0cdc Log when the focus object changed.
This is mainly needed for tests to synchronize things properly.
2015-11-24 15:24:45 +01:00
Florian Bruhin
1da7996c3b Style fixes. 2015-11-13 22:27:41 +01:00
Florian Bruhin
0d67cff5cb Merge branch 'bdd'
Conflicts:
      tests/test_conftest.py
      tox.ini
2015-11-02 06:36:30 +01:00
Florian Bruhin
e88e9a66da Fix deleting of --temp-basedir on Windows.
Before it couldn't get deleted because Qt still kept the icon database open in
some way.

By clearing it when shutting down, this works correctly.

Fixes #1017.
2015-11-01 22:47:58 +01:00
Florian Bruhin
764914a8b2 Clean up cache.DiskCache. 2015-10-20 22:40:43 +02:00
Jonas Schürmann
1e8170d98b Fixed lines which were too long 2015-10-06 23:18:04 +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
54557fee20 Fix lint. 2015-10-05 06:53:56 +02:00
Florian Bruhin
17778f1457 Prevent :restart when there's a SyntaxError.
Closes #910.
2015-10-04 23:24:35 +02:00
Florian Bruhin
d229e90724 Fix some splelling mistakes. 2015-10-04 15:41:42 +02:00
Florian Bruhin
f972d043c5 Fix StopIteration handling in _init_late_modules.
This caused a PendingDeprecationWarning with Python 3.5:

Traceback (most recent call last):
  File "/home/florian/proj/qutebrowser/git/qutebrowser/utils/debug.py", line 237, in log_time
    yield
  File "/home/florian/proj/qutebrowser/git/qutebrowser/app.py", line 433, in _init_late_modules
    next(reader)
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/florian/proj/qutebrowser/git/qutebrowser/app.py", line 433, in _init_late_modules
    next(reader)
  File "/usr/lib64/python3.5/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
PendingDeprecationWarning: generator 'log_time' raised StopIteration
2015-09-30 07:32:36 +02:00
Florian Bruhin
9561b7b02c Reset QT_WAYLAND_DISABLE_WINDOWDECORATION. 2015-09-16 10:23:21 +02:00
Florian Bruhin
f83f4a6a1a Add setting. 2015-09-16 08:52:51 +02:00
Florian Bruhin
08e1d9a304 hardcoded 2015-09-16 08:42:59 +02:00
Florian Bruhin
74d7997a67 Set application info earlier. 2015-09-09 19:31:52 +02:00
Florian Bruhin
8913c1883e ipc: Fix missing import. 2015-08-30 22:57:45 +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
fe3eb30892 Reorganize exceptions in urlutils.
- Instead of ValueError, a new InvalidUrlError is raised with invalid URLs.
- FuzzyUrlError got removed as it's basically the same as InvalidUrlError.
2015-08-09 18:48:32 +02:00
Alexander Cogneau
73c28c12f3 Show launch time in crash logs. 2015-08-07 20:36:38 +02:00
Florian Bruhin
2f11b41ae6 Merge bookmarks and quickmarks into urlmarks. 2015-07-26 16:37:10 +02:00