Commit Graph

947 Commits

Author SHA1 Message Date
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
Florian Bruhin
6b550defae scroll-page: Add custom metavar for navigate-*. 2015-05-31 15:10:35 +02:00
Florian Bruhin
11b258568d Improve docstring. 2015-05-31 15:02:09 +02:00
Florian Bruhin
5b3ffa2419 Merge branch 'scroll_page_navigate' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-scroll_page_navigate 2015-05-31 14:59:22 +02:00
Antoni Boucher
b1f8a70c02 Added try/except for parse error. 2015-05-30 18:03:39 -04:00
Florian Bruhin
3879b8301f Remove unneeded int().
See #706.
2015-05-30 22:51:00 +02:00
Martin Tournoij
4dc54f881c Give a better error when wrapping on search
Previously, it just said "Text not found" when you hit the bottom.
2015-05-30 22:07:32 +02:00
Austin Anderson
b59dc8e89b Merge branch 'master' into more-color-settings 2015-05-30 15:56:11 -04:00
Austin Anderson
7b5d2ace24 Added assertion for parameterized download color picker. 2015-05-30 15:21:34 -04:00
Antoni Boucher
989e3b7291 Added a fallback for when JavaScript is disabled. 2015-05-30 13:56:36 -04:00
Antoni Boucher
a56a14fb70 Added the possibility to open a selected link in a new tab. 2015-05-30 13:15:53 -04:00
Antoni Boucher
6ca541d359 Fixed issue #401. 2015-05-30 10:37:25 -04:00
Martin Tournoij
70956aaeca oops 2015-05-29 23:57:57 +02:00
Martin Tournoij
9c99c22f1b Fix issue #701 2015-05-29 23:49:48 +02:00
Martin Tournoij
8c80f99a32 Improve navigate option to scroll_page() 2015-05-29 21:18:44 +02:00
Martin Tournoij
c7dcaff025 Add navigate option to scroll_page()
So you can scroll down & navigate when you're at the bottom.

To bind this to space:

	scroll-page 0 1 next
		<Space>

Not sure if it's a good idea to bind this by default? May surprise some
people...

See #696
2015-05-29 18:35:15 +02:00
Austin Anderson
a8d2dbfdfb Added downloads bar fg customization, and refactored the download's color-picking. 2015-05-25 20:47:16 -04:00
Florian Bruhin
a345b02729 Fix exception when downloading links without name.
We also set a default name to prevent "is a directory" errors.

This is a regression introduced in 8f33fcfc52cf598d0aa11a347992c87010d3e37a.
Fixes #682.
2015-05-25 11:28:50 +02:00
Antoni Boucher
ece32e930c Added bookmarks command. 2015-05-24 19:18:40 -04:00
Antoni Boucher
aaf35536a7 Removed unused commands and renamed bookmark-save command. 2015-05-23 16:02:02 -04:00
Antoni Boucher
2c0c2e220e Fixed style issue. 2015-05-21 19:38:30 -04:00
Antoni Boucher
28caf45707 First version of bookmarks. 2015-05-21 18:17:22 -04:00
Florian Bruhin
269676318b urlutils: Raise exception on errors in host_tuple. 2015-05-20 13:36:40 +02:00
Florian Bruhin
03e59051dc Remove count for move-to-end-of-line. 2015-05-18 22:32:17 +02:00
Florian Bruhin
91ad91cc7b Spelling fixes. 2015-05-18 22:27:44 +02:00
Florian Bruhin
8941b5dc96 Merge branch 'visual' 2015-05-18 21:43:25 +02:00
Florian Bruhin
8eb483d66b Set Qt.ItemNeverHasChildren for leaf model items.
This allows Qt to do some optimizations.
2015-05-18 21:35:14 +02:00
Florian Bruhin
dd292b0781 Don't depend on objreg for CommandDispatcher.
See #640.
2015-05-18 21:34:00 +02:00
Florian Bruhin
b60f673468 Fix @pyqtSlot signature for on_config_changed. 2015-05-17 14:14:23 +02:00
Florian Bruhin
7fc99f3d80 adblock: Don't show message with --basedir given. 2015-05-17 01:09:33 +02:00
Florian Bruhin
c762340a0c Add --datadir/--cachedir arguments. Closes #136. 2015-05-16 22:12:27 +02:00
Florian Bruhin
9b372de4a9 Use fake-key scrolling for :scroll-perc 0/100. 2015-05-16 15:51:41 +02:00
Florian Bruhin
e3bfe73442 Fix :scroll-page. 2015-05-15 21:32:42 +02:00
Florian Bruhin
f49dba6e38 Use fake key events for scrolling.
Closes #669.
Fixes #218.

See #246, #534.
2015-05-15 19:02:33 +02:00
Florian Bruhin
17fc6622bb Strip NUL bytes when loading history.
This is a workaround so people can start qutebrowser again, but the real bug
should be found and fixed...

See #670.
2015-05-13 23:46:22 +02:00
Florian Bruhin
222627b08d Clean up caret initialisation. 2015-05-13 22:25:21 +02:00
Florian Bruhin
a728704cce toggle-selection cleanup 2015-05-13 21:52:42 +02:00
Florian Bruhin
f59a147589 Leave mode when yanking by default.
See #653.
2015-05-13 07:58:33 +02:00
Florian Bruhin
88fc186402 Add tmux-like Enter binding.
See #653.
2015-05-13 07:29:59 +02:00
Florian Bruhin
ce1b82616d Fix spelling. 2015-05-13 07:29:59 +02:00
Florian Bruhin
54ae6a63ee Fix lint. 2015-05-12 17:58:53 +02:00
Florian Bruhin
418934644b Improve docstrings. 2015-05-11 22:29:44 +02:00
Florian Bruhin
a36c0fcd4c Fix lint. 2015-05-11 20:32:27 +02:00
Florian Bruhin
6f620a6a9e Handle title correctly for pages without title.
Fixes #667.
2015-05-11 19:11:49 +02:00
Artur Shaik
57cad14714 Move JS snippet in external js file. 2015-05-07 12:41:02 +06:00
Artur Shaik
d936be450b Add jumps through text blocks in caret mode. 2015-05-07 12:19:35 +06:00
Artur Shaik
178d0dfa58 Add count for actions. Zero key treat as command. 2015-05-07 11:51:10 +06:00
Florian Bruhin
564a589bc6 Fix indent. 2015-05-06 23:36:01 +02:00
Florian Bruhin
9ceb43ec44 Make F (:hint tab) honour background-tabs.
Fixes #621.
2015-05-06 23:25:42 +02:00
Florian Bruhin
98596d439f Emit ClickTarget from HintManager.start_hinting.
This is much clearer than transmitting a string which must match the
ClickTarget enum.
2015-05-06 23:17:23 +02:00
Florian Bruhin
2f0b976bca Leave and re-enter hint mode when double-hinting.
See #613.
2015-05-06 22:38:08 +02:00
Florian Bruhin
9a5839650c Allow 'yes' value for geolocation/notifications.
Fixes #655.
2015-05-06 22:21:11 +02:00
Florian Bruhin
024549e3b0 Use a namedtuple for authentication prompts. 2015-05-06 11:05:17 +02:00
Florian Bruhin
842c69dfdd Cache proxy authentication credentials. 2015-05-06 10:46:42 +02:00
Artur Shaik
489c913e58 Implement caret selection and positioning
Added option to webview for selection enabled caret mode.
In status bar checking value of this option to identificate about it.

Added bindings: <Space> for toggle selection mode, <Ctrl+Space> drop
selection and keep selection mode enabled.

In webview added javascript snippet to position caret at top of the
viewport after caret enabling. This code mostly was taken from cVim sources.
2015-05-05 12:21:48 +06:00
Florian Bruhin
32562c6878 Fix lint. 2015-04-28 16:50:42 +02:00
Florian Bruhin
9e8c781871 Use clearFocus/setFocus as workaround. 2015-04-28 16:12:23 +02:00
Florian Bruhin
640f758605 Merge branch 'master' into visual
Conflicts:
	qutebrowser/browser/commands.py
2015-04-28 15:54:26 +02:00
Florian Bruhin
e1f2259e98 Fix typo. 2015-04-22 07:46:01 +02:00
Florian Bruhin
c21ae0b651 Add a :debug-webaction command. 2015-04-22 07:13:56 +02:00
Florian Bruhin
6c8e073dc8 Merge branch 'caret_visual_mode' of https://github.com/artur-shaik/qutebrowser into visual
Conflicts:
      qutebrowser/browser/commands.py
      qutebrowser/browser/webview.py
      qutebrowser/config/configdata.py
2015-04-21 21:29:00 +02:00
Florian Bruhin
9ee74253e4 Remove name annotation for cmdutils.register.
See #637.
2015-04-20 22:25:27 +02:00
Florian Bruhin
b805f903c9 Fix lint. 2015-04-20 20:50:51 +02:00
Florian Bruhin
f7cf33b596 Remember web inspector geometry in state file. 2015-04-20 20:40:03 +02:00
Florian Bruhin
7439586334 Move special params to cmdutils.register decorator
See #637.
2015-04-20 19:33:05 +02:00
Florian Bruhin
8f1b074595 Show commandline being executed with :spawn.
Closes #616.
2015-04-20 18:44:58 +02:00
Florian Bruhin
f93eef848c Store QUTE_TEXT/QUTE_HTML in files for userscripts.
Fixes #644.
2015-04-20 07:50:47 +02:00
Florian Bruhin
38d34e1dea Fix deprecation message for :cancel-download. 2015-04-17 14:33:45 +02:00
Florian Bruhin
4436941d97 Clean up unused imports. 2015-04-17 08:00:56 +02:00
Florian Bruhin
006b7716c8 Move WebPage init out from QWebView's __init__. 2015-04-17 08:00:15 +02:00
Florian Bruhin
ffd1e673b3 Get rid of SearchRunner.
A SearchRunner was per-mainwindow, which caused bugs when searching in a tab
and in another before clearing the search.

Instead we now split it between WebView/CommandDispatcher.

Fixes #638.
2015-04-17 07:51:21 +02:00
Florian Bruhin
71ffe8f656 Use config.get() for qute:settings.
Fixes #628.
2015-04-16 22:20:38 +02:00
Florian Bruhin
f313bcaf13 Fix for cache never being saved.
This is a regression introduced in 76c5c8bf8e.
See #43.
2015-04-15 06:54:55 +02:00
Florian Bruhin
9381aac501 Merge {Pastebin,PyPIVersion}Client into HTTPClient. 2015-04-13 20:42:28 +02:00
Artur Shaik
e603d9a2d0 Slight modify of autofocus caret
Make mouseclick event point slightly down.
Add commented tries of more reliable methods of caret focusing.
2015-04-13 19:55:45 +06:00
Florian Bruhin
e294e325f0 Ignore invalid history entries on start. 2015-04-10 06:40:48 +02:00
Artur Shaik
695712e50c Basic caret and visual modes implementation
Allow user switch in caret mode for browsing with caret, and visual mode
for select and yank text with keyboard.

Default keybindings is c or v for caret mode, and again v for visual mode. All
basic movements provided by WebAction enum implemened with vim-like
bindings. Yanking with y and Y for selection and clipboard respectively.

There is bug/feature in WebKit that after caret enabled, caret doesn't
show until mouse click (or sometimes Tab helps). So I add some workaround
for that with mouse event. I think should be better aproach.

Signed-off-by: Artur Shaik <ashaihullin@gmail.com>
2015-04-09 22:55:42 +06:00
Florian Bruhin
7160a89cb9 Fix NameError in hints.py. 2015-04-09 17:47:09 +02:00
Florian Bruhin
2d8df76609 Add $QUTE_HTML and $QUTE_TEXT for userscripts. 2015-04-09 17:45:16 +02:00
Florian Bruhin
2876ba5cfa Pass a parent to global QObjects. 2015-04-06 00:10:37 +02:00
Florian Bruhin
9f9996bc66 Refuse to add empty URLs to history. 2015-04-02 09:09:17 +02:00
Florian Bruhin
37ab5296a7 Adjust URL completion when quickmarks are changed.
Fixes #590.
2015-04-02 07:40:00 +02:00
Florian Bruhin
8ebac8d38c Various spelling fixes. 2015-03-31 21:11:47 +02:00
Florian Bruhin
2f629befc3 Add an option to disable host blocking. 2015-03-30 18:33:10 +02:00
Florian Bruhin
70ccdd86b2 Add zooming with Ctrl-mousewheel.
Closes #51.
2015-03-30 15:26:07 +02:00
Florian Bruhin
a38c3ae1e1 Add a :tab-detach command.
See #62.
2015-03-30 12:14:15 +02:00
Florian Bruhin
5233e7fac8 Fix UnboundLocalError on invalid quickmarks.
This also improves FuzzyUrlError messages.
2015-03-29 21:20:42 +02:00
Florian Bruhin
b2427701fa Handle element webFrame being None when hinting. 2015-03-29 19:52:30 +02:00
Florian Bruhin
d062ff5138 Fix starting with -c '' again.
Before c5a2039da4 (standarddir refactoring), we
only checked the commandline arguments for the config file, but not when
getting the quickmarks location (as the 'args' argument was None). This means
quickmarks were saved to the default config dir even with -c ''.

With that commit, this was "fixed" accidentally, but quickmarks couldn't handle
the filename being None.
2015-03-27 12:29:12 +01:00
Florian Bruhin
82322beb03 Fix pep257 issues. 2015-03-26 07:08:54 +01:00
Florian Bruhin
ec487dd6b1 Add some logging for javascript messages. 2015-03-24 11:35:58 +01:00
Florian Bruhin
21d2bb2291 Simplify some unneeded lambdas. 2015-03-23 07:04:50 +01:00
Florian Bruhin
8811947f50 Re-enable some pylint checks. 2015-03-23 07:04:41 +01:00
Florian Bruhin
157c25bb13 Queue messages for 'current' window if unfocused.
Fixes #512.
2015-03-22 22:39:56 +01:00
Florian Bruhin
565303ebcd Fix hinting when page has no URL set yet. 2015-03-20 08:35:33 +01:00
Florian Bruhin
adb11360db Disallow tab=None with objreg.get(scope='tab').
This would've made it a lot easier to detect #563.
2015-03-19 22:28:24 +01:00
Florian Bruhin
218822d6e8 Clear rejected SSL questions when reloading page.
Fixes #565.
2015-03-19 21:21:40 +01:00
Florian Bruhin
d6732c64a3 Revert "Handle NavigationTypeOther acceptNavigationRequest"
This reverts commit 4b4bb3af88.

Fixes #567. #488 is still okay because of
f3b55d68db05247b5c3f5dc576dadb0aa1848ca3.
2015-03-19 19:06:58 +01:00
Florian Bruhin
94bc10405a Merge branch 'histcomplete' 2015-03-17 06:16:26 +01:00
Florian Bruhin
1aaa538b45 Ignore empty lines in history. 2015-03-16 10:45:50 +01:00
Florian Bruhin
806742abd3 Move new entries to the end when loading history.
Before, if an URL was present early in the history and then again later, we
didn't move it to the end of the OrderedDict. This means it won't be loaded in
the completion.
2015-03-16 07:54:39 +01:00