From ecd78dd7a24a70c0e41c246b1232613554dcfd8c Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 28 Dec 2009 12:20:24 +0100 Subject: Merge Request #79 with the changes discussed. 1) no more confirm dialog on exit 2) restore newtab page or home page on close last tab --- src/mainwindow.cpp | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b4174191..76ca447a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -922,42 +922,6 @@ void MainWindow::openNext() } -bool MainWindow::queryClose() -{ - if (m_view->count() > 1) - { - - int answer = KMessageBox::questionYesNoCancel( - this, - i18np("Are you sure you want to close the window?\n" \ - "You still have 1 tab open.", - "Are you sure you want to close the window?\n" \ - "You still have %1 tabs open.", - m_view->count()), - i18n("Closing rekonq"), - KStandardGuiItem::quit(), - KGuiItem(i18n("C&lose Current Tab"), KIcon("tab-close")), - KStandardGuiItem::cancel(), - "confirmClosingMultipleTabs"); - - switch (answer) - { - case KMessageBox::Yes: - // Quit - return true; - break; - case KMessageBox::No: - // Close only the current tab - m_view->closeTab(); - default: - return false; - } - } - - return true; -} - - void MainWindow::keyPressEvent(QKeyEvent *event) { // hide findbar -- cgit v1.2.1