Update of /cvsroot/audacity/audacity-src/src
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv29565

Modified Files:
        Menus.cpp 
Log Message:
Workaround for permanently disabled Undo menu item when applying chains.

Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.285
retrieving revision 1.286
diff -u -d -r1.285 -r1.286
--- Menus.cpp   12 Oct 2006 04:13:50 -0000      1.285
+++ Menus.cpp   15 Oct 2006 07:41:55 -0000      1.286
@@ -957,11 +957,33 @@
       mCommandManager.Modify(wxT("Undo"),
                              wxString::Format(_("&Undo %s"),
                                               desc.c_str()));
+      // LL:  Hackage Alert!!!
+      //
+      // On the Mac, all menu state changes are ignored if a modal
+      // dialog is displayed.
+      //
+      // An example of this is when applying chains where the "Undo"
+      // menu state should change when each command executes.  But,
+      // since the state changes are ignored, the "Undo" menu item
+      // will never get enabled.  And unfortunately, this will cause
+      // the menu item to be permanently disabled since the recorded
+      // state is enabled (even though it isn't) causing the routines
+      // to ignore the new enable request.
+      //
+      // So, the workaround is to transition the item back to disabled
+      // and then to enabled.  (Sorry, I couldn't find a better way of
+      // doing it.)
+      //
+      // See src/mac/carbon/menuitem.cpp, wxMenuItem::Enable() for more
+      // info.
+      mCommandManager.Enable(wxT("Undo"), false);
       mCommandManager.Enable(wxT("Undo"), true);
    }
    else {
       mCommandManager.Modify(wxT("Undo"), 
                              wxString::Format(_("Can't Undo")));
+      // LL: See above
+      mCommandManager.Enable(wxT("Undo"), true);
       mCommandManager.Enable(wxT("Undo"), false);
    }
 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to