]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed checking/unchecking find/replace items in the menu problem (they becameo ut...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 2 Jul 2002 22:30:31 +0000 (22:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 2 Jul 2002 22:30:31 +0000 (22:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/dialogs/dialogs.cpp

index 27f7e946403509cfa74aa227e2851e6aeb099239..a18f46079f8e80d4e898acda60a2b89f1a464599 100644 (file)
@@ -655,6 +655,7 @@ void MyFrame::ShowProgress( wxCommandEvent& WXUNUSED(event) )
                             this,   // parent
                             wxPD_CAN_ABORT |
                             wxPD_APP_MODAL |
+                            // wxPD_AUTO_HIDE | -- try this as well
                             wxPD_ELAPSED_TIME |
                             wxPD_ESTIMATED_TIME |
                             wxPD_REMAINING_TIME);
@@ -796,25 +797,34 @@ void MyFrame::OnFindDialog(wxFindDialogEvent& event)
     {
         wxFindReplaceDialog *dlg = event.GetDialog();
 
+        int idMenu;
         const wxChar *txt;
         if ( dlg == m_dlgFind )
         {
             txt = _T("Find");
+            idMenu = DIALOGS_FIND;
             m_dlgFind = NULL;
         }
         else if ( dlg == m_dlgReplace )
         {
             txt = _T("Replace");
+            idMenu = DIALOGS_REPLACE;
             m_dlgReplace = NULL;
         }
         else
         {
             txt = _T("Unknown");
+            idMenu = -1;
 
             wxFAIL_MSG( _T("unexpected event") );
         }
 
-        wxLogMessage(wxT("%s dialog is being closed."), txt),
+        wxLogMessage(wxT("%s dialog is being closed."), txt);
+
+        if ( idMenu != -1 )
+        {
+            GetMenuBar()->Check(idMenu, FALSE);
+        }
 
         dlg->Destroy();
     }