1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Add Downloads, AdBlock and GreaseMonkey buttons to statusbar

This commit is contained in:
David Rosca 2018-01-24 19:55:54 +01:00
parent 24fa384d23
commit 7265c30aa8
3 changed files with 9 additions and 2 deletions

View File

@ -26,6 +26,7 @@
#include "browserwindow.h"
#include "navigationbar.h"
#include "mainapplication.h"
#include "statusbar.h"
AdBlockPlugin::AdBlockPlugin()
: QObject()
@ -84,7 +85,9 @@ void AdBlockPlugin::webPageDeleted(WebPage *page)
void AdBlockPlugin::mainWindowCreated(BrowserWindow *window)
{
window->navigationBar()->addToolButton(new AdBlockIcon(window));
AdBlockIcon *icon = new AdBlockIcon(window);
window->statusBar()->addButton(icon);
window->navigationBar()->addToolButton(icon);
}
bool AdBlockPlugin::acceptNavigationRequest(WebPage *page, const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame)

View File

@ -385,7 +385,9 @@ void BrowserWindow::setupUi()
m_statusBar->addPermanentWidget(m_progressBar);
m_statusBar->addPermanentWidget(m_ipLabel);
m_navigationToolbar->addToolButton(new DownloadsButton(this));
DownloadsButton *downloadsButton = new DownloadsButton(this);
m_statusBar->addButton(downloadsButton);
m_navigationToolbar->addToolButton(downloadsButton);
QDesktopWidget* desktop = mApp->desktop();
int windowWidth = desktop->availableGeometry().width() / 1.3;

View File

@ -31,6 +31,7 @@
#include "navigationbar.h"
#include "desktopnotificationsfactory.h"
#include "javascript/externaljsobject.h"
#include "statusbar.h"
#include <QTimer>
#include <QDir>
@ -295,6 +296,7 @@ bool GM_Manager::canRunOnScheme(const QString &scheme)
void GM_Manager::mainWindowCreated(BrowserWindow* window)
{
GM_Icon *icon = new GM_Icon(this);
window->statusBar()->addButton(icon);
window->navigationBar()->addToolButton(icon);
m_windows[window] = icon;
}