Commit Graph

947 Commits

Author SHA1 Message Date
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
Florian Bruhin
e459ac52cc Use existing selection when entering caret mode. 2015-06-20 13:09:00 +02:00
Florian Bruhin
5cf1dce89e Simplify condition and add comment. 2015-06-20 13:07:51 +02:00
Artur Shaik
94d394001e Don't position caret if there is selection on page 2015-06-20 12:47:46 +02:00
Florian Bruhin
c64d9520ff Fix lint.
Thanks to @Carpetsmoker for spotting this in #705.
2015-06-18 08:10:14 +02:00
Florian Bruhin
59cdbd780c Fix {url} substitution with :spawn.
See #759.

This is a regression introduced in 6dbdea0ee3.
2015-06-18 07:01:30 +02:00
Florian Bruhin
6dbdea0ee3 Set maxsplit=0 for :spawn and split manually.
Fixes #759.
2015-06-17 07:57:38 +02:00
Florian Bruhin
0119cf510f Fix loading of _temp_history. 2015-06-16 07:16:02 +02:00
Florian Bruhin
a545b919f7 Do history loading after qutebrowser has started. 2015-06-16 07:06:56 +02:00
Florian Bruhin
f17131f6c2 Change Qt links to point to qt.io. 2015-06-12 16:59:33 +02:00
Florian Bruhin
efcea65596 Add --quiet argument to :jseval. 2015-06-12 11:24:04 +02:00
Florian Bruhin
8ecc3a3bb0 Fix lint. 2015-06-12 11:22:37 +02:00
Florian Bruhin
ea1921defd Merge branch 'jseval' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-jseval 2015-06-12 11:21:10 +02:00
Florian Bruhin
d3b727d0c7 Fix lint. 2015-06-11 20:32:27 +02:00
Florian Bruhin
5828bbafe9 Add -v (not -q) to :spawn and make it work with -u. 2015-06-11 20:30:37 +02:00
Florian Bruhin
84dacc9bc8 Remove double output for :spawn. 2015-06-11 20:30:37 +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
1a9bc64776 Display an error on non-zero :spawn exit. 2015-06-11 20:28:05 +02:00
Florian Bruhin
231f1d90ce Add a -d/--detach argument to :spawn. 2015-06-11 20:28:05 +02:00
Florian Bruhin
17bb9fc21c Use QProcess instead of subprocess.
Closes #646.
Fixes #688.
2015-06-11 20:28:04 +02:00
Florian Bruhin
ab27612139 Merge branch 'more-color-settings' of https://github.com/ProtractorNinja/qutebrowser into ProtractorNinja-more-color-settings 2015-06-10 20:05:23 +02:00
Martin Tournoij
9df5a89037 Don't crash when trying to save to a FIFO or other special file
When giving the path to a FIFO or other special file qutebrowser would
completely hang, and has to be killed.

Tested:

- Asks for overwrite: file, symlink to file
- Saves in dir: dir, symlink to dir
- Aborts: block dev, char dev, fifo, socket, and a symlink to all of these
2015-06-08 22:42:06 +02:00
Florian Bruhin
b6349437f7 Fix broken check for changing js on qute:settings.
See #727.
2015-06-08 20:29:55 +02:00
Antoni Boucher
c2eabb13b0 Fixed style. 2015-06-07 20:25:04 -04:00
Antoni Boucher
31eed6c9a6 Fixed to avoid having duplicate bookmarks. 2015-06-07 20:16:45 -04:00
Antoni Boucher
d93732a6b3 Fixed to use 'bookmarks/urls' file instead of bookmarks. 2015-06-07 20:04:42 -04:00
Antoni Boucher
c4fc5c0c43 Fixed to use the title "(null)" when the page does not have any title. 2015-06-07 19:51:46 -04:00
Florian Bruhin
1e5e6a63a5 Batch download redrawings/updates. 2015-06-07 22:22:23 +02:00
Florian Bruhin
90b3927906 Merge branch 'downloads-cpu' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-downloads-cpu 2015-06-07 21:51:18 +02:00
Florian Bruhin
2ff6dbd482 Remove unused import. 2015-06-07 21:44:45 +02:00
Florian Bruhin
f85ca19cef Use <noscript> tag for qute:settings without JS.
There was already a noscript tag, this just removes the special check and makes
it a bit more obvious.

See #727.
2015-06-07 21:38:44 +02:00
Antoni Boucher
cf4b89efe3 Merge remote-tracking branch 'upstream/master' 2015-06-07 14:38:17 -04:00
Martin Tournoij
2fa6c952c2 Use less CPU when downloading files
When downloading a bunch (7 or 8) of files I noticed qutebrowser was using a lot
of CPU (>60%).

I did some looking, and in the `downloadProgress` callback qutebrower emits the
updated signal which causes everything to be updated. We don't really need this,
since _update_speed() calls it every 500ms anyway.

I tested by downloading 3 copies of the 1GB file [on this
page]( http://www.thinkbroadband.com/download.html ) qutebrowser consistently
pulls about 25% CPU on my system.

When removing this call, the system pulls about 17% CPU. Not a great amount, but
still significant enough to warrant a pull request ;-)

Some other notes:

- wget uses about 1.5%-2% for each process when downloading.
- When not doing any UI updates & speed calculations qutebrowser uses about 15%.
- Doing some quick profiling and strategic commenting seems to indicate there
  isn't any other low hanging fruit to be improved on here.
2015-06-07 17:15:04 +02:00
Florian Bruhin
a82b0d007d Enforce a Qt with SSL support. 2015-06-07 10:47:28 +02:00
Florian Bruhin
def41e70bf Fix some spelling mistakes. 2015-06-07 01:24:02 +02:00
Martin Tournoij
b0880df695 Execute in the current tab, and not the first one 2015-06-05 23:29:38 +02:00
Martin Tournoij
94178c558a Well, getting the error doesn't work... 2015-06-05 20:09:19 +02:00
Martin Tournoij
463e85ff5d Add referer-header setting, #712 2015-06-05 18:00:21 +02:00
Florian Bruhin
728f06e797 Close context menu if another mode was entered.
Fixes #735.
2015-06-05 11:15:22 +02:00
Martin Tournoij
d60d4d756c Also yank port number 2015-06-04 13:20:39 +02:00
Martin Tournoij
0132bea42b Add --domain to yank to yank only the domain
... As I want to copy only the domain fairly frequently.

I also changed the message in the statusline to show the actual text being
copied, which I find helpful. But if you disagree, then just undo it (it's not
that important or anything).
2015-06-04 12:20:43 +02:00
Martin Tournoij
78e159cb27 Add referer-header settng, #712 2015-06-04 01:26:00 +02:00
Martin Tournoij
85eea17b18 Try to get the error ... not sure about this ...
source is undefined when you type stuff in the console, I *think* this is the
only scenario? But maybe not?

<script>
setInterval(function() {
	if (window.__qute_jseval__) {
		throw new Error('jseval hack failed. Sorry :-( ' + window.__qute_jseval__);
	}
}, 1);
</script>
2015-06-03 22:31:15 +02:00
Florian Bruhin
e780efb3d9 Handle javascript in qute:settings more gracefully.
Fixes #727.
2015-06-03 15:03:04 +02:00
Austin Anderson
4d141f489f Added pylint workaround directive to quash rebellion. 2015-06-03 08:42:13 -04:00
Florian Bruhin
36803cba06 Switch from flake8 to pytest-{mccabe,flakes,pep8}. 2015-06-02 20:51:06 +02:00
Antoni Boucher
9582162927 Fixed bookmarks command names. 2015-06-01 17:52:23 -04:00
Florian Bruhin
1bf036d1ba Add setting for the webpage bg color to use.
Fixes #719.
2015-06-01 22:27:15 +02:00
Antoni Boucher
1698c60124 Merge remote-tracking branch 'upstream/master' 2015-05-31 15:59:46 -04:00
Florian Bruhin
e7619477cd Rename _frame argument to frame.
_foo is used to denote unused arguments, so renaming this as it's now used.
2015-05-31 21:40:19 +02:00
Florian Bruhin
018d7a87be Merge branch 'modal-js-dialogs' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-modal-js-dialogs 2015-05-31 21:39:47 +02:00
Martin Tournoij
4204a8de9a Add ui.modal-js-dialog to restore the default JS dialogs 2015-05-31 21:32:16 +02:00
Florian Bruhin
4c8b1be19c Merge branch 'issue-401' of https://github.com/antoyo/qutebrowser into antoyo-issue-401 2015-05-31 19:46:17 +02:00
Antoni Boucher
3d0721afea Fixed error messages. 2015-05-31 12:56:08 -04:00
Antoni Boucher
27cbe618f0 Added hasSelection check before trying to click on a selected link. 2015-05-31 12:53:14 -04:00
Antoni Boucher
c0b6aef774 Fixed command name. 2015-05-31 12:50:28 -04:00
Antoni Boucher
d0eda3336c Added a page variable. 2015-05-31 12:18:27 -04:00
Antoni Boucher
1cd64481de Fixed for relative url. 2015-05-31 12:13:37 -04:00
Antoni Boucher
87e9888167 Added exception handling for href attribute. 2015-05-31 12:07:08 -04:00
Antoni Boucher
c5c145320c Fixed exception handling in select_follow command. 2015-05-31 12:02:15 -04:00
Antoni Boucher
4ff9d585ea Fixed to use qualified import. 2015-05-31 11:56:27 -04:00
Florian Bruhin
54c1cd7c05 Add link to issue. 2015-05-31 15:11:37 +02:00