mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
FCM, TabManager: add them to extension sub-menu.
This commit is contained in:
parent
3fd23a54cb
commit
e604120f49
@ -29,6 +29,7 @@
|
||||
#include <QSettings>
|
||||
#include <QTranslator>
|
||||
#include <QDir>
|
||||
#include <QMenu>
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
||||
#include <QProcessEnvironment>
|
||||
@ -121,6 +122,13 @@ void FCM_Plugin::showSettings(QWidget* parent)
|
||||
m_fcmDialog->showPage(2);
|
||||
}
|
||||
|
||||
void FCM_Plugin::populateExtensionsMenu(QMenu* menu)
|
||||
{
|
||||
QAction* showFCM = new QAction(QIcon(":/flashcookiemanager/data/flash-cookie-manager.png"), tr("Flash Cookie Manager"), menu);
|
||||
connect(showFCM, SIGNAL(triggered()), this, SLOT(showFlashCookieManager()));
|
||||
menu->addAction(showFCM);
|
||||
}
|
||||
|
||||
void FCM_Plugin::setFlashCookies(const QList<FlashCookie> &flashCookies)
|
||||
{
|
||||
m_flashCookies = flashCookies;
|
||||
@ -383,7 +391,7 @@ QWidget* FCM_Plugin::createStatusBarIcon(BrowserWindow* mainWindow)
|
||||
icon->setCursor(Qt::PointingHandCursor);
|
||||
QPixmap p(":/flashcookiemanager/data/flash-cookie-manager.png");
|
||||
icon->setPixmap(p.scaledToHeight(16));
|
||||
icon->setToolTip(tr("Show/Hide Flash Cookie Manager"));
|
||||
icon->setToolTip(tr("Show Flash Cookie Manager"));
|
||||
|
||||
connect(icon, SIGNAL(clicked(QPoint)), this, SLOT(showFlashCookieManager()));
|
||||
|
||||
|
@ -61,6 +61,7 @@ public:
|
||||
|
||||
QTranslator* getTranslator(const QString &locale);
|
||||
void showSettings(QWidget* parent = 0);
|
||||
void populateExtensionsMenu(QMenu* menu);
|
||||
|
||||
void setFlashCookies(const QList<FlashCookie> &flashCookies);
|
||||
QList<FlashCookie> flashCookies();
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <QSettings>
|
||||
#include <QAction>
|
||||
#include <QTimer>
|
||||
#include <QMenu>
|
||||
|
||||
QString TabManagerPlugin::s_settingsPath;
|
||||
|
||||
@ -135,6 +136,17 @@ void TabManagerPlugin::showSettings(QWidget* parent)
|
||||
}
|
||||
}
|
||||
|
||||
void TabManagerPlugin::populateExtensionsMenu(QMenu* menu)
|
||||
{
|
||||
if (m_controller->viewType() == TabManagerWidgetController::ShowAsWindow) {
|
||||
QAction* showAction = m_controller->createMenuAction();
|
||||
showAction->setParent(menu);
|
||||
showAction->setCheckable(false);
|
||||
connect(showAction, SIGNAL(triggered()), m_controller, SLOT(raiseTabManager()));
|
||||
menu->addAction(showAction);
|
||||
}
|
||||
}
|
||||
|
||||
void TabManagerPlugin::insertManagerWidget()
|
||||
{
|
||||
if (m_controller->viewType() == TabManagerWidgetController::ShowAsSideBar) {
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
|
||||
QTranslator* getTranslator(const QString &locale);
|
||||
void showSettings(QWidget* parent = 0);
|
||||
void populateExtensionsMenu(QMenu* menu);
|
||||
|
||||
void removeManagerWidget();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user