diff options
author | Thomas Zander <zander@kde.org> | 2011-08-16 15:18:02 +0200 |
---|---|---|
committer | Thomas Zander <zander@kde.org> | 2011-08-17 19:12:56 +0200 |
commit | e00fb6a48ca506990e86ada7c2fbfd57f65b2fa1 (patch) | |
tree | 3714fce485a8ee618f2520e1e35392b565f1152d /src/mainwindow.cpp | |
parent | Revert "Fix quit action" (diff) | |
download | rekonq-e00fb6a48ca506990e86ada7c2fbfd57f65b2fa1.tar.xz |
Revert "This commit, available just for the master branch cause of the string changes,"
This reverts commit d4d034967f12b31f5a6b9274ec42d4e4fe27571c.
Conflicts:
src/mainwindow.cpp
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b9485bf3..89712961 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1489,26 +1489,29 @@ bool MainWindow::queryClose() if (QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled)) return true; - if (rApp->mainWindowList().count() > 1) + if (m_view->count() > 1) { int answer = KMessageBox::questionYesNoCancel( this, - i18n("Wanna close the window or the whole app?"), - i18n("Application/Window closing..."), - KGuiItem(i18n("C&lose Current Window"), KIcon("window-close")), + 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?"), KStandardGuiItem::quit(), + KGuiItem(i18n("C&lose Current Tab"), KIcon("tab-close")), KStandardGuiItem::cancel(), - "confirmClosingMultipleWindows" + "confirmClosingMultipleTabs" ); switch (answer) { case KMessageBox::Yes: + // Quit return true; case KMessageBox::No: - rApp->quit(); - return true; + // Close only the current tab + m_view->closeTab(); default: return false; |