[PATCH] Warning on close

Hans Meine hans_meine at gmx.net
Mon Jun 17 16:32:06 BST 2002


Doug Hanley <hanleyman at adelphia.net> writes:
> Ok, how's this?

Please add a dontAskAgainName.. :-)

> 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 05:43:53 -0000
> @@ -3826,13 +3839,24 @@ void KonqMainWindow::updateBookmarkBar()
>  void KonqMainWindow::closeEvent( QCloseEvent *e )
>  {
>    kdDebug(1202) << "KonqMainWindow::closeEvent begin" << endl;
> +
>    // 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() )
>    {
> +    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;
> +      }
> +    }
> +
>      hide();
>      qApp->flushX();
>    }
> +
>    KParts::MainWindow::closeEvent( e );
>    kdDebug(1202) << "KonqMainWindow::closeEvent end" << endl;
>  }

-- 
Ciao,  /  /
      /--/
     /  / ANS




More information about the kfm-devel mailing list