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

Modified Files:
        Menus.cpp 
Log Message:
Show SnapTo state in menu items

Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.315
retrieving revision 1.316
diff -u -d -r1.315 -r1.316
--- Menus.cpp   26 May 2007 06:11:11 -0000      1.315
+++ Menus.cpp   27 May 2007 09:31:50 -0000      1.316
@@ -162,7 +162,8 @@
    AudioIOBusyFlag        = 0x00040000,  //lll
    PlayRegionLockedFlag   = 0x00080000,  //msmeyer
    PlayRegionNotLockedFlag= 0x00100000,  //msmeyer
-   CutCopyAvailableFlag   = 0x00200000   //lll
+   CutCopyAvailableFlag   = 0x00200000,  //lll
+   SnapToFlag             = 0x00400000   //lll
 };
 
 wxString SHOW(const wxString &toolbarName)
@@ -508,8 +509,8 @@
    c->AddItem(wxT("SnapOn"),         _("On"),                        
FN(OnSnapOn));
    /* i18n-hint: Set snap-to mode on or off */
    c->AddItem(wxT("SnapOff"),        _("Off"),                       
FN(OnSnapOff));
-
-   c->SetCommandFlags(0, 0, wxT("SnapOn"), wxT("SnapOff"), NULL);
+   c->SetCommandFlags(wxT("SnapOn"), ~SnapToFlag, SnapToFlag);
+   c->SetCommandFlags(wxT("SnapOff"), SnapToFlag, SnapToFlag);
 
    c->EndSubMenu();
    
@@ -1125,7 +1126,11 @@
       flags |= ZoomOutAvailableFlag;
 
    flags |= GetFocusedFrame();
-   
+
+   if (mSnapTo) {
+      flags |= SnapToFlag;
+   }
+
    if (IsPlayRegionLocked())
       flags |= PlayRegionLockedFlag;
    else


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to