X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserPC.git;a=blobdiff_plain;f=src%2Fwindows%2FBrowserWindow.cpp;fp=src%2Fwindows%2FBrowserWindow.cpp;h=2484061633266d0e7e3d5d49ddb57c38aaed5ad1;hp=33aef29f77ad309caf13e4acc3ad3d5c6b1cf30a;hb=1ce11bc5f6630bf81aa67bdaca411fbea93dc017;hpb=273588ac3f6077b62c1fb2b55b9cdc6b5e200fad diff --git a/src/windows/BrowserWindow.cpp b/src/windows/BrowserWindow.cpp index 33aef29..2484061 100644 --- a/src/windows/BrowserWindow.cpp +++ b/src/windows/BrowserWindow.cpp @@ -189,8 +189,8 @@ BrowserWindow::BrowserWindow() : KXmlGuiWindow() // Display dialogs. connect(zoomFactorActionPointer, SIGNAL(triggered()), this, SLOT(getZoomFactorFromUser())); - connect(cookiesActionPointer, SIGNAL(triggered()), this, SLOT(openCookiesDialog())); - connect(domainSettingsActionPointer, SIGNAL(triggered()), this, SLOT(openDomainSettings())); + connect(cookiesActionPointer, SIGNAL(triggered()), this, SLOT(showCookiesDialog())); + connect(domainSettingsActionPointer, SIGNAL(triggered()), this, SLOT(showDomainSettingsDialog())); // Connect the URL toolbar actions. connect(javaScriptActionPointer, SIGNAL(triggered()), this, SLOT(toggleJavaScript())); @@ -447,7 +447,27 @@ void BrowserWindow::loadUrlFromLineEdit(const QString &url) const browserViewPointer->loadUrlFromLineEdit(url); } -void BrowserWindow::openCookiesDialog() +void BrowserWindow::refresh() const +{ + // Remove the focus from the URL line edit. + urlLineEditPointer->clearFocus(); + + // Refresh the web page. + browserViewPointer->refresh(); +} + +void BrowserWindow::removeCookieFromList(const QNetworkCookie &cookie) const +{ + //qDebug() << "Remove cookie: " << cookie.toRawForm(); + + // Remove the cookie from the list. + cookieListPointer->remove(cookie); + + // Update the action text. + cookiesActionPointer->setText(i18nc("The Cookies action, which also displays the number of cookies", "Cookies - %1", cookieListPointer->size())); +} + +void BrowserWindow::showCookiesDialog() { // Remove the focus from the URL line edit. urlLineEditPointer->clearFocus(); @@ -464,7 +484,7 @@ void BrowserWindow::openCookiesDialog() connect(cookiesDialogPointer, SIGNAL(deleteCookie(QNetworkCookie)), browserViewPointer, SLOT(deleteCookieFromStore(QNetworkCookie))); } -void BrowserWindow::openDomainSettings() const +void BrowserWindow::showDomainSettingsDialog() const { // Remove the focus from the URL line edit. urlLineEditPointer->clearFocus(); @@ -479,26 +499,6 @@ void BrowserWindow::openDomainSettings() const connect(domainSettingsDialogPointer, SIGNAL(domainSettingsUpdated()), browserViewPointer, SLOT(applyDomainSettingsAndReload())); } -void BrowserWindow::refresh() const -{ - // Remove the focus from the URL line edit. - urlLineEditPointer->clearFocus(); - - // Refresh the web page. - browserViewPointer->refresh(); -} - -void BrowserWindow::removeCookieFromList(const QNetworkCookie &cookie) const -{ - //qDebug() << "Remove cookie: " << cookie.toRawForm(); - - // Remove the cookie from the list. - cookieListPointer->remove(cookie); - - // Update the action text. - cookiesActionPointer->setText(i18nc("The Cookies action, which also displays the number of cookies", "Cookies - %1", cookieListPointer->size())); -} - void BrowserWindow::showProgressBar(const int &progress) const { // Set the progress bar value.