From 11fa0d96626b4417718aeef2cf8316a97bce02ed Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 8 Apr 2009 10:59:12 +0200 Subject: Asking user to close rekonq if there are more than 1 tabs opened.. (Oh, Dear.. my English..) --- src/mainwindow.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 20020ca3..249dd389 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -763,4 +763,21 @@ void MainWindow::slotShowMenubar(bool enable) menuBar()->show(); else menuBar()->hide(); +} + + +bool MainWindow::queryClose() +{ + if (m_view->count() > 1) + { + int ret = KMessageBox::warningYesNo(this, + i18n("Are you sure you want to close the window?" " There are %1 tab open" , m_view->count() ), + i18n("Closing") + ); + if (ret == KMessageBox::No) + { + return false; + } + } + return true; } \ No newline at end of file -- cgit v1.2.1