Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv17346/src/gui

Modified Files:
        wxMApp.cpp 
Log Message:
allow the user to cancel closing of the log window (part of bug 645)

Index: wxMApp.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxMApp.cpp,v
retrieving revision 1.239
retrieving revision 1.240
diff -b -u -2 -r1.239 -r1.240
--- wxMApp.cpp  3 May 2002 14:32:02 -0000       1.239
+++ wxMApp.cpp  18 May 2002 17:28:50 -0000      1.240
@@ -347,5 +347,5 @@
 bool wxMLogWindow::OnFrameClose(wxFrame *frame)
 {
-   if ( !MDialog_YesNoDialog
+   switch ( MDialog_YesNoCancel
         (
          _("Would you like to close the log window only for the rest "
@@ -356,14 +356,28 @@
            "setting in the 'Miscellaneous' page of the Preferences dialog.\n"
            "\n"
-           "Choose \"Yes\" to close the log window just for this "
-           "session, \"No\" - to permanently close it."),
+                 "Choose \"Yes\" to close the log window just for this session,\n"
+                 "\"No\" - to permanently close it or \"Cancel\" to not close\n"
+                 "the log window at all."),
          NULL,
-         MDIALOG_MSGTITLE,
+               MDIALOG_YESNOTITLE,
          M_DLG_YES_DEFAULT,
          M_MSGBOX_SHOWLOGWINHINT
         ) )
    {
+      case MDlg_No:
       // disable the log window permanently
       mApplication->GetProfile()->writeEntry(MP_SHOWLOG, 0l);
+
+         // fall through
+      case MDlg_Yes:
+         break;
+
+      default:
+         FAIL_MSG( "unexpected MDialog_YesNoCancel return value" );
+         // fall through
+
+      case MDlg_Cancel:
+         // don't close
+         return false;
    }
 


_______________________________________________________________
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/

_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to