summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-08-28 17:57:45 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-09-08 05:57:20 +0200
commit58ee46342aa14cdbf5b9db40705926acaf39888a (patch)
treec4a54525efbec2abed8af78add61ffdd3cbcf129 /src
parentRevert "Revert "Fix quit action"" (diff)
downloadrekonq-58ee46342aa14cdbf5b9db40705926acaf39888a.tar.xz
Revert "Revert "This commit, available just for"
"the master branch cause of the string changes,"" This reverts commit e00fb6a48ca506990e86ada7c2fbfd57f65b2fa1.
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 84068837..d1650f36 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1491,29 +1491,26 @@ bool MainWindow::queryClose()
if (QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled))
return true;
- if (m_view->count() > 1)
+ if (rApp->mainWindowList().count() > 1)
{
int answer = KMessageBox::questionYesNoCancel(
this,
- i18np("Are you sure you want to close the window?\n" "You have 1 tab open.",
- "Are you sure you want to close the window?\n" "You have %1 tabs open.",
- m_view->count()),
- i18n("Are you sure you want to close the window?"),
+ i18n("Wanna close the window or the whole app?"),
+ i18n("Application/Window closing..."),
+ KGuiItem(i18n("C&lose Current Window"), KIcon("window-close")),
KStandardGuiItem::quit(),
- KGuiItem(i18n("C&lose Current Tab"), KIcon("tab-close")),
KStandardGuiItem::cancel(),
- "confirmClosingMultipleTabs"
+ "confirmClosingMultipleWindows"
);
switch (answer)
{
case KMessageBox::Yes:
- // Quit
return true;
case KMessageBox::No:
- // Close only the current tab
- m_view->closeTab();
+ rApp->quit();
+ return true;
default:
return false;