mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Add Downloads, AdBlock and GreaseMonkey buttons to statusbar
This commit is contained in:
parent
24fa384d23
commit
7265c30aa8
@ -26,6 +26,7 @@
|
|||||||
#include "browserwindow.h"
|
#include "browserwindow.h"
|
||||||
#include "navigationbar.h"
|
#include "navigationbar.h"
|
||||||
#include "mainapplication.h"
|
#include "mainapplication.h"
|
||||||
|
#include "statusbar.h"
|
||||||
|
|
||||||
AdBlockPlugin::AdBlockPlugin()
|
AdBlockPlugin::AdBlockPlugin()
|
||||||
: QObject()
|
: QObject()
|
||||||
@ -84,7 +85,9 @@ void AdBlockPlugin::webPageDeleted(WebPage *page)
|
|||||||
|
|
||||||
void AdBlockPlugin::mainWindowCreated(BrowserWindow *window)
|
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)
|
bool AdBlockPlugin::acceptNavigationRequest(WebPage *page, const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame)
|
||||||
|
@ -385,7 +385,9 @@ void BrowserWindow::setupUi()
|
|||||||
m_statusBar->addPermanentWidget(m_progressBar);
|
m_statusBar->addPermanentWidget(m_progressBar);
|
||||||
m_statusBar->addPermanentWidget(m_ipLabel);
|
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();
|
QDesktopWidget* desktop = mApp->desktop();
|
||||||
int windowWidth = desktop->availableGeometry().width() / 1.3;
|
int windowWidth = desktop->availableGeometry().width() / 1.3;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "navigationbar.h"
|
#include "navigationbar.h"
|
||||||
#include "desktopnotificationsfactory.h"
|
#include "desktopnotificationsfactory.h"
|
||||||
#include "javascript/externaljsobject.h"
|
#include "javascript/externaljsobject.h"
|
||||||
|
#include "statusbar.h"
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@ -295,6 +296,7 @@ bool GM_Manager::canRunOnScheme(const QString &scheme)
|
|||||||
void GM_Manager::mainWindowCreated(BrowserWindow* window)
|
void GM_Manager::mainWindowCreated(BrowserWindow* window)
|
||||||
{
|
{
|
||||||
GM_Icon *icon = new GM_Icon(this);
|
GM_Icon *icon = new GM_Icon(this);
|
||||||
|
window->statusBar()->addButton(icon);
|
||||||
window->navigationBar()->addToolButton(icon);
|
window->navigationBar()->addToolButton(icon);
|
||||||
m_windows[window] = icon;
|
m_windows[window] = icon;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user