Commit Graph

317 Commits

Author SHA1 Message Date
Florian Bruhin
bc380fca61 Clone zoom factor when cloning tab. 2015-01-26 07:20:03 +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
5c92144f6b Fix spawn --userscript with multiple args.
This is a regression introduced in 4485e4ee1b.

We didn't unpack the argument list properly before passing it to
run_userscripts.

Fixes #476.
See #448.
2015-01-22 07:10:32 +01:00
Florian Bruhin
4485e4ee1b Merge :run-userscripts into :spawn.
:run-userscripts is now marked as deprecated, and :spawn has a new
-u/--userscript option instead.

Closes #448.
2015-01-15 22:29:06 +01:00
Florian Bruhin
efe96462c9 Pass more useful information to userscripts.
Closes #379.
2015-01-04 20:16:15 +01:00
Florian Bruhin
b8a04f5309 Don't raise CommandError in TabbedBrowser.current_url.
TabbedBrowser.current_url used to process the qtutils.QtValueError exception
and raise a cmdexc.CommandError based on it. While this was useful for some
callers, it made handling it in others weird, and it doesn't really belong
there - so now the caller handles this.
2015-01-04 20:13:25 +01:00
Florian Bruhin
04c8a17b2e Merge branch 'userscript-runner' 2015-01-04 15:21:31 +01:00
Florian Bruhin
450d1ab70d Update copyright years 2015-01-03 15:51:31 +01:00
Florian Bruhin
4471f81c11 Expand ~ to home dir with :run-userscript. 2014-12-29 22:17:58 +01:00
Florian Bruhin
0cd0f97587 Call triggerAction on page, not view. 2014-12-29 22:12:09 +01:00
Florian Bruhin
0ea25c6ef0 Add missing imports 2014-12-29 22:04:09 +01:00
HalosGhost
0a1fa87ac9 Add -f option to reload 2014-12-29 22:03:54 +01:00
Florian Bruhin
b01041e455 Set zoom to default instead of 100% with :zoom/=. 2014-12-22 18:04:28 +01:00
Florian Bruhin
512d7c4448 Simplify config exception tree and handling.
Also make sure we catch all config-related errors in all related places.
Fixes #324.
2014-12-17 11:17:18 +01:00
Florian Bruhin
05e6515aad Allow min-/maximizing of print preview on Windows.
Fixes #327.
2014-12-16 15:08:28 +01:00
Florian Bruhin
512e51eeb4 Fix type annotation for :zoom. Fixes #332. 2014-12-15 22:59:45 +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
Florian Bruhin
39cd36c8cd Don't use maxsplit=0 with :spawn. 2014-12-11 21:27:44 +01:00
Florian Bruhin
b7ea8e7979 Support a maxsplit argument for commands. 2014-12-11 20:32:52 +01:00
Florian Bruhin
ec07e4f8be Handle OSError exceptions where appropriate.
Fixes #25.
2014-12-10 18:00:49 +01:00
Florian Bruhin
655115858c Handle OSError when using subprocess. 2014-11-23 18:07:05 +01:00
Florian Bruhin
75d1f072c2 Add a raise_cmdexc_if_invalid to urlutils. 2014-11-18 19:49:31 +01:00
Florian Bruhin
b502280c06 Make download-manager a per-window object.
Fixes #228.
2014-11-11 21:36:47 +01:00
Florian Bruhin
904d84db7e Set split=False for :quickmark-load.
See #231.

The completion still hides on the space and reappears on the first letter of
the second word, but it's a start.
2014-10-29 22:55:03 +01:00
Florian Bruhin
fd6e56d7af Convert all function annotations to dicts. 2014-10-20 17:20:39 +02:00
Florian Bruhin
eb7d12445b Fix indent 2014-10-20 00:29:19 +02:00
Claude
ecbe5c071d match urls with open, names with quickmark-load 2014-10-19 22:25:21 +02:00
Claude
9613cc0eab Merge remote-tracking branch 'florian/master' into quickmark-completion 2014-10-17 20:46:00 +02:00
Florian Bruhin
74839d7aff Use a QObject for quickmarks and add a changed signal.
See #189.
2014-10-15 16:55:55 +02:00
Claude
777e93bd3f quickmarks completion
It works, but:
* terrible performance (5s for ~1600 marks)
* split and join operations in the loop - i want direct access to name +
  url in the marks dict! how?
2014-10-15 11:54:10 +02:00
Florian Bruhin
0e771db7f1 Use annotation instead of special argument names.
Explicit is better than implicit.

Fixes #161.
2014-10-09 06:33:24 +02:00
Florian Bruhin
6202477db5 Add --left/--right arguments to :tab-only. Closes #46. 2014-10-07 20:56:47 +02:00
Florian Bruhin
d8a917575d Add a cmdutils.check_exclusive function. 2014-10-07 20:39:02 +02:00
Florian Bruhin
8ca5c09e69 Add --left/--right/--opposite to :tab-close.
This fixes the updated version of #46.
2014-10-07 20:30:31 +02:00
Florian Bruhin
3e31e88921 Only close window (instead of quitting) when closing last tab.
This also renames the 'quit' value for tabs->last-close to 'close' to avoid
confusion.

Fixes #154.
2014-10-07 17:09:24 +02:00
Florian Bruhin
f0990aec32 Fix loading of quickmarks with fuzzy URLs 2014-10-07 07:04:49 +02:00
Florian Bruhin
a19b6bf563 Fix :view-source 2014-10-06 22:23:12 +02:00
Florian Bruhin
105c25bc5f Merge branch 'multiwin'
Conflicts:
	qutebrowser/app.py
	qutebrowser/browser/commands.py
	qutebrowser/browser/hints.py
	qutebrowser/keyinput/modeman.py
	qutebrowser/network/networkmanager.py
	qutebrowser/widgets/mainwindow.py
	qutebrowser/widgets/statusbar/command.py
	qutebrowser/widgets/statusbar/prompt.py
	qutebrowser/widgets/statusbar/prompter.py
	qutebrowser/widgets/tabbedbrowser.py
2014-10-06 22:03:58 +02:00
Florian Bruhin
fd9a3fc5e7 Clean up mainwindow import mess. 2014-10-06 21:24:07 +02:00
Florian Bruhin
ecd31a6450 Add tab/window support to :help 2014-10-06 20:40:00 +02:00
Florian Bruhin
9281fa3992 Fix lint/bugs 2014-10-06 19:53:50 +02:00
Florian Bruhin
796dce86ae Remove go_back() and go_forward() from WebView.
If we use these in commands.py, we spawn a new window before checking if we can
go back/forward - but we want to check that before opening a new window.
2014-10-06 19:47:35 +02:00
Florian Bruhin
6324751af6 More window support. 2014-10-06 17:58:40 +02:00
Florian Bruhin
4dcaa1fdec Be more forgiving when validating URLs. Fixes #141. 2014-10-03 16:58:30 +02:00
Florian Bruhin
c75563907a Fix getting URL in :view-source.
Fixes #128.
2014-10-02 06:06:08 +02:00
Florian Bruhin
42a1d7028d Move :later back from commands to utilcmds. 2014-09-29 19:56:25 +02:00
Florian Bruhin
895f51083d Some more objreg fixes for multi-window. 2014-09-29 07:17:01 +02:00
Florian Bruhin
16c067e32d Simplify showing of main windows. 2014-09-28 22:46:37 +02:00
Florian Bruhin
cc0e164dcf First attempt at adding a --window to commands. 2014-09-28 22:41:43 +02:00
Florian Bruhin
dc7b32e460 Fix lint 2014-09-28 22:23:37 +02:00
Florian Bruhin
fb6cb62f93 First attempt at multi-window support. 2014-09-28 22:13:14 +02:00
Florian Bruhin
8635dc8848 Make it possible to go back/forward in a new tab. 2014-09-27 23:14:39 +02:00
Florian Bruhin
17f2241bc0 Add a :tab-clone command. 2014-09-27 23:13:11 +02:00
Florian Bruhin
4410536f69 Refactor :undo and save/restore history. 2014-09-27 22:56:50 +02:00
Florian Bruhin
36fd2e5c7f Improve __repr__ methods. 2014-09-26 15:48:24 +02:00
Florian Bruhin
55e2ccabf5 Fix lint 2014-09-25 07:58:08 +02:00
Florian Bruhin
78949a8c1b Use object registry for hintmanager. 2014-09-25 07:49:45 +02:00
Florian Bruhin
4783df8c32 Avoid download_get signal. 2014-09-25 00:29:29 +02:00
Florian Bruhin
b119100321 Get rid of _tabs attribute in CommandDispatcher. 2014-09-24 20:21:43 +02:00
Florian Bruhin
5e8144fafa Move cntwidget to commands. 2014-09-24 19:53:31 +02:00
Florian Bruhin
fd9c4b860a Use object registry for url_stack. 2014-09-24 07:32:05 +02:00
Florian Bruhin
3f02451828 Move object registry to its own file. 2014-09-24 07:06:45 +02:00
Florian Bruhin
b121ceef21 Use object registry for last focused tab. 2014-09-24 06:41:51 +02:00
Florian Bruhin
908a69af18 Better __repr__s 2014-09-23 23:31:17 +02:00
Florian Bruhin
f5b1d3ce4d Use object registry for command-dispatcher. 2014-09-23 21:35:08 +02:00
Florian Bruhin
a4079bb39e Split :navigate into several functions 2014-09-22 22:36:31 +02:00
Florian Bruhin
d5a294ae55 commands: Move tab opening to _open functions. 2014-09-22 22:27:19 +02:00
Florian Bruhin
207bb00c50 Add increment/decrement to :navigate 2014-09-22 21:51:09 +02:00
Florian Bruhin
4213550206 Add :navigate up 2014-09-22 21:16:21 +02:00
Florian Bruhin
4615d22a5a browser.commands: Refactor :navigate. 2014-09-22 21:08:11 +02:00
Florian Bruhin
9145ba9656 Adjust comment 2014-09-22 21:03:01 +02:00
Florian Bruhin
51413094bf Merge prev-page/next-page into a navigate command. 2014-09-22 21:01:52 +02:00
Florian Bruhin
812a0fdd41 Merge branch 'newcmd'
Conflicts:
	.flake8
	pkg/PKGBUILD.qutebrowser-git
	qutebrowser/browser/commands.py
	qutebrowser/browser/hints.py
	qutebrowser/config/configdata.py
	qutebrowser/network/qutescheme.py
	qutebrowser/test/config/test_configtypes.py
	qutebrowser/utils/utils.py
2014-09-22 19:09:48 +02:00
Florian Bruhin
d1ddc8c6cb Fix lint 2014-09-15 22:01:13 +02:00
Florian Bruhin
19afa69d87 view_source: Add line numbers. 2014-09-15 18:19:56 +02:00
Florian Bruhin
715aec991e Add view_source command. 2014-09-15 17:59:54 +02:00
Florian Bruhin
4d3b3616a6 Fix lint 2014-09-14 23:56:19 +02:00
Florian Bruhin
b9216bca15 Fix hint command arguments. 2014-09-14 23:16:35 +02:00
Florian Bruhin
b2058e2f0e cmdutils: Default to nargs='+' for *args. 2014-09-14 22:56:02 +02:00
Florian Bruhin
80ef0782d5 Improve some docstrings. 2014-09-13 00:22:27 +02:00
Florian Bruhin
070d5ae300 Add more documentation. 2014-09-08 12:21:47 +02:00
Florian Bruhin
1220f0c5fd Move webelem from utils to browser. 2014-09-08 10:30:05 +02:00
Florian Bruhin
381b06e967 Fix lint 2014-09-08 07:44:32 +02:00
Florian Bruhin
5e6150e665 Add a :help command. 2014-09-08 07:36:18 +02:00
Florian Bruhin
4cf7e6e767 Add docstring for :quickmark-load. 2014-09-08 07:36:17 +02:00
Florian Bruhin
57d51ad9bb Lots of fixes for new command system.
Squashed commit:

- Fix getting current URL
- Get rid of *args for hints.
- Make enums work.
- Fix moving commands to utilcmds.
- Fix enums in argparse
- Fix arg splitting for hints.
- Fix default enum args.
- Fix argument splitting for hints if None is given.
- Fix set_cmd_text with flags and fix {url}.
- Fix unittests
- Fix tuple types for arguments.
- Fix scroll-page.
- Fix lint
- Fix open_target.
- Others
2014-09-08 07:36:17 +02:00
Florian Bruhin
a811f8cb07 Start initial newcmd stuff. 2014-09-08 07:36:17 +02:00
Florian Bruhin
b856bf3a47 Improve webelement API 2014-09-04 20:30:59 +02:00
Florian Bruhin
3e904f4c52 Fix crash when using commands on startup which need a widget. 2014-09-03 11:32:56 +02:00
Florian Bruhin
ccfc0b3c19 Get rid of most @property's.
They were problematic because they're executing hidden code, and also PyQt
hides exceptions happening inside them.
2014-09-02 23:37:47 +02:00
Florian Bruhin
4caec2becb Document and mark workarounds. 2014-09-02 20:44:58 +02:00
Florian Bruhin
ce4a5affa4 Rename commands.utils to commands.cmdutils. 2014-08-26 20:48:39 +02:00
Florian Bruhin
c72bfff306 Rename commands.exceptions to commands.cmdexc. 2014-08-26 20:38:10 +02:00
Florian Bruhin
5adf48ed3d Rename utils.url to utils.urlutils. 2014-08-26 20:33:41 +02:00
Florian Bruhin
8bd64382bd Rename utils.qt to utils.qtutils. 2014-08-26 20:25:11 +02:00
Florian Bruhin
d625cde28c Clean up imports 2014-08-26 19:10:14 +02:00
Florian Bruhin
f452b02b24 Turn off repainting while moving tabs.
Before we had some flashing because we're removing the tab, inserting the new
one, and then focusing the new one.
2014-08-25 15:41:19 +02:00
Florian Bruhin
743cc47229 Default to delta=1 for gl/gr. 2014-08-25 15:40:48 +02:00
Florian Bruhin
03cb9c353b Fix clipboard selection in :paste on windows. 2014-08-25 15:28:07 +02:00
Florian Bruhin
c7ee655750 Use pylint to check modelines and fix them. 2014-08-06 23:51:44 +02:00
Florian Bruhin
13b6fe24eb Reorder tab stuff in config. 2014-08-06 08:10:32 +02:00
Florian Bruhin
1217ed26ad Handle tab position of explicitely opened tab differently.
The default behaviour now should be the same as Chromium.
2014-08-06 07:58:07 +02:00
Florian Bruhin
ee1b136807 Clean up pylint/noqa comments. 2014-08-04 03:47:09 +02:00
Florian Bruhin
90f1d5851c Fix lint. 2014-08-03 00:58:59 +02:00
Florian Bruhin
acfc95e19d Simplify :hint by adding a 'fill' target. 2014-08-03 00:56:42 +02:00
Florian Bruhin
40aa387fb2 Whitespace fixes 2014-08-03 00:40:28 +02:00
Florian Bruhin
b68f22541c Merge tab-focus-last into tab-focus. 2014-08-03 00:39:39 +02:00
Florian Bruhin
d302886b87 Fix too long lines. 2014-08-03 00:36:35 +02:00
Florian Bruhin
9e73cba333 Improve command documentation. 2014-08-03 00:33:39 +02:00
Florian Bruhin
6c4b21117c Fix typo 2014-08-02 23:58:52 +02:00
Florian Bruhin
3467dd77ac Document the :hint command. 2014-08-02 23:46:27 +02:00
Florian Bruhin
cf8a8ad3b4 Fix crash when closing tab then doing tab-focus-last. 2014-07-29 22:42:59 +02:00
Florian Bruhin
e1f9403876 Clean up hint command. 2014-07-29 02:24:04 +02:00
Florian Bruhin
425a7fd7c4 Simplify userscript running. 2014-07-29 02:05:15 +02:00
Florian Bruhin
b83dd59469 Add userscript/spawn targets to hints. 2014-07-29 01:45:42 +02:00
Florian Bruhin
7c8f9bec0f Use enum for keyboard modes. 2014-07-29 00:19:35 +02:00
Florian Bruhin
860ef75abc Fix lint 2014-07-28 21:09:49 +02:00
Florian Bruhin
d60ff5ed27 Add a set-cmd-text command. 2014-07-28 02:16:37 +02:00
Florian Bruhin
e0bd89b762 Add an {url} variable for commands.
Note this also means we don't support :spawn running in a shell anymore, as
{url} is evaluated earlier. However this should be fine, as there's no really
important use case for that anyways, and shell escaping on Windows is rather
unmaintainable.
2014-07-28 01:40:36 +02:00
Florian Bruhin
f7304298ab Separate docstrings into command/documentation parts. 2014-07-16 20:09:41 +02:00
Florian Bruhin
e250d42f0b Better debugging for editing 2014-07-16 09:28:28 +02:00
Florian Bruhin
958b114d29 Add stricter focus checking for editor 2014-07-16 08:46:52 +02:00
Florian Bruhin
810e507da9 Add a focus_elem function to utils.webelem. 2014-07-16 07:55:30 +02:00
Florian Bruhin
bbd9d24334 Handle elements with contenteditable correctly for editor 2014-07-16 07:42:02 +02:00
Florian Bruhin
d5c8e73b14 Use same focus code for insertmode/editor 2014-07-16 06:58:01 +02:00
Florian Bruhin
fad22c63d9 Go back to using one NetworkManager per tab 2014-07-10 06:42:52 +02:00
Florian Bruhin
ab99669b4a Remove unused import 2014-06-25 10:03:13 +02:00
Florian Bruhin
411d57e539 Fix download-page 2014-06-25 10:00:09 +02:00
Florian Bruhin
c7f2b45cbd Always yank to clipboard if primary selection is unavailable 2014-06-24 12:04:36 +02:00
Florian Bruhin
81990f792f Avoid using QApplication for downloads 2014-06-23 17:30:28 +02:00
Florian Bruhin
dc91bcdf91 Don't crash if URLs are invalid in commands 2014-06-23 14:26:47 +02:00
Florian Bruhin
8a8ca0c34f Split utils.misc into utils.{qt,misc} 2014-06-23 07:45:04 +02:00
Florian Bruhin
49fd08b30d Leave URLs encoded when setting commandline 2014-06-21 23:19:59 +02:00
Florian Bruhin
7a6e2b3242 Ensure validity of Qt objects 2014-06-21 17:02:30 +02:00
Florian Bruhin
0dc2ecef46 Check QUrl objects for validity 2014-06-20 23:57:52 +02:00
Florian Bruhin
736f559afa Fix URL handling for quickmarks. 2014-06-20 22:57:32 +02:00
Florian Bruhin
2d2ee71bee Remove passwords from URLs going out via an insecure channel. 2014-06-20 22:57:04 +02:00
Florian Bruhin
d6fb0f7774 Fix crash when pasting an URL 2014-06-20 22:31:39 +02:00
Florian Bruhin
8b6af23b13 Make sure we don't display passwords in URLs to the user 2014-06-20 19:50:44 +02:00
Florian Bruhin
0fd64419da Remove urlutils.{urlstring,qurl}.
The idea of treating an URL-string and a QUrl as essentially the same data type
got us into all kinds of problems. Now we use QUrl everywhere except at the
borders to the user interface.
2014-06-20 16:33:01 +02:00
Florian Bruhin
6b12572fb0 Add dwb download keybindings. 2014-06-19 17:58:46 +02:00
Florian Bruhin
d65587128f Add vim modelines to all files. 2014-06-19 09:04:37 +02:00
Florian Bruhin
4a0e34fca7 Delete print dialogs on close 2014-06-17 14:33:15 +02:00
Florian Bruhin
af9e4ae072 Fix parent/child relationships 2014-06-17 07:17:21 +02:00
Florian Bruhin
903de515e7 Add a check whether print works. 2014-06-16 10:21:03 +02:00
Florian Bruhin
fd220b1b36 Raise CommandError instead of message.error where possible 2014-06-06 11:55:55 +02:00
Florian Bruhin
35a3cc661e Reorder webkit options 2014-06-03 20:28:51 +02:00
Florian Bruhin
161b2ef7af Fix whitespace/CRLF 2014-05-27 16:24:26 +02:00
Florian Bruhin
1ff193e4dd Replace page_ by page() 2014-05-27 16:04:45 +02:00
Florian Bruhin
0976f95db7 Fix docstring 2014-05-27 15:56:44 +02:00
Florian Bruhin
53655dac02 Don't inherit CommandDispatcher from QObject 2014-05-27 15:12:43 +02:00
Florian Bruhin
fa01bfbbad Add per-tab inspector like dwb.
This also means the webinspector will always be detached / in its own window.
2014-05-26 15:35:05 +02:00
Florian Bruhin
1e256699f8 Add topic-specific loggers 2014-05-23 16:11:55 +02:00
Florian Bruhin
8cddbec9e3 Implement quickmarks 2014-05-22 16:44:47 +02:00
Florian Bruhin
8d570b686c Initial userscript support 2014-05-21 19:53:58 +02:00
Florian Bruhin
ecc838d02c Fix ALL the lint 2014-05-21 17:29:09 +02:00
Florian Bruhin
2df8500792 Move ExternalEditor to own file 2014-05-21 15:47:21 +02:00
Florian Bruhin
60f25373e3 Merge branch 'editor'
Conflicts:
	qutebrowser/browser/commands.py
	qutebrowser/utils/misc.py
2014-05-21 15:37:18 +02:00
Florian Bruhin
ebefdfb5a9 Fix pasting in new tab 2014-05-19 15:09:12 +02:00
Florian Bruhin
633b87f61b Yank cleanup 2014-05-19 11:56:51 +02:00
Florian Bruhin
fe81e46f7c Small clipboard cleanup 2014-05-19 09:52:58 +02:00
Florian Bruhin
118d3e03cd Revert "Make scroll bars hideable"
This reverts commit 1bfbdd79e4.

Conflicts:
	qutebrowser/browser/commands.py
	qutebrowser/config/configdata.py
	qutebrowser/widgets/webview.py
2014-05-19 09:50:56 +02:00
Florian Bruhin
8ed373423a Fix undo 2014-05-18 08:19:27 +02:00
Florian Bruhin
869c0d82e1 Really fix tabclose 2014-05-18 08:18:20 +02:00
Florian Bruhin
d643d6ce44 Fix broken :yank 2014-05-18 08:14:11 +02:00
Florian Bruhin
578a58145c Fix tab closing 2014-05-18 08:08:58 +02:00
Florian Bruhin
1ec0766587 Rename CurCommandDispatcher to CommandDispatcher 2014-05-18 08:04:27 +02:00