Commit Graph

1408 Commits

Author SHA1 Message Date
Florian Bruhin
3f15186a64 Add some coverage pragmas for caret workarounds. 2016-01-06 17:52:44 +01:00
Felix Van der Jeugt
362db3d986 fix remarks 2016-01-05 22:45:52 +01:00
Felix Van der Jeugt
8873aba09f rename strng to more sensible names 2016-01-05 21:44:29 +01:00
Felix Van der Jeugt
e28c1bf9b8 allow config files to be optional 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
32de5b76a9 urgh be awake 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
12cc96a94b fix most of the-compiler's remarks 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
b89e0f8803 refactor all the things 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
9f81a9c3c6 lines also hey, a useful suggestion 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
cb8b16ecc5 yes, this looks less complex 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
aa9e58b520 take this, pep8 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
fc06283d91 fix more pep8/pylint complaints 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
d0979b9fac fix pep8 and pylint errors
Though I quite disagree on some remarks, as usual.
2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
4814abe286 refactor tag extraction and fix string shadowing 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
38803375f5 add dictionary config value and fix wrong variable 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
351420310d fix some of the style warnings and errors 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
766a94a539 fixed when new hints are prefixes of existing
good thing I used this some days before any merging
2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
1dfcf99d22 more extensive smart hinting 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
2f9051c6e1 shorten unique word hints 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
50b7f260c7 use link text as hints 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
86828930a2 use object state in stead of class state to store hint words 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
aaad8588b6 include dictionary parsing in first hinting
I though this would be to slow, but it's actually OK
2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
3be81ba62a word hints should be generated on first call 2016-01-05 20:43:29 +01:00
Felix Van der Jeugt
49e6b656f6 add word hints 2016-01-05 20:43:29 +01:00
Florian Bruhin
a97ba9aa09 Merge branch 'pdfjs' of https://github.com/Kingdread/qutebrowser into Kingdread-pdfjs 2016-01-05 07:21:26 +01:00
Florian Bruhin
a5f2ac5f03 Adjust copyright years. 2016-01-04 07:12:39 +01:00
Daniel Schadt
6d02ef68ec Add BDD tests for pdfjs integration 2015-12-20 20:00:56 +01:00
Daniel Schadt
4fdf318fda pdfjs: Use "info" verbosity for pdf.js logging 2015-12-20 19:24:41 +01:00
Daniel Schadt
1279e418ee pdfjs: Replace inline-removal with own function
Easier to unit-test and easier to understand for other programmers.
2015-12-20 19:24:41 +01:00
Daniel Schadt
c0b3160676 qutescheme: guess mimetype instead of 'text/html'
Since we're now using qute:// to serve files other than html
(see: pdfjs), it's a good idea to change the mimetype accordingly. This
also prevents warnings in the console, as QWebKit will complain e.g.
when stylesheets are served with 'text/html'.
2015-12-20 19:24:41 +01:00
Daniel Schadt
cab1d3c666 fully encode URL before passing it to pdfjs 2015-12-20 19:24:41 +01:00
Daniel Schadt
2f34bdf9b9 Add link to pylint bug 2015-12-20 19:24:41 +01:00
Daniel Schadt
8e4ca1fc23 pdfjs: use PDFView.open instead of PDFView.load
Now we get a nice loading bar at the top of the page.
2015-12-20 19:24:41 +01:00
Daniel Schadt
d7d577b1fa Fix pep8/pylint 2015-12-20 19:24:41 +01:00
Daniel Schadt
1c13a3cd68 pdfjs: search in ~/.local/share/qutebrowser 2015-12-20 19:24:41 +01:00
Daniel Schadt
623b6fba7e pdfjs: open system file in binary read 2015-12-20 19:24:41 +01:00
Daniel Schadt
b243acf172 Add a nice error page when pdfjs is not found 2015-12-20 19:24:41 +01:00
Daniel Schadt
9eb72bf08a pdfjs: use system-wide installation if available 2015-12-20 19:24:41 +01:00
Daniel Schadt
ef85d1af4c Move pdfjs and use original files
* No modified pdfjs installation needed
-> Groundwork for using a system-wide installation

* Script update_3rdparty.py to download and upack the latest pdfjs
  release
2015-12-20 19:24:41 +01:00
Daniel Schadt
60b9d7e6c3 Fix lints 2015-12-20 19:24:41 +01:00
Daniel Schadt
0811418746 pdfjs: don't embed data in html
We don't need more than one copy of the pdf.
2015-12-20 19:24:41 +01:00
Daniel Schadt
e6548dd9e7 reorder pdfjs generation code 2015-12-20 19:24:41 +01:00
Daniel Schadt
3dfaab6194 pdfjs: actually wait until the file is loaded
Otherwise we get incomplete replies and thus no pdf to view.
2015-12-20 19:24:41 +01:00
Daniel Schadt
8b141037ef Add setting value to enable/disable pdf.js 2015-12-20 19:24:41 +01:00
Daniel Schadt
fcfc09f541 Revoke "LocalContentCanAccess*Urls"
Since we embed the content of the PDF directly, we no longer need the
permissions for pdf.js.
2015-12-20 19:24:41 +01:00
Daniel Schadt
ea4d9e884e pdfjs: Remove debug output file 2015-12-20 19:24:41 +01:00
Daniel Schadt
5e0090d5b8 pdfjs: Use abosolute URLs
That allows us to use the "original" page URL when displaying with
pdf.js, which means yanking the URL etc works as intended.
2015-12-20 19:24:41 +01:00
Daniel Schadt
0ee13392e1 Basic pdfjs support
Working, but not very well.

Todo:
- remove pdf_file.html debug file
- set URL correctly
2015-12-20 19:24:41 +01:00
Florian Bruhin
fcf94fd527 Remove various deprecated commands/arguments. 2015-12-20 18:38:29 +01:00
Daniel Schadt
5acc982b44 Clean up mhtml doc and use email.message.Message
MIMEMultipart is not needed for the attachements, a simple Message is
enough.

Also fix the README markup and the _start_download docstring.
2015-12-03 22:51:46 +01:00
Florian Bruhin
d418f7f9fa Merge branch 'caret_mode_windows_osx' of https://github.com/artur-shaik/qutebrowser into artur-shaik-caret_mode_windows_osx 2015-12-02 06:22:27 +01:00
Florian Bruhin
eeadeb400c Style fix. 2015-12-02 06:20:41 +01:00
Panagiotis Ktistakis
de3460da3e Wrap tabs on :tab-move +/- if tabs->wrap is true. 2015-12-02 03:17:54 +02: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
Florian Bruhin
31265b80b6 pylint: Add WORKAROUND to some comments. 2015-12-01 21:56:38 +01:00
Artur Shaik
c9d47ae92a More win32 workarounds 2015-12-01 16:53:07 +06:00
Artur Shaik
25545617a0 Try workaround for win32 platform. 2015-12-01 16:19:13 +06:00
Artur Shaik
3a5ce22eac Remove unnecessary actions in block jumps. 2015-12-01 13:17:28 +06:00
Florian Bruhin
8be04e4f6c pylint: Disable non-callable in SslError.
This wasn't hashable (and thus __hash__ wasn't callable) with Qt < 5.4.
2015-12-01 07:50:08 +01:00
Artur Shaik
d00f999dcf move_to_end_of_prev_block without unnecessary command. 2015-11-30 22:27:24 +06:00
Patric Schmitz
98a454a428 log-javascript-console -> [none, debug, info] 2015-11-29 18:37:11 +01:00
Florian Bruhin
736fd7d45e Use os.path.join for bookmarks/urls path.
This should fix the tests on Windows which failed because they matched against
a message containing \.
2015-11-29 00:59:18 +01:00
Florian Bruhin
b79049261e Delay :yank notification until message was yanked.
This should make yankpaste tests more reliable.
2015-11-27 18:32:17 +01:00
Florian Bruhin
23068e9679 Don't log yanked test with :yank-selected.
It makes our tests fail (invalid log line) and is probably not needed.
2015-11-26 21:23:11 +01:00
Florian Bruhin
8e7a76280b Use cmdutils.check_exclusive for :tab-clone. 2015-11-26 20:11:53 +01:00
Florian Bruhin
7f5e07d7cc bdd: Add some tests for :tab-move. 2015-11-26 18:37:47 +01:00
Florian Bruhin
f56e7b1220 Simplify :tab-move code. 2015-11-26 17:44:34 +01:00
Florian Bruhin
987ee59f58 :tab-move: Fix tab index shown in error message. 2015-11-26 16:37:54 +01:00
Florian Bruhin
5a95cfdc7a Change CommandError to ValueError for :tab-move.
This should never happen.
2015-11-26 16:37:29 +01:00
Daniel Schadt
d082c248a8 Disallow empty values in url-incdec-segments 2015-11-25 19:35:37 +01:00
Florian Bruhin
a6045ab551 Handle invalid select-on-remove case. 2015-11-25 18:47:36 +01:00
Florian Bruhin
73e9fd1118 Handle BOM (\ufeff) for webelem.javascript_escape. 2015-11-25 18:14:52 +01:00
Florian Bruhin
24a71e5c2e Fix webelem.javascript_escape with U+2028/U+2029. 2015-11-25 10:32:22 +01:00
Florian Bruhin
027a10c04b bdd: Add some tests for :navigate. 2015-11-24 21:32:45 +01:00
Florian Bruhin
35de87f973 Expand ~ with :dump-page. 2015-11-24 18:04:10 +01:00
Florian Bruhin
b37dac7bfa Handle errors in :dump-page. 2015-11-24 18:03:39 +01:00
Florian Bruhin
922fdc0526 Fix :fake-key with no focused webview. 2015-11-24 16:28:56 +01:00
Florian Bruhin
607ca0f478 tests: Wait until page is dumped for header check.
If we don't do this, it's possible for the test process to delete the temporary
directory before qutebrowser actually writes the file.
2015-11-23 20:12:52 +01:00
Florian Bruhin
31892b437e Add :debug-dump-page command.
This can probably be merged into :download later, when the mess is cleaned up.
2015-11-23 14:35:46 +01:00
Florian Bruhin
16e1a65448 Merge branch 'download-page' of https://github.com/Kingdread/qutebrowser into Kingdread-download-page 2015-11-23 13:16:16 +01:00
Daniel Schadt
89c9b5959e Don't ask the user twice for a filename
Fixes a bug where the user would be asked twice for a filename when
using :download without a dest-argument.

The problem was that we unconditionally overwrote filename, even if one
was given, thus discarding any "filename-finding-process" that we had
and asking the user again.
2015-11-23 12:32:58 +01:00
Florian Bruhin
efa745b53f Fix indent. 2015-11-23 11:26:01 +01:00
Florian Bruhin
f4cccdf13f Merge branch 'patch-1' of https://github.com/larryhynes/qutebrowser into larryhynes-patch-1 2015-11-23 11:23:10 +01:00
Florian Bruhin
ea06c64ed4 Fix typos. 2015-11-23 11:17:26 +01:00
larryhynes
706a4e3d39 Change error to warning for text not found on page 2015-11-21 23:47:00 +00:00
Daniel Schadt
c12011c84d Style fixes 2015-11-21 00:10:49 +01:00
Daniel Schadt
b776aeac84 Use same representation in webview and quteprocess
Otherwise the "page loaded" message will not be recognized.

Also use percent-encoding to avoid unicode-related bugs on different
systems.
2015-11-20 19:11:20 +01:00
Florian Bruhin
af875f4b8f Add a :fake-key command.
Closes #556.
See #551.
2015-11-20 19:06:06 +01:00
Daniel Schadt
d5bc962046 mhtml: Current index != Current tab_id 2015-11-20 18:15:03 +01:00
Daniel Schadt
b38a3caa4c Hide dest-old in the documentation of download 2015-11-20 16:34:27 +01:00
Daniel Schadt
3438a45b19 Merge branch 'master' into download-page 2015-11-18 19:27:26 +01:00
Samuel Loury
0298fcc841 Use credentials from netrc when available 2015-11-18 16:44:45 +01:00
Florian Bruhin
726525b26a bdd: Add some more tests for scrolling with floats. 2015-11-17 06:57:33 +01:00
Florian Bruhin
40e2258ef3 Don't accept floats for :scroll-px. 2015-11-17 06:57:13 +01:00
Florian Bruhin
b68adf1245 Merge _scroll_percent into scroll_perc. 2015-11-16 19:05:05 +01:00
Florian Bruhin
a4d15b550e Abort :back/:forward at beginning/end of history. 2015-11-16 19:03:07 +01:00
Florian Bruhin
7de206e350 Fix :scroll-perc 0/100 0. 2015-11-15 16:38:56 +01:00
Daniel Schadt
aef26e7779 mhtml: Recognize more files as css 2015-11-12 20:11:36 +01:00
Daniel Schadt
30e2afb59d mhtml: reduce test flakiness
Waiting for "All assets downloaded" may lead to race conditions when
the output file is read before qute wrote it, so the test fails.
2015-11-12 13:17:10 +01:00
Daniel Schadt
c759bf7a2f Move common filename-ask-code to a function
This should reduce code/logic-duplication regarding asking for download
filenames.
2015-11-12 00:12:51 +01:00
Daniel Schadt
18da73227b Don't shadow built-in "dir" 2015-11-11 21:20:04 +01:00
Daniel Schadt
62b0c4d178 Merge branch 'download-page-tests' of https://github.com/The-Compiler/qutebrowser into download-page 2015-11-11 21:03:36 +01:00
Daniel Schadt
4e3cd8b9e8 Don't prompt if not storage->prompt-download-dir 2015-11-11 20:39:35 +01:00
Daniel Schadt
0f8ec73c55 mhtml: also check dir before starting the download
Otherwise the downloads will be useless anyway.
2015-11-11 20:05:42 +01:00
Daniel Schadt
43c3a38938 mhtml: Don't crash if output dir doesn't exist 2015-11-11 20:00:20 +01:00
Florian Bruhin
7cddd52b2d Merge branch 'download-page' of https://github.com/Kingdread/qutebrowser into Kingdread-download-page 2015-11-10 22:39:07 +01:00
Florian Bruhin
250f0e7410 Merge branch 'test-browser-cache-more' of https://github.com/lamarpavel/qutebrowser into lamarpavel-test-browser-cache-more 2015-11-10 18:57:28 +01:00
Daniel
a5ee39c35e Fix PEP 8 2015-11-10 09:45:01 +01:00
Daniel
c0535727ef Only download elements with rel={stylesheet,icon}
Websites may set the rel attribute to whatever they want, so we just
care about stylesheets and icons and not the other stuff like wss
links (looking at you, GitHub), RSS-feeds, ...
2015-11-09 22:57:31 +01:00
Florian Bruhin
2fc1612bd4 Fix removing of automatic downloads w/ -1 timeout.
With ui -> remove-finished-downloads set to -1, when a download was started
with auto_remove=True (like with :adblock-update), there was a QTimer set up
with timeout -1, which causes this instead of doing something sane:

WARNING: QTimer::singleShot: Timers cannot have negative timeouts
2015-11-09 22:45:51 +01:00
Florian Bruhin
566f94111c Don't warn if element vanished on mouse release.
This happens somewhat reliably on Ubuntu Trusty with the hint test, and more
reliably on Travis.
2015-11-09 22:12:24 +01:00
Florian Bruhin
65648da1ad Fix #889 during a webpage shutdown.
If we're in the middle of closing a WebPage, the webview will still be
registered, but already deleted by Qt - so we get a RuntimeError/TypeError
there.
2015-11-09 18:22:35 +01:00
Florian Bruhin
f3d76b5af6 Fix :follow-hint with an invalid keystring. 2015-11-09 18:20:23 +01:00
Florian Bruhin
35c36725f2 Disallow :follow-hint outside of hint mode.
Fixes #1105.
2015-11-09 18:20:23 +01:00
Daniel
f79722975f Fix _download_dir reference 2015-11-09 17:14:04 +01:00
Daniel
a1bc020fec mhtml: Sanitize default filename suggestion 2015-11-09 17:01:08 +01:00
Daniel
4f01382c64 mhtml: Ignore non-http(s) assets 2015-11-09 17:01:08 +01:00
Daniel
71533b3456 mhtml: Add comments describing the hostblock check 2015-11-09 17:01:08 +01:00
Daniel
9694b3b548 downloads: Remove safety check in on_reply_error
Probably not needed after the last commit.
2015-11-09 17:01:08 +01:00
Daniel
252dc9a8bd mhtml: Don't attempt to download hostblocked urls 2015-11-09 17:01:08 +01:00
Daniel
f34161423c Fix "line too long" 2015-11-09 17:01:08 +01:00
Daniel
a780325a3a Allow directories to be entered as destination
The filename will then default to 'page title.mht'
2015-11-09 17:01:08 +01:00
Daniel
ae8a9b8798 Handle non-ASCII in headers/url better 2015-11-09 17:01:08 +01:00
Daniel
8bb887ddab Specify window and tab instead of 'current' 2015-11-09 17:01:08 +01:00
Daniel
a1e0ccb787 Fix spelling/style. 2015-11-09 17:01:08 +01:00
Daniel
12a9deb9bc Fix lints 2015-11-09 17:01:08 +01:00
Daniel
d1f8d29c20 Add --mhtml flag to :download
And remove :download-whole command.
2015-11-09 17:01:08 +01:00
Daniel
8cf0af004f Deprecate :download [url] [dest], add --dest param
:download --dest [dest] [url] is the new syntax.
2015-11-09 17:00:46 +01:00
Daniel
b17d74452f Expand $HOME before checking if file exists
Otherwise we might accidentally overwrite a file.
2015-11-09 16:59:16 +01:00
Daniel
919365dfa1 Remove dead code mhtml.py:MHTMLWriter:remove_file 2015-11-09 16:59:16 +01:00
Daniel
1902e4858f Also catch re.error on cssutils import
cssutils 1.0 and earlier are broken on Python 3.5 due to a bad regex
escape.
2015-11-09 16:59:16 +01:00
Daniel
957d68c477 Revert "Remove cssutils from mhtml.py"
This reverts commit 22a0f0952704d284846ab2572790d99a85515c57.
2015-11-09 16:59:16 +01:00
Daniel
ce1a99cc7c Remove cssutils from mhtml.py 2015-11-09 16:59:16 +01:00
Daniel
706b8c6600 Shorten line 2015-11-09 16:59:16 +01:00
Daniel
6601df14a3 mhtml: ask before overwriting dest 2015-11-09 16:59:16 +01:00
Daniel
420c087373 use cssutils 2015-11-09 16:59:16 +01:00
Daniel
749b1c02cc Style changes for mhtml and test_mhtml 2015-11-09 16:59:16 +01:00
Daniel
b05a0d191d Fix module path in test_mhtml
Also fix docstring for _get_css_imports
2015-11-09 16:59:16 +01:00
Daniel
2eeace1c2c Move misc.mhtml to browser.mhtml 2015-11-09 16:59:16 +01:00
Daniel
83aee4fad5 Rename on_meta_data_change to on_meta_data_changed 2015-11-09 16:59:16 +01:00
Daniel
8593144fa7 Make _path_suggestion public 2015-11-09 16:59:16 +01:00
Daniel
6b086d159d Ask for filename when none is given 2015-11-09 16:59:16 +01:00
Daniel
49a32f0041 First round of lint fixes 2015-11-09 16:59:16 +01:00
Daniel
fbe5386e56 Initial version of website downloader
Saving websites as MHTML via :download-whole

Still needs some cleanup and a "ask for save path".
2015-11-09 16:59:16 +01:00
Florian Bruhin
b59a56921e Fix crashes with downloads in a closed tab.
When a download was redirected or failed after a tab was closed, there was a
KeyError in the object registry.

Fixes #889. This is a regression introduced in
976f758da1 / #731.
2015-11-09 07:46:22 +01:00
Florian Bruhin
9dfe84c197 Accept longer URL in WebView repr before eliding.
This broke bdd tests because … was inserted in the log.
2015-11-09 07:36:10 +01:00
Florian Bruhin
9cfd96fcef Make :follow-hint take a keystring. 2015-11-09 07:35:56 +01:00
Florian Bruhin
c1c5b0f2b4 Fix prompt for download directory when turned off. 2015-11-09 07:35:03 +01:00
Florian Bruhin
95483f73d8 Add some assertions to DownloadItem.retry. 2015-11-09 07:34:49 +01:00
Florian Bruhin
612174ada0 Add a :download-retry command.
Closes #1097.
2015-11-09 07:17:54 +01:00
Florian Bruhin
da88908815 Fix deprecation warning when clearing downloads. 2015-11-06 07:02:17 +01:00
Florian Bruhin
939e95b344 Add missing decorator for qute:version. 2015-11-04 17:45:12 +01:00
Florian Bruhin
3525659b90 Fix pep8 issues. 2015-11-04 17:41:33 +01:00
Florian Bruhin
4e8cf70c10 Merge branch 'master' of https://github.com/NoctuaNivalis/qutebrowser into NoctuaNivalis-master 2015-11-04 17:19:00 +01:00
Felix Van der Jeugt
8354894838 rename the add_handler function everywhere 2015-11-04 09:49:46 +01:00
Florian Bruhin
6c20190473 Merge branch 'master' of https://github.com/forkbong/qutebrowser into forkbong-master 2015-11-04 07:12:32 +01:00
Panagiotis Ktistakis
782f09488a Deprecate :download-remove --all.
:download-clear should be used instead.
2015-11-04 01:06:39 +02:00
Felix Van der Jeugt
896ac0a7e9 fix the comments on style/typos 2015-11-03 23:15:07 +01:00
Felix Van der Jeugt
84c498b638 use global variable in place of class variable 2015-11-03 23:12:38 +01:00
Felix Van der Jeugt
0233423d9a using a class method is cleaner 2015-11-03 22:54:59 +01:00
Felix Van der Jeugt
a923572341 replace global constant with class variable and decorators 2015-11-03 22:54:59 +01:00
Florian Bruhin
85608a8b8d Make :scroll error message deterministic. 2015-11-03 22:36:08 +01:00
Panagiotis Ktistakis
7dadd97f01 Implement :download-clear command.
Fixes #1013.
2015-11-03 20:27:02 +02:00
Florian Bruhin
0fb2778e4b Merge branch 'master' of https://github.com/skinnay/qutebrowser into skinnay-master 2015-11-02 17:55:40 +01:00
Lamar Pavel
baa3bd18a0 Fix indentation 2015-11-01 20:12:57 +01:00
Lamar Pavel
37d37148b7 Add pragma comment 2015-11-01 19:49:20 +01:00
Florian Bruhin
468b2c4ade Merge branch 'test-browser-cache' of https://github.com/lamarpavel/qutebrowser into lamarpavel-test-browser-cache 2015-10-30 18:54:24 +01:00
skinnay
6125e51de3 removed whitespace 2015-10-29 14:54:54 -04:00
skinnay
5a34fdfd0c Changed the functionality of "remove-finished-downloads" setting.
Instead of being a boolean value indicating whether or not to instantly remove
downloads when they finish, it's now an integer value representing the
number of milliseconds to wait before removing downloads when they
finish. The default value, -1, means that the downloads will not be
removed when they finished. This is the same behavior as the previous
default value of false.
2015-10-29 13:44:28 -04:00
Florian Bruhin
381d857f2c Revert "Add workarounds for issues with pylint tip."
This reverts commit 1d2683993e.
This causes a bad-option-value issue with the current pylint.
2015-10-26 22:05:21 +01:00
Florian Bruhin
1d2683993e Add workarounds for issues with pylint tip. 2015-10-26 21:20:11 +01:00
Jean-Christophe Petkovich
589e8e9d05 Flexible Link Hint Filtering
I think it makes more sense to filter for any text within a link rather
than just the text at the beginning. I've been playing around with this
a little and I like it a lot better.

When using numbers as link hints, It would be awesome if the link hint
strings themselves could also be updated based on how many links are
left, but I'm still figuring out how to do this.

What do you think?
2015-10-25 21:17:48 -04:00
Lamar Pavel
da800e3fa7 Don't setMaximumCacheSize if there is no cache 2015-10-21 22:31:46 +02:00
Florian Bruhin
4dd3483aca Remove unused import. 2015-10-20 22:49:00 +02:00
Florian Bruhin
764914a8b2 Clean up cache.DiskCache. 2015-10-20 22:40:43 +02:00
Florian Bruhin
82dfec6a18 Merge branch 'templatemagic' of https://github.com/neeasade/qutebrowser into neeasade-templatemagic 2015-10-18 18:20:41 +02:00
Florian Bruhin
c8346a11fc Merge branch 'jinja' of https://github.com/meles5/qutebrowser into meles5-jinja 2015-10-17 19:04:36 +02:00
meles5
ff4c002096 A few changes 2015-10-17 17:33:05 +02:00
Nathan Isom
6391da4f6f Forgot font changes. 2015-10-16 12:02:57 -05:00
Nathan Isom
2a11adc8ac initial replace pass. 2015-10-16 10:52:02 -05:00
Florian Bruhin
91ce3ed672 Merge branch 'url-color' of https://github.com/neeasade/qutebrowser into neeasade-url-color 2015-10-15 18:32:47 +02:00
Nathan Isom
4876bdf7ce style. 2015-10-14 13:34:41 -05:00
Nathan Isom
e78b00cce2 Fix configdata.py typos, use scheme from url. 2015-10-14 13:22:28 -05:00
Nathan Isom
d7d4c232d0 Initial shot at issue #691 2015-10-14 13:10:24 -05:00
Florian Bruhin
4f2dbb3a72 Don't show icons when cloning tabs if turned off.
Fixes #1007.
2015-10-10 12:48:45 +02:00
Florian Bruhin
749d7bfc3c Add backticks to docs. 2015-10-08 10:47:36 +02:00
Peter Michely
bfccb91e42 Changed code and docs according to comments 2015-10-08 10:13:47 +02:00
Florian Bruhin
b6f3b1951e Remove more dead code. 2015-10-04 22:21:49 +02:00
Florian Bruhin
005753e83e Remove some dead code.
See #973.
2015-10-04 20:43:29 +02:00
Florian Bruhin
7ff881c3e3 Merge branch 'incdec-setting' of https://github.com/Kingdread/qutebrowser into Kingdread-incdec-setting 2015-10-04 17:04:40 +02:00
Florian Bruhin
d229e90724 Fix some splelling mistakes. 2015-10-04 15:41:42 +02:00
Daniel
4881d81444 Add new configtype: FlagList
This class contains validation code shared by ConfirmQuit and
URLSegmentList, that is it checks for duplicate values and compares
each value to valid_values.
2015-10-01 00:40:21 +02:00
Daniel
1bdb012b2c Add a config option for navigate_incdec
Also known as Ctrl-A/Ctrl-X. You can now specify which parts of the URL
should be searched for numbers.

The setting is general->url-incdec-segments and it's a set with valid
values of 'host', 'path', 'query' and 'anchor'.
2015-09-30 19:18:00 +02:00
Florian Bruhin
11961db72c Add maxlen argument to ErrorNetworkReply.readData.
This was missing before, causing a (hidden) exception with Python < 3.5, and
this with 3.5:

    TypeError: readData() takes 1 positional argument but 2 were given

    During handling of the above exception, another exception occurred:

    SystemError: PyEval_EvalFrameEx returned a result with an error set

Fixes #969.
2015-09-29 08:41:20 +02:00
meles5
8bcc0e4b92 filescheme.py & dirbrowser.html updated 2015-09-25 14:49:03 +02:00
Florian Bruhin
841e8fbbd1 Save search parameters in tabbed_browser. 2015-09-18 07:01:51 +02:00
Florian Bruhin
f62bf099a0 Also re-highlight text when restarting search. 2015-09-18 06:58:05 +02:00
Florian Bruhin
72cddb290b Cleanups 2015-09-18 06:55:17 +02:00
Martin Tournoij
a80c61e78a Use a single search term per-window
Previously, every tab had its own search term. This sets single search term per
window. using `/hello`, `gt`, and `n` will search for `hello` in the 2nd tab.

This fixes issue #940
2015-09-18 02:18:54 +02:00
Florian Bruhin
ee2b9adce4 Move checking if an URL is blocked to adblock.py. 2015-09-17 06:46:27 +02:00
Florian Bruhin
a589ddab4a Merge branch 'whitelist-hosts' of https://github.com/Kingdread/qutebrowser into Kingdread-whitelist-hosts 2015-09-17 06:37:44 +02:00
Florian Bruhin
d5baed5e83 Merge branch 'cookies_tests' of https://github.com/acogneau/qutebrowser into acogneau-cookies_tests 2015-09-16 22:58:28 +02:00
Florian Bruhin
7eca4acb6a Ignore first QWheelEvent for webview.
Hopefully fixes #395.
2015-09-16 20:07:18 +02:00
Daniel
dd679c6c14 Fix is_whitelisted_domain docstring 2015-09-16 17:16:35 +02:00
Daniel
fc806525a2 Move whitelist host code to networkmanager
This means no :adblock-update after modifying the whitelist.
2015-09-16 17:10:03 +02:00
Daniel
523e071a97 Stylistic changes to is_whitelisted_domain 2015-09-16 17:04:19 +02:00
Daniel
ccdb59cce1 Add adblock host whitelisting
The config option "content host-blocking-whitelist" may contain comma
separated domains that are exempt from host blocking.

The listed domains may contain the wildcards "*" and "?" to match many
and one character, respectively.

You need to run :adblock-update after modifying the list.
2015-09-16 16:31:17 +02:00
Alexander Cogneau
d36c701b07 Fixed comments 2015-09-04 11:44:59 +02:00
Alexander Cogneau
96e3a0b1f1 first cookie tests 2015-09-03 17:24:01 +02:00
Florian Bruhin
79c1867e6c Don't save cookies when starting in private mode.
Whoops... :(

Fixes #903.
2015-08-30 23:17:48 +02:00
Florian Bruhin
4891fe9457 Always expand ~ when starting scripts. 2015-08-27 20:30:41 +02:00
Florian Bruhin
6d8854bc07 Simplify usage of tabhistory.TabHistoryItem. 2015-08-23 18:16:19 +02:00
Florian Bruhin
d3d999e041 Show a confirmation when adding bookmarks. 2015-08-18 19:03:46 +02:00
Florian Bruhin
7ce78bb560 networkreply: Add is{Running,Finished} methods. 2015-08-17 07:15:55 +02:00
Florian Bruhin
d94c1736db Use a proper file:// URL for dirbrowser icons. 2015-08-16 19:04:54 +02:00
Florian Bruhin
97a9255400 Don't import function in filescheme. 2015-08-16 18:52:54 +02:00
Florian Bruhin
fb1cffd158 Merge branch 'feature/directory-browser' of git://github.com/antoyo/qutebrowser into dirbrowser 2015-08-16 18:27:05 +02:00
Antoni Boucher
149ca68853 Renamed setReferer to set_referer. 2015-08-14 08:24:13 -04:00
Florian Bruhin
11502b7942 signalfilter: Remove annoying type check. 2015-08-14 06:43:23 +02:00
Antoni Boucher
abeb7e3390 Fixed issues. 2015-08-13 19:54:23 -04:00
Antoni Boucher
814841200a Fixes issues. 2015-08-12 17:24:01 -04:00
Antoni Boucher
77190554cc Merge branch 'master' into feature/directory-browser 2015-08-12 16:57:45 -04:00
Florian Bruhin
44f8cf4b1a Move :tab-focus documentation. 2015-08-11 22:01:18 +02:00
Thorsten Wißmann
da6d12a657 Make tab-focus (bound to gt) behave as in VIM
If no count or index is given, tab-focus switches to the next tab (using
tab-next internally). So the keychain gt behaves as gt in vim:

  - gt focuses the next tab
  - 1gt focuses the first tab
  - <n>gt (e.g. 5gt) focuses the n'th (e.g. fith) tab
2015-08-11 10:50:27 +02:00
Florian Bruhin
c8679d6544 100% coverage for browser.webelem. 2015-08-10 19:37:16 +02:00
Florian Bruhin
aed915b1ec Handle invalid URLs when checking for same domain.
The old code only checked whether current_url is invalid, but the request URL
can be invalid as well, e.g. on http://www.playstation.com/

/cc @Carpetsmoker
2015-08-09 18:52:11 +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
Antoni Boucher
052d18147e Added permission check. 2015-08-09 11:29:18 -04:00
Antoni Boucher
0896d7a8b3 Fixed file scheme handler. 2015-08-08 19:45:00 -04:00
Antoni Boucher
14ae308279 Added a file:// scheme. 2015-08-08 15:16:48 -04:00
Antoni Boucher
7e20d77bdf Switch to SVG file and tango theme. 2015-08-08 14:43:55 -04:00
Antoni Boucher
2969599390 Use toLocalFile function instead of slicing. 2015-08-08 14:13:09 -04:00
Antoni Boucher
e6521b047d Added get_file_list function and tests. 2015-08-08 14:10:27 -04:00
Antoni Boucher
b8809f879d Added resource_filename function and tests. 2015-08-08 13:47:47 -04:00
Antoni Boucher
ec5049f801 Renamed url to urlstring. 2015-08-08 13:32:04 -04:00
Antoni Boucher
2be0743378 Added images. 2015-08-07 23:28:24 -04:00
Antoni Boucher
fedf9d9c72 Replaced tuple by dict. 2015-08-07 22:45:54 -04:00
Antoni Boucher
4c1ed35390 Removed .. when in root folder. 2015-08-07 22:45:42 -04:00
Antoni Boucher
c8d3fc57c2 First version of directory browser. 2015-08-07 21:57:19 -04:00
Daniel
c4c3a83ac0 rename url_incdec_number to incdec_number 2015-08-08 00:57:16 +02:00
Daniel
276b163e0d Move logic from _navigate_incdec to urlutils
Also add unittests for url_incdec_number
2015-08-07 18:48:07 +02:00
Daniel
0f3aa0bd8c Ctrl-A only increments number in path segment
This prevents a host like "myfoo42.bar" changing to "myfoo43.bar" when
pressing Ctrl-A. It further prevents increasing the port number, e.g.
going from "foo.bar:8080" to "foo.bar:8081".
2015-08-07 17:21:18 +02:00
Florian Bruhin
9c6782be1d downloads: Fix size calculation with unknown size.
Fixes #854.
2015-08-06 21:00:36 +02:00
Florian Bruhin
36adaf0cf3 Simplify argument handling for DownloadManager. 2015-08-06 20:41:57 +02:00
Florian Bruhin
5fca27ad02 Fix :adblock-update. 2015-08-06 20:38:51 +02:00
Florian Bruhin
46f3be2df7 Add rapid hinting for downloads. 2015-08-06 19:09:21 +02:00
Florian Bruhin
a34fa93f62 Wrap long lines. 2015-08-06 18:50:32 +02:00
Alexander Cogneau
8ffe73cc5f Change 'prompt-download-location' setting to 'prompt-download-directory' 2015-08-06 16:44:58 +02:00
Alexander Cogneau
9a85b66452 Merge remote-tracking branch 'upstream/master' 2015-08-06 16:40:48 +02:00
Alexander Cogneau
e43a1e6444 Added config option for prompting the user for a download location. 2015-08-04 16:30:55 +02:00
Florian Bruhin
93d27cbb5f Escape 0x00 in javascript_escape().
This is needed in older PyQt-versions.
2015-08-04 12:42:49 +02:00
Florian Bruhin
43266ac08a webelem: Add more tests. 2015-08-03 23:40:39 +02:00
Florian Bruhin
ed4fc4d1ba webelem: Escape \r in javascript_escape(). 2015-08-03 23:22:23 +02:00
Florian Bruhin
8011cefea6 webelem: Check if elem is writable with roles. 2015-08-03 23:21:45 +02:00
Florian Bruhin
0330adf284 Filter links for :navigate. 2015-08-03 23:21:20 +02:00
Florian Bruhin
21a60f06c0 webelem: Add <link> element to all/prevnext. 2015-08-03 23:17:54 +02:00
Florian Bruhin
c6a5731560 webelem: Check for vanished elem in is_text_input. 2015-08-02 23:49:22 +02:00
Florian Bruhin
3d9e4817f2 webelem: Fix return value for is_editable(). 2015-08-02 23:49:12 +02:00
Florian Bruhin
5c58641c81 Fix WebElementWrapper.__delitem__. 2015-08-02 23:47:35 +02:00
Florian Bruhin
b850df090b Add branch coverage workaround for coverage.py bug. 2015-08-02 23:47:22 +02:00
Florian Bruhin
2c7dd5c60c rfc6266: Simplify ContentDisposition. 2015-08-02 19:48:31 +02:00
Florian Bruhin
aaf90d0fe3 Simplify RFC6266 error handling. 2015-08-02 18:09:01 +02:00
Florian Bruhin
cd7c3ec3a4 Fix docstring for http module. 2015-08-02 17:20:21 +02:00
Florian Bruhin
b4a695d5b8 Strip trailing slash when getting path from URL. 2015-08-02 17:18:59 +02:00
Florian Bruhin
2bd36e21f1 Merge branch 'download-cpu-2' 2015-08-01 14:57:47 +02:00
Florian Bruhin
8314f7f93c Fix referer handling with generic download NAMs.
This broke e.g. :adblock-update as tab_id for those is set to None.
2015-08-01 14:54:46 +02:00
Florian Bruhin
d6585202fd Remember the last used download directory.
Thanks to @Carpetsmoker for the original PR.

Closes #745.
Closes #37.
2015-08-01 14:19:06 +02:00
Florian Bruhin
52d7a5693f Fix lint. 2015-08-01 13:47:42 +02:00
Florian Bruhin
44d109ca92 Save referer-header setting. 2015-08-01 13:32:11 +02:00
Florian Bruhin
976f758da1 Fix getting of the current URL. 2015-08-01 13:29:25 +02:00
Florian Bruhin
27f65be860 Merge branch 'referer-header' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-referer-header
Conflicts:
      tests/utils/test_urlutils.py
2015-08-01 12:44:57 +02:00
Florian Bruhin
c016e8a4cf Improve error handling for quick-/bookmarks. 2015-07-29 12:34:53 +02:00
Florian Bruhin
093b3cba25 Add a bookmark-del command. 2015-07-26 21:05:32 +02:00
Florian Bruhin
0acd1b8dc8 Use urlutils.fuzzy_url for loading bookmarks. 2015-07-26 18:52:15 +02:00
Florian Bruhin
2f11b41ae6 Merge bookmarks and quickmarks into urlmarks. 2015-07-26 16:37:10 +02:00
Florian Bruhin
b52a41ac6f Merge branch 'master' of https://github.com/antoyo/qutebrowser into antoyo-master
Conflicts:
      .gitignore
2015-07-26 15:08:58 +02:00
Florian Bruhin
b670c45381 Fix typo. 2015-07-20 11:23:43 +02:00
Florian Bruhin
0972087e34 Add a note about #730 to :inspect docs.
Fixes #730.
2015-07-16 20:54:10 +02:00
Florian Bruhin
704c5ff919 Make :yank-selected work in all modes. 2015-07-16 13:57:53 +02:00
Florian Bruhin
63ff39ad65 Don't use 0 as window ID for early messages.
The issue here was that only message calls with 'current' as window get cached
if the window is unavailable. We used 0 instead.

Fixes #815.
See #812.
2015-07-14 18:36:12 +02:00
Antoni Boucher
5dbaea7a83 Fixed empty title. 2015-07-11 20:28:31 -04:00
Antoni Boucher
1e354a797e Removed useless checks. 2015-07-11 19:56:51 -04:00
Antoni Boucher
5e8129788a Removed try/except. 2015-07-11 19:48:46 -04:00
Antoni Boucher
96a2178a25 Renamed bookmark_del to delete in bookmark manager. 2015-07-11 19:23:21 -04:00
Antoni Boucher
4bc2f63608 Renamed bookmark_add to add in bookmark manager. 2015-07-11 19:18:45 -04:00
Antoni Boucher
fe829699be Merge remote-tracking branch 'upstream/master' 2015-07-11 17:40:43 -04:00
Florian Bruhin
47d5262cd9 Abort scrolling wen reaching min/max position.
Fixes #801.
2015-07-06 15:13:18 +02:00
Florian Bruhin
4cef4012e5 Catch OSError when loading qute:help.
Fixes #763.
2015-07-02 22:08:41 +02:00
Florian Bruhin
4bddcd4c1a Remove (y/N) suffix from download questions. 2015-07-02 20:57:23 +02:00
Florian Bruhin
dc29ad430e Change how lines are split. 2015-07-02 20:51:51 +02:00
Florian Bruhin
d44f14063a Merge branch 'save-fifo' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-save-fifo 2015-07-02 19:16:04 +02:00
Martin Tournoij
2c5898b9f7 Rename variable to fix pylint warning:
https://travis-ci.org/The-Compiler/qutebrowser/jobs/68949925

	************* Module qutebrowser.browser.downloads
	W:299,36: Redefining name 'message' from outer scope (line 39) (redefined-outer-name)
2015-06-30 13:22:20 +02:00
Martin Tournoij
c7cd51a7d5 "Fix" silly pep8 warnings 2015-06-30 12:01:05 +02:00
Florian Bruhin
7b8490b6c0 Fix 'an user' spelling. 2015-06-29 17:49:19 +02:00
Martin Tournoij
d114e64b05 Ask question instead of aborting 2015-06-27 22:28:06 +02:00
Martin Tournoij
26664ba644 Merge branch 'master' into save-fifo 2015-06-27 22:23:47 +02:00
Martin Tournoij
a346644c71 Changed:
- same_domain: If the tld is unknown, only return True if the hostnames are the same
- Fix when starting without an open page
2015-06-27 21:15:54 +02:00
Martin Tournoij
f806eefba6 Merge branch 'master' into referer-header 2015-06-27 20:43:54 +02:00
Florian Bruhin
4652843b38 Move command-related zoom logic out of WebView.
After f8d66f3fe1 loading a session showed the
zoom percentage of all tabs.

This logic doesn't really belong into webview.py anyways, so it gets moved to
browser/commands.py here.
2015-06-24 23:06:55 +02:00
Martin Tournoij
f8d66f3fe1 Use zoom_perc instead of setZoomFactor to set zoom.
When using setZoomFactor, the NeighborList's fuzzyval doesn't get updated,
which means the next -/+ press would do something weird.
2015-06-24 18:16:59 +02:00