Commit Graph

525 Commits

Author SHA1 Message Date
Florian Bruhin
ec07e4f8be Handle OSError exceptions where appropriate.
Fixes #25.
2014-12-10 18:00:49 +01:00
Florian Bruhin
ea76bdfb0f Replace all IOError by OSErrors.
Starting with Python 3.3, IOError is just an alias for OSError.
2014-12-10 16:48:23 +01:00
Florian Bruhin
206b5f548e Fix checking for errors when a page is loaded.
Because of the error page, we got loadFinished with ok=True even with errors.

Fixes #84.
2014-12-10 16:38:24 +01:00
Florian Bruhin
76c5c8bf8e cookies/cache: Handle por^H^Hrivate browsing mode.
See #43.
2014-12-10 13:12:53 +01:00
Florian Bruhin
7e95401f02 Check if download reply is None when closing tab.
Fixes #311.
2014-12-09 17:37:57 +01:00
Florian Bruhin
4ab4ac3db6 downloads: Make sure read timer is stopped.
Hopefully fixes #307.
2014-12-08 16:16:03 +01:00
Florian Bruhin
07fed5a401 Don't nest function calls in on_read_timer_timeout.
This would have made it easier to diagnose #307.
2014-12-08 16:07:50 +01:00
Florian Bruhin
1fb24e45ff Newline fix in adblock.py 2014-12-04 21:35:32 +01:00
Florian Bruhin
3adb97e4d2 Merge branch 'master' of ssh://tonks/qutebrowser 2014-12-02 21:28:54 +01:00
Florian Bruhin
d94f848c82 Ignore isNullError while handling label elements.
Fixes #295 (hopefully for real this time!)
2014-12-02 21:27:06 +01:00
Florian Bruhin
99fb516aa3 Never disconnect signal from destroyed frames.
Fixes #152 - hopefully really this time!
2014-12-02 21:09:03 +01:00
Florian Bruhin
66a42512c6 adblock: Convert some methods to functions. 2014-12-02 12:26:13 +01:00
Florian Bruhin
9fa036ecce Remove logging for #152.
This reverts a1ba05ff08.
2014-12-01 22:29:32 +01:00
Florian Bruhin
e8a6238028 Clean up hint labels and frames before clicking link.
Fixes #152.
Hopefully fixes #295.
2014-12-01 19:15:17 +01:00
Florian Bruhin
cb67198f7d Fix download redirections and :adblock-update.
We called init_reply again which started read_timer even if the file object was
already set.

Fixes #294.
2014-12-01 07:40:36 +01:00
Florian Bruhin
316d5ff189 Check if replies are open in downloads. 2014-12-01 07:35:57 +01:00
Florian Bruhin
f22c00c64d Move MAX_REDIRECTS attribute back to DownloadItem.
Fixes #293.
2014-12-01 06:55:15 +01:00
Florian Bruhin
9d28c59a28 Fix downloading of qute:log. Closes #81. 2014-11-30 18:47:41 +01:00
Florian Bruhin
d54f06ea91 Reparent a page's QNAM if there are running downloads.
Fixes #289.
2014-11-30 18:47:40 +01:00
Florian Bruhin
6d419b8346 Avoid starting downloads before we know the filename.
Closes #278.
2014-11-30 18:47:40 +01:00
Florian Bruhin
25a665e601 Abort download question on errors. Fixes #266. 2014-11-30 15:34:15 +01:00
Florian Bruhin
a00dd7b679 Slowly download while the user is entering a filename.
Closes #79.
Closes #270.
2014-11-30 15:30:15 +01:00
Florian Bruhin
60ef39b4d0 fixup 2014-11-30 15:30:15 +01:00
Florian Bruhin
ee0cb00428 First download cleanup. 2014-11-30 15:30:14 +01:00
Florian Bruhin
d34aefcfee Another round of config breakage (sorry!).
- Rename colors->tab.* to colors->tabs.*
- Rename permission section to content.
2014-11-26 21:16:27 +01:00
Florian Bruhin
186f292586 Remove unused import 2014-11-24 21:07:03 +01:00
Florian Bruhin
0134646c67 Basic host blocker implementation.
Squashed commit of the following:

commit 8d38e9c2f13778fe21cc2c1d61c5d26907b469ef
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Nov 24 21:04:30 2014 +0100

    Fix default adblock lists.

commit a734b87e753daec28fa0c6643af8de088041179a
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Nov 24 21:04:14 2014 +0100

    Fix error output on adblock errors.

commit 15bc10f605ebb86c12523bb81b55d1440fcacdbf
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Nov 24 07:38:47 2014 +0100

    Update adblock docks

commit 475d530ee50f52295c2171208c6a0278750cf4b4
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Nov 24 07:38:39 2014 +0100

    Remove adblock ram calculation

commit 0e52cc3ec93912fd3fa3ecf6de833aef0c540a60
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Nov 24 07:03:11 2014 +0100

    Adjust docs for hosts-file.

commit 941df242d38300d7e42a26f2e67cfd668c6f8590
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Nov 24 06:55:40 2014 +0100

    Add logging for host blocking.

commit 4ca1561ccf32affb8439113f4f1c222d7dee1e14
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Nov 24 00:11:59 2014 +0100

    Don't do adblock updates automatically after changing config.

commit 26d4e86ca393d4a1a5fd8fac7729ce9c2e7cd240
Author: Florian Bruhin <git@the-compiler.org>
Date:   Thu Nov 20 19:58:32 2014 +0100

    adblock: Don't delete blocked hosts between files.

commit c7af08c68adf3c135d5a2fc746eb6d3c715b0711
Author: Florian Bruhin <git@the-compiler.org>
Date:   Thu Nov 20 19:58:22 2014 +0100

    adblock: Add comments for rewinding.

commit 9af87313088cd79ab8c022bcee9308511d6328f0
Author: Florian Bruhin <git@the-compiler.org>
Date:   Thu Nov 20 19:56:39 2014 +0100

    adblock: Rewind files properly.

commit 7f3dadc04ba68c92d6789ecf5822f7b2dfc367a0
Author: Florian Bruhin <git@the-compiler.org>
Date:   Thu Nov 20 19:40:18 2014 +0100

    Add untested file support.

commit 334c01867d510b599d94c9397097a1d789c0c64c
Author: Florian Bruhin <git@the-compiler.org>
Date:   Wed Nov 19 22:33:25 2014 +0100

    adblock: Handle download errors correctly

commit 3a9af4cd4a903386dc323640f1d52e03383b3aa7
Author: Florian Bruhin <git@the-compiler.org>
Date:   Wed Nov 19 22:23:04 2014 +0100

    adblock: Add error handling for invalid input.

commit 5934c3c027ff9205adb512aab396ca913b31e50d
Author: Florian Bruhin <git@the-compiler.org>
Date:   Wed Nov 19 22:22:47 2014 +0100

    adblock: Handle done_count correctly.

commit 3ba5e83fda9b7d764bfcf1e4b1aa479daae39791
Author: Florian Bruhin <git@the-compiler.org>
Date:   Wed Nov 19 21:18:10 2014 +0100

    Read adblock files when they finished downloading.

commit 86a5ecf194445e2ebe0cf22b59e24223387880c5
Author: Florian Bruhin <git@the-compiler.org>
Date:   Wed Nov 19 20:51:25 2014 +0100

    Add hosts-file.net to host-block-lists.

commit 121f0bff953497449c32e45e671b71d954beed4c
Author: Florian Bruhin <git@the-compiler.org>
Date:   Wed Nov 19 20:51:13 2014 +0100

    Add zip-file support to adblock.py.

commit f1c0e67cb9d890a44a1d1f545ace997f0a453f91
Author: Florian Bruhin <git@the-compiler.org>
Date:   Mon Nov 17 07:41:14 2014 +0100

    print line counts for debugging

commit 75dbb8964fd44862abc378ef26fb47f8cda6061e
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Nov 14 19:22:20 2014 +0100

    Use statusbar messages for adblock

commit 74d9142d831496e02c5baae72c2723e320af1778
Author: Florian Bruhin <git@the-compiler.org>
Date:   Fri Nov 14 08:34:46 2014 +0100

    Add basic adblock functionality.
2014-11-24 21:05:09 +01:00
Florian Bruhin
f7fbf98667 downloads: Rewind file objects correctly on redirects. 2014-11-24 21:04:48 +01:00
Florian Bruhin
9333e92891 Remove download assertions. 2014-11-24 06:55:54 +01:00
Florian Bruhin
6856c49be9 Handle HTTP redirections in downloads. 2014-11-24 00:12:52 +01:00
Florian Bruhin
655115858c Handle OSError when using subprocess. 2014-11-23 18:07:05 +01:00
Florian Bruhin
615be2a4bc Update docs. 2014-11-20 06:36:08 +01:00
Florian Bruhin
9c180fd91b Add a dest-parameter to :download. 2014-11-20 06:24:15 +01:00
Florian Bruhin
283cedff15 Never get downloads from the cache.
This is a workaround for corrupted files because Qt somehow reads them from the
cache wrongly. See https://bugreports.qt-project.org/browse/QTBUG-42757

This might fix a part of #78 - but we'll leave this open for now, since it
might also be another issue.
2014-11-19 19:43:07 +01:00
Florian Bruhin
b8b31fd914 downloads: default autoclose=True. Fixes #265. 2014-11-18 20:10:57 +01:00
Florian Bruhin
2a95533564 Add some assertions for 'successful'. 2014-11-18 19:56:57 +01:00
Florian Bruhin
b1d6e70c8b Check URL validity in :download. 2014-11-18 19:49:55 +01:00
Florian Bruhin
75d1f072c2 Add a raise_cmdexc_if_invalid to urlutils. 2014-11-18 19:49:31 +01:00
Florian Bruhin
41c3a59e81 Add a :download command. 2014-11-18 19:38:34 +01:00
Florian Bruhin
40918bfc98 Use _die on QNetworkReply errors. 2014-11-18 07:47:28 +01:00
Florian Bruhin
406f7b3b84 Don't try to set fileobject on errors. 2014-11-18 07:47:28 +01:00
Florian Bruhin
c6deae36b1 Fix setting of successful flag. 2014-11-18 07:47:28 +01:00
Florian Bruhin
829b8df535 downloads: Return the created DownloadItem. 2014-11-18 07:47:28 +01:00
Florian Bruhin
6301c740d1 downloads: Add a generic NetworkManager. 2014-11-18 07:47:28 +01:00
Florian Bruhin
c8a1c979e8 downloads: Whitespace change. 2014-11-18 07:47:28 +01:00
Florian Bruhin
d31e8edffc downloads: Document _win_id. 2014-11-18 07:47:28 +01:00
Florian Bruhin
da49424836 downloads: Make it possible to set fileobj instead of name. 2014-11-18 07:47:28 +01:00
Florian Bruhin
5ad516a438 DownloadItem: Make fileobj public. 2014-11-18 07:47:28 +01:00
Florian Bruhin
f250cd41ad DownloadItem: Add an autoclose attribute. 2014-11-18 07:47:28 +01:00
Florian Bruhin
ab0dba3344 DownloadItem: add successful attribute. 2014-11-18 07:47:28 +01:00