mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
parent
effda91f7c
commit
055210ca0a
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2014 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2014-2016 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -32,6 +32,7 @@
|
|||||||
#include "clearprivatedata.h"
|
#include "clearprivatedata.h"
|
||||||
#include "qzsettings.h"
|
#include "qzsettings.h"
|
||||||
#include "pluginproxy.h"
|
#include "pluginproxy.h"
|
||||||
|
#include "webinspector.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
@ -587,6 +588,9 @@ void MainMenu::init()
|
|||||||
ADD_ACTION("Tools/WebInspector", m_menuTools, QIcon(), tr("Web In&spector"), SLOT(toggleWebInspector()), "Ctrl+Shift+I");
|
ADD_ACTION("Tools/WebInspector", m_menuTools, QIcon(), tr("Web In&spector"), SLOT(toggleWebInspector()), "Ctrl+Shift+I");
|
||||||
ADD_ACTION("Tools/ClearRecentHistory", m_menuTools, QIcon::fromTheme(QSL("edit-clear")), tr("Clear Recent &History"), SLOT(showClearRecentHistoryDialog()), "Ctrl+Shift+Del");
|
ADD_ACTION("Tools/ClearRecentHistory", m_menuTools, QIcon::fromTheme(QSL("edit-clear")), tr("Clear Recent &History"), SLOT(showClearRecentHistoryDialog()), "Ctrl+Shift+Del");
|
||||||
|
|
||||||
|
if (!WebInspector::isEnabled())
|
||||||
|
m_actions.value(QSL("Tools/WebInspector"))->setVisible(false);
|
||||||
|
|
||||||
m_submenuExtensions = new QMenu(tr("&Extensions"));
|
m_submenuExtensions = new QMenu(tr("&Extensions"));
|
||||||
m_submenuExtensions->menuAction()->setVisible(false);
|
m_submenuExtensions->menuAction()->setVisible(false);
|
||||||
m_menuTools->addMenu(m_submenuExtensions);
|
m_menuTools->addMenu(m_submenuExtensions);
|
||||||
|
@ -96,8 +96,10 @@ void PopupWebView::_contextMenuEvent(QContextMenuEvent *event)
|
|||||||
|
|
||||||
createContextMenu(m_menu, hitTest);
|
createContextMenu(m_menu, hitTest);
|
||||||
|
|
||||||
|
if (WebInspector::isEnabled()) {
|
||||||
m_menu->addSeparator();
|
m_menu->addSeparator();
|
||||||
m_menu->addAction(tr("Inspect Element"), this, SLOT(inspectElement()));
|
m_menu->addAction(tr("Inspect Element"), this, SLOT(inspectElement()));
|
||||||
|
}
|
||||||
|
|
||||||
if (!m_menu->isEmpty()) {
|
if (!m_menu->isEmpty()) {
|
||||||
// Prevent choosing first option with double rightclick
|
// Prevent choosing first option with double rightclick
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* ============================================================
|
/* ============================================================
|
||||||
* QupZilla - WebKit based browser
|
* QupZilla - WebKit based browser
|
||||||
* Copyright (C) 2010-2015 David Rosca <nowrep@gmail.com>
|
* Copyright (C) 2010-2016 David Rosca <nowrep@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -31,6 +31,7 @@
|
|||||||
#include "adblockicon.h"
|
#include "adblockicon.h"
|
||||||
#include "locationbar.h"
|
#include "locationbar.h"
|
||||||
#include "webhittestresult.h"
|
#include "webhittestresult.h"
|
||||||
|
#include "webinspector.h"
|
||||||
|
|
||||||
#include <QHostInfo>
|
#include <QHostInfo>
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
@ -206,8 +207,10 @@ void TabbedWebView::_contextMenuEvent(QContextMenuEvent *event)
|
|||||||
m_menu->addAction(m_window->adBlockIcon()->menuAction());
|
m_menu->addAction(m_window->adBlockIcon()->menuAction());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (WebInspector::isEnabled()) {
|
||||||
m_menu->addSeparator();
|
m_menu->addSeparator();
|
||||||
m_menu->addAction(tr("Inspect Element"), this, SLOT(inspectElement()));
|
m_menu->addAction(tr("Inspect Element"), this, SLOT(inspectElement()));
|
||||||
|
}
|
||||||
|
|
||||||
if (!m_menu->isEmpty()) {
|
if (!m_menu->isEmpty()) {
|
||||||
// Prevent choosing first option with double rightclick
|
// Prevent choosing first option with double rightclick
|
||||||
|
Loading…
Reference in New Issue
Block a user