Commit Graph

4001 Commits

Author SHA1 Message Date
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
5f122759db Fix config migration for tab position values. 2015-08-07 11:59:31 +02:00
Florian Bruhin
2ab7ad59ee Fix lint. 2015-08-06 21:19:36 +02:00
Florian Bruhin
3f445ba6ca Draw favicon at correct position/size. 2015-08-06 21:14:05 +02:00
Florian Bruhin
58a9677af8 Use QFontMetrics instead of QFontInfo. 2015-08-06 21:11:06 +02:00
Florian Bruhin
e1c2250690 Merge branch 'favicon-size-2' of git://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-favicon-size-2 2015-08-06 21:10:11 +02:00
Florian Bruhin
61df5fcd7a Skip confirm-quit checks when crashing.
Fixes #853.
2015-08-06 21:08:20 +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
Florian Bruhin
c6c14e967d Change Position conftypes to top/bottom/left/right. 2015-08-05 23:37:51 +02:00
Martin Tournoij
58aa1a738d Favicon sizing is messed up with tabs -> orientation = west #847
Here's a patch which seems to work well in my initial testing. We now use the
font size rather than the tabbar size, since the tabbar size is the window
size when it's vertical.

This also works nicer with the new tabs.padding setting (which didn't exist when
I wrote the first patch).
2015-08-05 22:33:24 +02:00
Florian Bruhin
5a25f0b98b Don't crash on :completion-item-del with no item.
If :completion-item-del was invoked with no item selected (e.g. directly after
pressing 'o'), there was a crash because the currentIndex was invalid.

/cc @antoyo (but I believe one of my changes on top of yours caused this)
2015-08-05 06:55:39 +02:00
Florian Bruhin
15e854237e Fix exception on ":set -p foo bar!". 2015-08-04 23:50:43 +02:00
Alexander Cogneau
3fa99abca8 Merge remote-tracking branch 'upstream/master' 2015-08-04 16:32:31 +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
7e7fe9b4ce Simplify utils.qualname, take two. 2015-08-04 10:39:34 +02:00
Florian Bruhin
c67f7b6b21 Simplify utils.qualname. 2015-08-04 10:36:35 +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
c13f7e5f78 Remove dead ShellLexer code. 2015-08-02 13:05:19 +02:00
Florian Bruhin
dc4d4e70e4 Make sure state is valid in ShellLexer. 2015-08-02 12:44:54 +02:00
Florian Bruhin
49f017c0dd Fix mainwindow.statusbar.percentage tests. 2015-08-02 01:53:30 +02:00
Florian Bruhin
d5888fea89 100% coverage for mainwindow.statusbar.progress. 2015-08-02 01:49:33 +02:00
Florian Bruhin
43db9d4526 Fix wrong pyqtSlot type. 2015-08-02 01:42:16 +02:00
Florian Bruhin
7f3070f793 Remove : for configexc.NoOptionError. 2015-08-02 01:29:24 +02:00
Florian Bruhin
d8017a04a8 Mark old tabbar hide settings as removed. 2015-08-01 22:36:59 +02:00
Florian Bruhin
6b98158d64 Fix lint. 2015-08-01 22:21:08 +02:00
Artur Shaik
e58735f1d7 'Tabs show' recommendations applied. 2015-08-01 22:21:08 +02:00
Artur Shaik
b4d5f9e7a6 Tabs->show option.
Issue #771
Implemted common option for tab bar show strategy.
Options: always, never, multiple, switching.
2015-08-01 22:21:08 +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
81c3c2d15f Small config rewording. 2015-08-01 13:35:30 +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
cc66feac09 Handle invalid history timestamps. 2015-08-01 00:57:34 +02:00
Florian Bruhin
d04848ac19 Remove unused import. 2015-08-01 00:34:09 +02:00
Florian Bruhin
451477593f Always require 4 values for padding. 2015-08-01 00:34:09 +02:00
Florian Bruhin
22ae0c5bca Don't call setIconSize if height doesn't change. 2015-08-01 00:26:37 +02:00
Florian Bruhin
2c716dbf6c Merge branch 'favicon-size' of https://github.com/Carpetsmoker/qutebrowser into tabbar-height 2015-08-01 00:22:17 +02:00
Florian Bruhin
be88ba6f05 Remove indicator-space setting. 2015-07-31 18:55:17 +02:00
Florian Bruhin
fdcb69f5d4 Fix indicator layout and make it configurable. 2015-07-31 18:52:31 +02:00
Florian Bruhin
3083eaa27b Clean up TabBarStyle._tab_layout. 2015-07-31 18:06:01 +02:00
Florian Bruhin
41eb36148d Clean up TabBarStyle.drawControl. 2015-07-31 17:59:38 +02:00
Florian Bruhin
f5725ec11e Use a namedtuple for _tab_layout. 2015-07-31 17:49:18 +02:00
Florian Bruhin
754c31850b Add configurable tab padding. 2015-07-31 17:24:35 +02:00
Florian Bruhin
041315b65f Honour right-padding in tabs correctly. 2015-07-31 17:02:42 +02:00
Florian Bruhin
8dcf9fd963 Separate padding/icon padding for tab bar. 2015-07-31 16:55:48 +02:00
Florian Bruhin
776ace2d3f Clean up comparison. 2015-07-31 16:41:02 +02:00
Florian Bruhin
87d8bfd7a7 Use an enum for custom PixelMetrics. 2015-07-31 16:40:06 +02:00
Florian Bruhin
452c4115d3 Add a Padding config type. 2015-07-31 15:38:41 +02:00
Florian Bruhin
57e79db136 Fix undefined name error. 2015-07-29 15:04:07 +02:00
Florian Bruhin
d9d68db5df Simplify delete_cur_item for UrlCompletionModel. 2015-07-29 12:44:38 +02:00
Florian Bruhin
08fe1d59e6 Get rid of bookmark_by_title completion. 2015-07-29 12:36:45 +02:00
Florian Bruhin
69ade32cb9 Get rid of quickmark_by_name completion. 2015-07-29 12:35:43 +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
b962fff7f1 Don't show message when deleting items. 2015-07-26 18:48:00 +02:00
Florian Bruhin
ecf3e166ff Fix wrong column attribute. 2015-07-26 18:47:02 +02:00
Florian Bruhin
660b5531e5 Share code between on_{quick,book}mark_removed. 2015-07-26 18:43:01 +02:00
Florian Bruhin
b5a9467b5c Get rid of _add_*mark_entry in urlmodel. 2015-07-26 18:35:49 +02:00
Florian Bruhin
2d2779d6f3 Clean up column handling in urlmodel. 2015-07-26 18:23:12 +02:00
Florian Bruhin
aaa523ce7c Filter by cols_to_filter in CompletionFilterModel. 2015-07-26 17:41:32 +02:00
Florian Bruhin
3b0125e8cd Rename cols_to_highlight to _filter and simplify. 2015-07-26 17:22:45 +02:00
Florian Bruhin
c7f88c93b2 Style fix. 2015-07-26 17:11:34 +02:00
Florian Bruhin
16ac877227 Add default keybindings for loading bookmarks.
See #13, #681.
2015-07-26 16:42:47 +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
c750ff3f50 configtypes: Handle invalid format syntax. 2015-07-26 13:56:46 +02:00
Florian Bruhin
4bdf00b148 configtypes: Handle {1} correctly. 2015-07-26 13:56:40 +02:00
Florian Bruhin
94b0f92b75 Fix tabs -> last-close = ignore.
See #822 / 71fee12b5b.
Fixes #834.
2015-07-26 12:08:19 +02:00
Florian Bruhin
cbed62cafc Remove dead code.
This will already be checked by WebKitBytes._basic_validation.
2015-07-24 18:23:17 +02:00
Florian Bruhin
694fbe053d Fix lint. 2015-07-24 18:11:52 +02:00
Florian Bruhin
44bf4ae883 configtypes: Fix ' ' value with Command. 2015-07-24 17:56:12 +02:00
Florian Bruhin
b19852b6e7 configtypes: Add _basic_validation() to BaseType.
This has a few implications:

- Checking for empty/none_ok is now easier as _basic_validation() does this.
- To make things easier, WebKitBytes and WebKitBytesList now need to have
  none_ok passed as well instead of assuming True.
- _basic_validation() checks for unprintable chars and raises ValidationError
  if they occur, so this gets checked for all types.
2015-07-24 17:39:02 +02:00
Florian Bruhin
1fd386e57e configtypes: Get rid of typestr.
Closes #819.
2015-07-24 14:18:41 +02:00
Florian Bruhin
730a8afc6b configtypes: Handle empty values in ConfirmQuit 2015-07-24 00:24:04 +02:00
Florian Bruhin
e145d73852 configtypes: Add a MappingType base class. 2015-07-24 00:11:52 +02:00
Florian Bruhin
0b1704d829 configtypes: Add a __repr__ to ValidValues. 2015-07-24 00:11:52 +02:00
Florian Bruhin
a558f666bc configtypes: Be case-insensitive for Position. 2015-07-23 23:13:58 +02:00
Florian Bruhin
85e748df4f configtypes: Add else-branch to QtFont. 2015-07-23 16:57:28 +02:00
Florian Bruhin
b0c3f5381b configtypes: Add none_ok param to UserStyleSheet. 2015-07-23 16:57:14 +02:00
Florian Bruhin
c46abd8f89 Fix none_ok for RegexList and PercList. 2015-07-23 14:08:34 +02:00
Florian Bruhin
88416db6a3 configtypes: Make none_ok work for IntList. 2015-07-21 15:20:23 +02:00
Florian Bruhin
073504abb4 configtypes: Make none_ok public. 2015-07-21 15:17:28 +02:00
Florian Bruhin
1b643ff55f Handle empty values for ConfirmQuit conftype. 2015-07-21 13:00:01 +02:00
Florian Bruhin
b670c45381 Fix typo. 2015-07-20 11:23:43 +02:00
Florian Bruhin
5f10a12be9 Use keyword argument for newtab. 2015-07-17 06:39:53 +02:00
Florian Bruhin
ed1ba03c19 Merge branch 'last-tab' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-last-tab 2015-07-17 06:27:19 +02:00
Florian Bruhin
0972087e34 Add a note about #730 to :inspect docs.
Fixes #730.
2015-07-16 20:54:10 +02:00
Martin Tournoij
71fee12b5b Always remove the last tab, instead of opening a new page in it.
IMHO this makes much more sense; for example, if you close the last tab but then
press u to "undo" it, you'll actually load the second-last tab. To undo you need
H for "back". Other things like gC, session save, etc. also behave in a way that
is, IMHO, unexpected...

I can also make a new option out of this, if you prefer. But I don't think that
many people would expect the current behaviour...
2015-07-16 15:26:15 +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
91561e2c5b Fixed style. 2015-07-12 20:46:40 -04:00
Antoni Boucher
5bca951c21 Removed casefold() function call when using a custom filter. 2015-07-12 20:29:40 -04:00
Antoni Boucher
1b24cfd618 Removed useless bookmark by title model. 2015-07-12 20:21:49 -04:00
Antoni Boucher
d4c91f7b0c Fixed completion highlighting. 2015-07-12 20:18:32 -04:00
Antoni Boucher
523cb458a6 Merge remote-tracking branch 'upstream/master' 2015-07-12 10:52:32 -04:00
Florian Bruhin
ca5a78dfc7 Attach numerical code to Qt OSErrors and fix tests.
This fixes tests with tox < 2.0.0 on systems with a non-english locale, as it's
no longer the errorString which gets compared.

Fixes #806.
2015-07-12 11:20:28 +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
8159c5f567 Fixed last merge. 2015-07-11 18:56:19 -04:00
Antoni Boucher
fe829699be Merge remote-tracking branch 'upstream/master' 2015-07-11 17:40:43 -04:00
Florian Bruhin
c5b75b0b16 Merge remote-tracking branch 'origin/usertypes-tests' 2015-07-06 17:58:13 +02:00
Florian Bruhin
3f13c2bd3e Add/improve tests for qutebrowser.utils.urlutils. 2015-07-06 17:10:57 +02:00
Florian Bruhin
e3fcc0e091 Move isabs check to top in fuzzy_url. 2015-07-06 17:10:24 +02:00
Florian Bruhin
47d5262cd9 Abort scrolling wen reaching min/max position.
Fixes #801.
2015-07-06 15:13:18 +02:00
Florian Bruhin
11e88fbd12 Don't bind backspace by default.
Fixes #789.
2015-07-06 13:18:05 +02:00
Florian Bruhin
4cef4012e5 Catch OSError when loading qute:help.
Fixes #763.
2015-07-02 22:08:41 +02:00
Florian Bruhin
4e0d00098c Improve NeighborList tests. 2015-07-02 21:10:56 +02:00
Martin Tournoij
aa909c0506 Fix warnings from tox 2015-07-02 21:07:38 +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
Florian Bruhin
b3cd31a808 Release v0.3.0. 2015-06-28 12:45:58 +02:00
Martin Tournoij
63dae3a885 Set favicon size to tabbar size.
Fixes #119. Also see #754
2015-06-28 00:03:53 +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
bf4e968c67 Add new completion -> auto-open option.
Closes #557.
2015-06-27 19:55:04 +02:00
Florian Bruhin
b3869fe42b sessions: Store zoom/scroll-pos per history entry.
Also fixes #728.
2015-06-27 18:06:18 +02:00
Florian Bruhin
ddf7f202d8 Set default for new-instance-open-target to tab. 2015-06-26 22:40:16 +02:00
Florian Bruhin
e9b5c355d2 Add a short=True argument to version.version().
Fixes #787.
2015-06-26 22:33:29 +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
Franz Fellner
534a85cf8f Create a new QStyleOptionTab object for each tab.
It seems under some circumstances (on Gentoo?), the existing QStyleOptionTab
object was reused, causing subsequent tabs to have the same title as the first
one.

Fixes #778.
2015-06-24 21:27:37 +02:00
Florian Bruhin
75b894a186 Include DESKTOP_SESSION in qute:version. 2015-06-24 20:54:37 +02:00
Florian Bruhin
220ac021f0 Print style name in version info. 2015-06-24 20:37:48 +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
b7c3e7b959 Disallow {foo} in search engine URLs.
This causes an KeyError otherwise when trying to use str.format to insert the
search term.
2015-06-24 07:46:15 +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
9ca06ecfa2 Use pkg_resources instead of distutils for version
Fixes #767. See #770.
2015-06-18 20:54:05 +02:00
Florian Bruhin
1cc6a6669b Bind <Alt-Backspace> to rl-unix-word-rubout. 2015-06-18 15:02:30 +02:00
Florian Bruhin
0350d19bd3 Load geometry after completion is initialized.
Fixes #766.
2015-06-18 10:32:07 +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
b1334bcc22 Use repr() for unknown objects in utils.qualname. 2015-06-17 06:46:03 +02:00
Florian Bruhin
dfe98d1053 completion: Fix initial _cursor_part value.
Fixes #749.
2015-06-16 13:22:55 +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
70699988ed Fix context managers behavior on exceptions. 2015-06-15 06:19:14 +02:00
Florian Bruhin
f1ba14b496 Fix exception when using :set.
This is a regression introduced in 167faafff2.
2015-06-13 13:26:29 +02:00
Florian Bruhin
f17131f6c2 Change Qt links to point to qt.io. 2015-06-12 16:59:33 +02:00
Florian Bruhin
84a269f36a Add missing keys to key_to_string. 2015-06-12 16:37:17 +02:00
Florian Bruhin
425fcdf8e4 Merge branch 'util-tests-1' 2015-06-12 11:50:57 +02:00
Florian Bruhin
167faafff2 Fix command parsing for arguments containing _. 2015-06-12 11:42:16 +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
33ad0ab1fc Fix startDetached return value for GUIProcess. 2015-06-11 23:02:47 +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
8a87b5d357 Rename GUIProcess.started to _started.
It's unneeded for this to be public, and it conflicts with the pyqtSignal.
2015-06-11 20:30:37 +02:00
Florian Bruhin
ad401e035f Proxy QProcess signals. 2015-06-11 20:30:37 +02:00
Florian Bruhin
62d2018695 Add cmd/args/started to GUIProcess. 2015-06-11 20:30:28 +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
Austin Anderson
599f582c20 More specific statusbar styling: resolves #750. 2015-06-11 08:07:59 -04:00
Florian Bruhin
9b7b97d626 Improve docs. 2015-06-10 21:10:59 +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
Florian Bruhin
67e895b6c7 Hide SetProcessDpiAwareness Qt warning.
This shows up on AppVeyor CI for some reason.
See https://bugreports.qt.io/browse/QTBUG-38993
2015-06-10 18:35:33 +02:00
Florian Bruhin
b57027f800 Fix pylint warnings on Windows. 2015-06-10 18:35:33 +02:00
Austin Anderson
3be9a9b051 Catalogued a configuration option change for updates. 2015-06-10 08:16:15 -04: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
108e722c85 Add config migration. 2015-06-08 20:48:35 +02:00
Florian Bruhin
3b4fe97dbc Merge branch '3rd-party-cookies' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-3rd-party-cookies 2015-06-08 20:38:19 +02:00
Florian Bruhin
b6349437f7 Fix broken check for changing js on qute:settings.
See #727.
2015-06-08 20:29:55 +02:00
Florian Bruhin
b5cd082e43 config: Make it possible to migrate values.
Needed for #729.
2015-06-08 19:34:11 +02:00
Florian Bruhin
5a2d909607 Update user-stylesheet docs. 2015-06-08 18:50:09 +02:00
Florian Bruhin
171a0f201b Merge branch 'relapaths' of https://github.com/lamarpavel/qutebrowser into lamarpavel-relapaths 2015-06-08 18:48:11 +02:00
Lamar Pavel
7f27c183be Include expandvars in File.validate
I thought I put this in here before, but apparently I did not. So here it is,
together with a new test to verify it. Other tests needed to be updated with a
mock for os.path.expandvars.
2015-06-08 13:18:16 +02:00
Lamar Pavel
0e50760b70 Differentiate exceptions; remove obsolete test
In function File.validate the try-except block has been re-written to
differentiate raised errors.

In function File.transform there was a check for validity of the file path that
is alraedy performed by File.validate under the same conditions. This check has
been removed.
2015-06-08 12:53:59 +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
Austin Anderson
34d4c08374 Significantly reduced the size of the bar stylesheet. 2015-06-07 20:13:52 -04:00
Austin Anderson
ebc013ac2a Removed redundant setter. 2015-06-07 20:13:52 -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
Antoni Boucher
57a72a7120 Refactored bookmark removal to use a command. 2015-06-07 19:36:19 -04:00
Florian Bruhin
e60f698615 Add/improve tests for qutebrowser.utils.standarddir. 2015-06-07 23:20:34 +02:00
Florian Bruhin
df53ccf426 Write tests for qutebrowser.utils.version. 2015-06-07 23:20:34 +02:00
Florian Bruhin
4204579c06 Add/improve tests for qutebrowser.utils.utils. 2015-06-07 22:53:30 +02: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
Florian Bruhin
6b94dc5279 Add continue to default next-regexes. 2015-06-07 17:20:52 +02: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
5310c60d58 Remove unused import. 2015-06-07 01:24:24 +02:00
Florian Bruhin
def41e70bf Fix some spelling mistakes. 2015-06-07 01:24:02 +02:00
Lamar Pavel
5bacbc9d38 Remove obsolete try-except block 2015-06-06 14:07:57 +02:00
Lamar Pavel
de0686c50a Error messages and explicit test for None
Error messages for validate() are more specific.

Return of standarddir.conf() is explicitly tested for None to avoid ambiguity
with other falsey values.
2015-06-06 14:04:45 +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
5fb23f1373 Also migrate older search calls. 2015-06-05 17:45:38 +02:00
Martin Tournoij
dfada850e0 Update code after refactor, and add migration 2015-06-05 16:52:33 +02:00
Martin Tournoij
a7b10a090f Merge branch 'master' into issue-716 2015-06-05 16:45:52 +02:00
Martin Tournoij
fc4c7bd2e4 Merge the cookies-accept and third-party-cookie-policy settings 2015-06-05 16:20:50 +02:00
Lamar Pavel
402aa66756 Merge branch 'master' of github.com:The-Compiler/qutebrowser 2015-06-05 16:10:55 +02:00
Florian Bruhin
b55e22b5c3 Refactor key mode/parser handling in modeman. 2015-06-05 15:29:09 +02:00
Martin Tournoij
fa65f345ac Perhaps fix it more properly after all :-) 2015-06-05 15:19:40 +02:00
Martin Tournoij
57ddd8e95e Always handle the <Esc> key, even if it's bound.
This fixes #716, which sufficiently annoyed me to make this quick fix. It's not
a great fix, but it's not worse than what we had already, and the current
behaviour is very surprising IMHO.
2015-06-05 14:26:17 +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
7102459c81 Rename _get_modeman() to instance(). 2015-06-05 11:15:18 +02:00
Florian Bruhin
622938e3d3 Fix completion performance with shrink=True.
Before, the completion was shrinked every time any item was removed/added to
the completion (rowsRemoved/rowsInserted signals), which was >3000 times when
completing history.

Also, the signals got connected multiple times if setting the same model, which
made the situation worse.

Fixes #734.
2015-06-05 07:16:33 +02:00
Florian Bruhin
c907572557 Merge branch 'yank-domain' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-yank-domain 2015-06-05 06:38:22 +02:00
Florian Bruhin
9ec6e6da80 Fix exit status codes to be 0-based. 2015-06-04 15:13:20 +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
Antoni Boucher
8b14145a4d Fixed style. 2015-06-03 19:31:31 -04:00
Martin Tournoij
78e159cb27 Add referer-header settng, #712 2015-06-04 01:26:00 +02:00
Martin Tournoij
472071c047 Add setting: 'content.third-party-cookie-policy', fixes #607
This sets the third-party cookie policy.

- I created a new ThirdPartyCookiePolicy() class, since this setting seems to be
  unique in the way it is set...

- I set the default to 'never', which is the most secure/private setting, but
  *may* break *some* features of a (very) limited number of sites; these are
  usually "non-critical" features.
  For example, on Stack Exchange sites you're logged in all 200+ sites if you
  sign in on one of them, this features required 3rd party cookies. You can
  still sign in with out, but you have to do so 200+ times (this is actually the
  only example I've ever noticed).

  AFAIK all "major" browsers accept 3rd-party cookies by default, except for
  Safari. Firefox also made this change, but reversed it (see:
  https://brendaneich.com/2013/05/c-is-for-cookie/), but they don't offer any
  good arguments to *not* have it IMHO, at least not that I could find.

  In any case, in my humble opinion "secure and private by default" is the best
  way to ship. But you're of course free to change it if you disagree ;-)
2015-06-04 00:26:39 +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