[PATCH] Warning on close

Doug Hanley hanleyman at adelphia.net
Sat Jun 15 01:25:39 BST 2002


Hey,

How does this look for a warning on close patch?

-- Doug

------------------------------------------------------

Index: konq_mainwindow.cc
===================================================================
RCS file: /home/kde/kdebase/konqueror/konq_mainwindow.cc,v
retrieving revision 1.1013
diff -u -3 -p -r1.1013 konq_mainwindow.cc
--- konq_mainwindow.cc  14 Jun 2002 04:46:41 -0000      1.1013
+++ konq_mainwindow.cc  15 Jun 2002 00:11:11 -0000
@@ -3826,6 +3839,16 @@ void KonqMainWindow::updateBookmarkBar()
 void KonqMainWindow::closeEvent( QCloseEvent *e )
 {
   kdDebug(1202) << "KonqMainWindow::closeEvent begin" << endl;
+
+  if ( viewManager()->docContainer() && 
viewManager()->docContainer()->frameType()=="Tabs" )
+  {
+    if ( KMessageBox::warningYesNo( 0L, "You have multiple tabs open in this 
window, are you sure you wish to close it?", "Confirmation" ) == 
KMessageBox::No )
+    {
+      e->ignore();
+      return;
+    }
+  }
+
   // This breaks session management (the window is withdrawn in kwin)
   // so let's do this only when closed by the user.
   if ( static_cast<KonquerorApplication *>(kapp)->closedByUser() )




More information about the kfm-devel mailing list