summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorDomrachev Alexandr <alexandr.domrachev@gmail.com>2009-06-18 22:39:08 +0400
committerDomrachev Alexandr <alexandr.domrachev@gmail.com>2009-06-18 22:39:08 +0400
commit1df70c152d9621a6b4ec41af19260e737f7ef58b (patch)
treea5a4dfe76a060466b9834a88fdd0b4f8391682f0 /src/mainwindow.cpp
parent.gitignore update (diff)
downloadrekonq-1df70c152d9621a6b4ec41af19260e737f7ef58b.tar.xz
MainWindow::slotPrivateBrowsing fix
Don't show private browsing confirmation dialog when disabling private browsing. Private browsing activation confirm dialog fix.
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index abc3fcd5..20ee31f8 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -288,7 +288,7 @@ void MainWindow::setupActions()
a = new KAction(KIcon("view-media-artist"), i18n("Private &Browsing"), this);
a->setCheckable(true);
actionCollection()->addAction(QLatin1String("private_browsing"), a);
- connect(a, SIGNAL(triggered(bool)) , this, SLOT(slotPrivateBrowsing(bool)));
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(slotPrivateBrowsing(bool)));
// ================ history related actions
m_historyBackAction = new KAction(KIcon("go-previous"), i18n("Back"), this);
@@ -524,7 +524,7 @@ void MainWindow::printRequested(QWebFrame *frame)
void MainWindow::slotPrivateBrowsing(bool enable)
{
QWebSettings *settings = QWebSettings::globalSettings();
- if (enable)
+ if (enable && !settings->testAttribute(QWebSettings::PrivateBrowsingEnabled))
{
QString title = i18n("Are you sure you want to turn on private browsing?");
QString text = "<b>" + title + i18n("</b><br><br>When private browsing is turned on,"
@@ -535,8 +535,8 @@ void MainWindow::slotPrivateBrowsing(bool enable)
" Until you close the window, you can still click the Back and Forward buttons" \
" to return to the web pages you have opened.");
- int button = KMessageBox::questionYesNo(this, text, title);
- if (button == KMessageBox::Ok)
+ int button = KMessageBox::questionYesNo(this, text, title);
+ if (button == KMessageBox::Yes)
{
settings->setAttribute(QWebSettings::PrivateBrowsingEnabled, true);
}