Merge branch 'master' of ssh://cmpl.cc:2323/qutebrowser
This commit is contained in:
commit
175d25b3c4
@ -68,9 +68,9 @@ Requirements
|
|||||||
The following software and libraries are required to run qutebrowser:
|
The following software and libraries are required to run qutebrowser:
|
||||||
|
|
||||||
* http://www.python.org/[Python] 3.4
|
* http://www.python.org/[Python] 3.4
|
||||||
* http://qt-project.org/[Qt] 5.2 or newer (5.3.1 recommended)
|
* http://qt-project.org/[Qt] 5.2.0 or newer (5.3.2 recommended)
|
||||||
* QtWebKit
|
* QtWebKit
|
||||||
* http://www.riverbankcomputing.com/software/pyqt/intro[PyQt] 5.2 or newer
|
* http://www.riverbankcomputing.com/software/pyqt/intro[PyQt] 5.2.0 or newer
|
||||||
(5.3.1 recommended) for Python 3
|
(5.3.1 recommended) for Python 3
|
||||||
* https://pypi.python.org/pypi/setuptools/[pkg_resources/setuptools]
|
* https://pypi.python.org/pypi/setuptools/[pkg_resources/setuptools]
|
||||||
* http://fdik.org/pyPEG/[pyPEG2]
|
* http://fdik.org/pyPEG/[pyPEG2]
|
||||||
|
3
doc/BUGS
3
doc/BUGS
@ -15,6 +15,7 @@ Downloads
|
|||||||
Webview
|
Webview
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Hinting got really slow (new webelement api?)
|
||||||
- Hint positions wrong in wordpress admin interface
|
- Hint positions wrong in wordpress admin interface
|
||||||
- Rightclick -> Copy link copies relative links
|
- Rightclick -> Copy link copies relative links
|
||||||
- F on duckduckgo result page opens in current page
|
- F on duckduckgo result page opens in current page
|
||||||
@ -35,6 +36,8 @@ Webview
|
|||||||
Input
|
Input
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- going to passthrough mode (Ctrl-V) then clicking element to go to insert
|
||||||
|
mode, then leaving insert mode clears statusbar text.
|
||||||
- seir sometimes sees "-- COMMAND MODE --" even though that should never
|
- seir sometimes sees "-- COMMAND MODE --" even though that should never
|
||||||
happen.
|
happen.
|
||||||
- Shift-Insert in commandline pastes clipboard instead of primary selection
|
- Shift-Insert in commandline pastes clipboard instead of primary selection
|
||||||
|
9
doc/TODO
9
doc/TODO
@ -32,6 +32,8 @@ New big features
|
|||||||
Certificate Patrol
|
Certificate Patrol
|
||||||
https://chrome.google.com/webstore/detail/remove-google-redirects/ccenmflbeofaceccfhhggbagkblihpoh
|
https://chrome.google.com/webstore/detail/remove-google-redirects/ccenmflbeofaceccfhhggbagkblihpoh
|
||||||
- session handling / saving
|
- session handling / saving
|
||||||
|
-> commandline parameter for session name, then tab list and history gets
|
||||||
|
saved under that name and can be re-loaded.
|
||||||
- multi window (see notes)
|
- multi window (see notes)
|
||||||
- IPC, like dwb -x (see notes)
|
- IPC, like dwb -x (see notes)
|
||||||
- Bookmarks
|
- Bookmarks
|
||||||
@ -54,6 +56,13 @@ Downloads
|
|||||||
Improvements / minor features
|
Improvements / minor features
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
|
- Command/page to show all keybindings?
|
||||||
|
- File moves:
|
||||||
|
- state should be in data, not config
|
||||||
|
- data/cache should be in subdirs on Windows if everything is in the same
|
||||||
|
dir.
|
||||||
|
- view_source using pygments
|
||||||
|
- check what exceptions open() calls could possibly throw
|
||||||
- Improve -m error message when we're inside the qutebrowser dir (maybe use a
|
- Improve -m error message when we're inside the qutebrowser dir (maybe use a
|
||||||
Tk gui?)
|
Tk gui?)
|
||||||
- Sane default for editor (maybe via QDesktopServices or so?)
|
- Sane default for editor (maybe via QDesktopServices or so?)
|
||||||
|
@ -388,15 +388,17 @@ class HintManager(QObject):
|
|||||||
Return:
|
Return:
|
||||||
A QUrl with the absolute URL, or None.
|
A QUrl with the absolute URL, or None.
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
text = elem['href']
|
text = elem['href']
|
||||||
if not text:
|
except KeyError:
|
||||||
return None
|
return None
|
||||||
|
url = QUrl(text)
|
||||||
|
if not url.isValid():
|
||||||
|
return None
|
||||||
|
if url.isRelative():
|
||||||
if baseurl is None:
|
if baseurl is None:
|
||||||
baseurl = self._context.baseurl
|
baseurl = self._context.baseurl
|
||||||
url = QUrl(text)
|
|
||||||
if url.isRelative():
|
|
||||||
url = baseurl.resolved(url)
|
url = baseurl.resolved(url)
|
||||||
qtutils.ensure_valid(url)
|
|
||||||
return url
|
return url
|
||||||
|
|
||||||
def _find_prevnext(self, frame, prev=False):
|
def _find_prevnext(self, frame, prev=False):
|
||||||
@ -466,7 +468,7 @@ class HintManager(QObject):
|
|||||||
raise cmdexc.CommandError("No {} links found!".format(
|
raise cmdexc.CommandError("No {} links found!".format(
|
||||||
"prev" if prev else "forward"))
|
"prev" if prev else "forward"))
|
||||||
url = self._resolve_url(elem, baseurl)
|
url = self._resolve_url(elem, baseurl)
|
||||||
if url is None or not url.isValid():
|
if url is None:
|
||||||
raise cmdexc.CommandError("No {} links found!".format(
|
raise cmdexc.CommandError("No {} links found!".format(
|
||||||
"prev" if prev else "forward"))
|
"prev" if prev else "forward"))
|
||||||
self.openurl.emit(url, newtab)
|
self.openurl.emit(url, newtab)
|
||||||
|
@ -242,19 +242,19 @@ class BrowserPage(QWebPage):
|
|||||||
return super().extension(ext, opt, out)
|
return super().extension(ext, opt, out)
|
||||||
return handler(opt, out)
|
return handler(opt, out)
|
||||||
except: # pylint: disable=bare-except
|
except: # pylint: disable=bare-except
|
||||||
|
if PYQT_VERSION >= 0x50302:
|
||||||
|
raise
|
||||||
|
else:
|
||||||
# WORKAROUND:
|
# WORKAROUND:
|
||||||
#
|
#
|
||||||
# Due to a bug in PyQt, exceptions inside extension() get
|
# Due to a bug in PyQt, exceptions inside extension() get
|
||||||
# swallowed:
|
# swallowed:
|
||||||
# http://www.riverbankcomputing.com/pipermail/pyqt/2014-August/034722.html
|
# http://www.riverbankcomputing.com/pipermail/pyqt/2014-August/034722.html
|
||||||
#
|
#
|
||||||
# We used to re-raise the exception with a single-shot QTimer here,
|
# We used to re-raise the exception with a single-shot QTimer
|
||||||
# but that lead to a strange proble with a KeyError with some
|
# here, but that lead to a strange proble with a KeyError with
|
||||||
# random jinja template stuff as content. For now, we only log it,
|
# some random jinja template stuff as content. For now, we only
|
||||||
# so it doesn't pass 100% silently.
|
# log it, so it doesn't pass 100% silently.
|
||||||
#
|
|
||||||
# FIXME: This should be fixed with PyQt 5.3.2 - re-check when it's
|
|
||||||
# out and raise the exception normally if possible.
|
|
||||||
log.webview.exception("Error inside WebPage::extension")
|
log.webview.exception("Error inside WebPage::extension")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -909,7 +909,7 @@ class WebKitBytesList(List):
|
|||||||
"set!".format(self.length))
|
"set!".format(self.length))
|
||||||
|
|
||||||
|
|
||||||
class ShellCommand(String):
|
class ShellCommand(BaseType):
|
||||||
|
|
||||||
"""A shellcommand which is split via shlex.
|
"""A shellcommand which is split via shlex.
|
||||||
|
|
||||||
@ -920,7 +920,7 @@ class ShellCommand(String):
|
|||||||
typestr = 'shell-command'
|
typestr = 'shell-command'
|
||||||
|
|
||||||
def __init__(self, placeholder=False, none_ok=False):
|
def __init__(self, placeholder=False, none_ok=False):
|
||||||
super().__init__(none_ok=none_ok)
|
super().__init__(none_ok)
|
||||||
self.placeholder = placeholder
|
self.placeholder = placeholder
|
||||||
|
|
||||||
def validate(self, value):
|
def validate(self, value):
|
||||||
@ -929,9 +929,12 @@ class ShellCommand(String):
|
|||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
raise ValidationError(value, "may not be empty!")
|
raise ValidationError(value, "may not be empty!")
|
||||||
super().validate(value)
|
|
||||||
if self.placeholder and '{}' not in self.transform(value):
|
if self.placeholder and '{}' not in self.transform(value):
|
||||||
raise ValidationError(value, "needs to contain a {}-placeholder.")
|
raise ValidationError(value, "needs to contain a {}-placeholder.")
|
||||||
|
try:
|
||||||
|
shlex.split(value)
|
||||||
|
except ValueError as e:
|
||||||
|
raise ValidationError(value, str(e))
|
||||||
|
|
||||||
def transform(self, value):
|
def transform(self, value):
|
||||||
if not value:
|
if not value:
|
||||||
|
@ -411,7 +411,7 @@ class TabbedBrowser(tabwidget.TabWidget):
|
|||||||
super().on_config_changed(section, option)
|
super().on_config_changed(section, option)
|
||||||
for tab in self._tabs:
|
for tab in self._tabs:
|
||||||
tab.on_config_changed(section, option)
|
tab.on_config_changed(section, option)
|
||||||
if (section, option) == ('tabbar', 'show-favicons'):
|
if (section, option) == ('tabs', 'show-favicons'):
|
||||||
show = config.get('tabs', 'show-favicons')
|
show = config.get('tabs', 'show-favicons')
|
||||||
for i, tab in enumerate(self.widgets()):
|
for i, tab in enumerate(self.widgets()):
|
||||||
if show:
|
if show:
|
||||||
|
@ -83,7 +83,7 @@ class TabWidget(QTabWidget):
|
|||||||
def on_config_changed(self, section, option):
|
def on_config_changed(self, section, option):
|
||||||
"""Update attributes when config changed."""
|
"""Update attributes when config changed."""
|
||||||
self.tabBar().on_config_changed(section, option)
|
self.tabBar().on_config_changed(section, option)
|
||||||
if section == 'tabbar':
|
if section == 'tabs':
|
||||||
self._init_config()
|
self._init_config()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user