예제 #1
0
def message_warning(text: str) -> None:
    """Show a warning message in the statusbar.

    Args:
        text: The text to show.
    """
    message.warning(text)
예제 #2
0
def message_warning(text: str) -> None:
    """Show a warning message in the statusbar.

    Args:
        text: The text to show.
    """
    message.warning(text)
예제 #3
0
def message_warning(text: str, rich: bool = False) -> None:
    """Show a warning message in the statusbar.

    Args:
        text: The text to show.
        rich: Render the given text as
              https://doc.qt.io/qt-5/richtext-html-subset.html[Qt Rich Text].
    """
    message.warning(text, rich=rich)
예제 #4
0
파일: config.py 프로젝트: lufte/dotfiles
def new_on_navigation_request(self, navigation):
    self._old_on_navigation_request(navigation)
    if self.url().host() in (
            'www.elpais.com.uy',
            'www.ovaciondigital.com.uy',
            'negocios.elpais.com.uy',
            'www.tvshow.com.uy',
    ):
        if navigation.url.path().startswith('/user/suscripcion'):
            navigation.accepted = False
            message.warning("Blocked redirection to " +
                            navigation.url.toString())
예제 #5
0
def _possibly_show_missing_dependency_warning() -> None:
    """Show missing dependency warning, if appropriate.

    If the adblocking method is configured such that the Brave adblocker
    should be used, but the optional dependency is not satisfied, we show an
    error message.
    """
    adblock_info = version.MODULE_INFO["adblock"]

    method = config.val.content.blocking.method
    if method not in ("both", "adblock"):
        return

    if adblock_info.is_outdated():
        message.warning(
            f"Installed version {adblock_info.get_version()} of the 'adblock' "
            f"dependency is too old. Minimum supported is {adblock_info.min_version}."
        )
    elif not adblock_info.is_installed():
        message.warning(
            f"Ad blocking method is set to '{method}' but 'adblock' dependency is not "
            "installed.")
    else:
        message.warning(
            "The 'adblock' dependency was unavailable when qutebrowser was started, "
            "but now seems to be installed. Please :restart qutebrowser to use it."
        )
예제 #6
0
def do_redir(request):
    try:
        request.redirect(request.request_url)
    except Exception as e:
        message.warning("Error in config.py/do_redir(req):", e)