Commit Graph

49 Commits

Author SHA1 Message Date
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
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
def41e70bf Fix some spelling mistakes. 2015-06-07 01:24:02 +02:00
Florian Bruhin
728f06e797 Close context menu if another mode was entered.
Fixes #735.
2015-06-05 11:15:22 +02:00
Florian Bruhin
1bf036d1ba Add setting for the webpage bg color to use.
Fixes #719.
2015-06-01 22:27:15 +02: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
Florian Bruhin
8941b5dc96 Merge branch 'visual' 2015-05-18 21:43:25 +02:00
Florian Bruhin
222627b08d Clean up caret initialisation. 2015-05-13 22:25:21 +02:00
Florian Bruhin
ce1b82616d Fix spelling. 2015-05-13 07:29:59 +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
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
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
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
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
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
8ebac8d38c Various spelling fixes. 2015-03-31 21:11:47 +02:00
Florian Bruhin
70ccdd86b2 Add zooming with Ctrl-mousewheel.
Closes #51.
2015-03-30 15:26:07 +02:00
Florian Bruhin
9ffb30a16f Ignore RuntimeError in mouserelease_insertmode.
It seems when clicking certain elements, the webview can get deleted before the
singleShot QTimer will activate.
2015-03-09 11:49:01 +01:00
Florian Bruhin
cd34562d34 Fix :tab-clone with tabs -> tabs-are-windows=true.
See #536.
2015-03-08 14:54:42 +01:00
Gregor Pohl
c8c095d499 Add Opera-like mouse rocker gestures. 2015-03-03 12:58:32 +01:00
Florian Bruhin
a76868c0f4 Refactor how click/hint open targets are handled. 2015-02-26 20:41:04 +01:00
Florian Bruhin
634028e277 Fix QIODevice warnings when closing tabs.
This is a regression introduced in 43c9d69295.
Fixes #517.
2015-02-20 07:43:40 +01:00
Florian Bruhin
43c9d69295 Handle shutdown of page with prompt correctly.
Before we didn't cancel javascript prompts when a page was closed, which lead
to exceptions or segfaults.
2015-02-09 15:41:27 +01:00
Florian Bruhin
9736224fa6 Close contextmenu when closing tab to avoid crash.
Fixes #494.
2015-01-31 21:01:03 +01:00
Florian Bruhin
55649882a0 Revert "Paste primary selection into forms on Shift-Insert."
This reverts commit 68a0428a09.

Even if this works fine for me, various people reported segfault issues when
using Shift-Insert, so I'm reverting this for now until I find a proper
solution.

See #491.
2015-01-30 11:50:05 +01:00
Florian Bruhin
c40e70ed11 Revert "Also copy QByteArray of clipboard data."
This reverts commit 4138debd1e.

It seems even with this, there are still weird segfault issues.

See #491.
2015-01-30 11:48:40 +01:00
Florian Bruhin
4138debd1e Also copy QByteArray of clipboard data.
This could possibly fix segfaults some people have seen when pasting after
68a0428a09.

See #491.
2015-01-30 06:42:55 +01:00
Florian Bruhin
68a0428a09 Paste primary selection into forms on Shift-Insert.
Closes #491.
2015-01-28 06:56:38 +01:00
Florian Bruhin
ab2d2d79ca Clone text/icon as well when cloning tabs.
Closes #316.
2015-01-26 07:18:07 +01:00
Florian Bruhin
3eac528716 Switch Qt style to Fusion on OS X on Qt 5.4.
Fixes #462.
See #459.

Upstream bugs:

https://bugreports.qt.io/browse/QTBUG-42948
https://bugreports.qt.io/browse/QTBUG-43070
2015-01-09 15:43:03 +01:00
Florian Bruhin
2203db298d Abort blocking questions when new page is loaded.
Fixes #430.
Fixes #431.
Hopefully fixes #354.
Hopefully fixes #434.
2015-01-03 22:21:47 +01:00
Florian Bruhin
450d1ab70d Update copyright years 2015-01-03 15:51:31 +01:00
Florian Bruhin
03ac8874ff Rewrite keymode handling to use only one mode.
Fixes #417.
Fixes #418.
See 4ab5d2df28.
2014-12-28 00:01:27 +01:00
Florian Bruhin
769bc65343 Fix name collision. 2014-12-26 15:09:27 +01:00
Florian Bruhin
5d0dd5b11b Fix AttributeError on config changes on Ubuntu.
Fixes #390.
2014-12-26 12:25:42 +01:00
Florian Bruhin
f50a19a488 Adjust page zoom if default zoom changed.
Fixes #393.
2014-12-22 18:01:32 +01:00
Florian Bruhin
3752733f15 Actually connect QWebView.on_config_changed slot. 2014-12-22 18:01:17 +01:00
Florian Bruhin
58c991145c Revert "Use scrollRequested signal instead of paintEvent."
It seems on some pages like Twitter or blog.fdik.org, the
QWebPage::scrollRequested signal never gets emitted, so we use this for now.

Fixes #400.
See https://bugreports.qt-project.org/browse/QTBUG-43521.

This reverts commit 03fb21c476.

Conflicts:
	qutebrowser/browser/webview.py
2014-12-22 17:20:43 +01:00
Florian Bruhin
ba9bb0e418 Fix updating of scroll position with gg/G/etc. 2014-12-14 16:44:18 +01:00
Florian Bruhin
06ec1a3885 Big file tree reorganisation.
Closes #255.
Should make a lot more sense now ;)
2014-12-13 17:28:50 +01:00