diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2011-04-04 17:14:35 +0200 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2011-04-04 17:14:35 +0200 | 
| commit | d4d034967f12b31f5a6b9274ec42d4e4fe27571c (patch) | |
| tree | b746bfc3c15b2ddc975ef2686093dfbb46bb6ddd | |
| parent | Fix quit action (diff) | |
| download | rekonq-d4d034967f12b31f5a6b9274ec42d4e4fe27571c.tar.xz | |
This commit, available just for the master branch cause of the string changes,
modifies rekonq behavior on closing multiple tabs.
Nothing is more asked on that, while a confirmation dialog is triggered when the user tries to close a window.
Depending on the windows number, the user is requested if he likes to close the whole app or (just) the current window
PS: sorry, my English sucks today...
| -rw-r--r-- | src/mainwindow.cpp | 23 | 
1 files changed, 10 insertions, 13 deletions
| diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e6286a81..7b4e3eeb 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1474,29 +1474,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?"), -                         KStandardGuiItem::quit(), -                         KGuiItem(i18n("C&lose Current Tab"), KIcon("tab-close")), -                         KStandardGuiItem::cancel(), -                         "confirmClosingMultipleTabs" +                        this, +                        i18n("Wanna close the window or the whole app?"), +                        i18n("Application/Window closing..."), +                        KGuiItem(i18n("C&lose Current Window"), KIcon("window-close")), +                        KStandardGuiItem::quit(), +                        KStandardGuiItem::cancel(), +                        "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; | 
