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

Modified Files:
        Project.cpp Project.h TrackPanel.cpp TrackPanel.h 
Log Message:
- Fix crash on import-raw select
- Improved warning text on closing with empty project
- Warn on close-empty moved from batch to interfaces
- More space in mute/solo buttons for translations

Index: Project.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Project.h,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -d -r1.122 -r1.123
--- Project.h   18 Jun 2007 16:10:54 -0000      1.122
+++ Project.h   23 Aug 2007 11:24:08 -0000      1.123
@@ -342,7 +342,7 @@
    TrackList *mTracks;
 //   ViewInfo mViewInfo;
 
-   int mSnapTo;
+   bool mSnapTo;
 
    TrackList *mLastSavedTracks;
 

Index: Project.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Project.cpp,v
retrieving revision 1.322
retrieving revision 1.323
diff -u -d -r1.322 -r1.323
--- Project.cpp 22 Aug 2007 15:48:58 -0000      1.322
+++ Project.cpp 23 Aug 2007 11:24:08 -0000      1.323
@@ -779,6 +779,7 @@
 
 void AudacityProject::UpdateGuiPrefs()
 {
+   gPrefs->Read(wxT("/GUI/EmptyCanBeDirty"), &mEmptyCanBeDirty, true );
    gPrefs->Read(wxT("/GUI/UpdateSpectrogram"), &mViewInfo.bUpdateSpectrogram, 
true);
    gPrefs->Read(wxT("/GUI/AutoScroll"), &mViewInfo.bUpdateTrackIndicator, 
true);
    gPrefs->Read(wxT("/GUI/TracksFitVerticallyZoomed"), 
&mTracksFitVerticallyZoomed, false);
@@ -786,7 +787,6 @@
 
 void AudacityProject::UpdateBatchPrefs()
 {
-   gPrefs->Read(wxT("/Batch/EmptyCanBeDirty"), &mEmptyCanBeDirty, true );
    gPrefs->Read(wxT("/Batch/CleanSpeechMode"), &mCleanSpeechMode, false);
    gPrefs->Read(wxT("/Batch/ShowId3Dialog"), &mShowId3Dialog, false);
    gPrefs->Read(wxT("/Batch/NormalizeOnLoad"),&mNormalizeOnLoad, false);
@@ -1450,7 +1450,13 @@
    // project is now empty.
        if (event.CanVeto() && (mEmptyCanBeDirty || bHasTracks)) {
       if (mUndoManager.UnsavedChanges()) {
-         int result = wxMessageBox(_("Save changes before closing?"),
+
+         wxString Message = _("Save changes before closing?");
+         if( !bHasTracks )
+         {
+            Message += _("\n\nSaved project will be empty!!\n\nTo save the 
tracks you previously\nhad, click cancel, restore the tracks\nusing undo, and 
then save.");
+         }
+         int result = wxMessageBox( Message,
                                    _("Save changes?"),
                                    wxYES_NO | wxCANCEL | wxICON_QUESTION,
                                    this);

Index: TrackPanel.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.cpp,v
retrieving revision 1.369
retrieving revision 1.370
diff -u -d -r1.369 -r1.370
--- TrackPanel.cpp      4 Aug 2007 21:22:54 -0000       1.369
+++ TrackPanel.cpp      23 Aug 2007 11:24:08 -0000      1.370
@@ -4685,7 +4685,9 @@
    mLastDrawnTrackRect = r;
 
    dc->SetTextForeground(theTheme.Colour( clrTrackPanelText ));
-   mTrackInfo.DrawBackground(dc, r, t->GetSelected(), labelw);
+   bool bIsWave = (t->GetKind() == Track::Wave);
+   mTrackInfo.DrawBackground(dc, r, t->GetSelected(), bIsWave, labelw );
+
    DrawBordersAroundTrack(t, dc, r, labelw, vrul);
    DrawShadow(t, dc, r);
 
@@ -4694,7 +4696,7 @@
    mTrackInfo.DrawTitleBar(dc, r, t, (mMouseCapture==IsPopping));
 
    mTrackInfo.DrawMinimize(dc, r, t, (mMouseCapture==IsMinimizing), 
t->GetMinimized());
-   mTrackInfo.DrawBordersWithin( dc, r );
+   mTrackInfo.DrawBordersWithin( dc, r, bIsWave );
 
    if (t->GetKind() == Track::Wave) {
       mTrackInfo.DrawMuteSolo(dc, r, t, (mMouseCapture == IsMuting), false);
@@ -6359,6 +6361,7 @@
 
 void TrackInfo::GetMuteSoloRect(const wxRect r, wxRect & dest, bool solo) const
 {
+#ifdef NOT_USED
    dest.x = r.x + 8;
    dest.y = r.y + 50;
    dest.width = 36;
@@ -6366,6 +6369,16 @@
 
    if (solo)
       dest.x += 36 + 8;
+#else
+   dest.x = r.x ;
+   dest.y = r.y + 50;
+   dest.width = 48;
+   dest.height = 16;
+
+   if (solo)
+      dest.x += 48;
+#endif
+
 }
 
 void TrackInfo::GetGainRect(const wxRect r, wxRect & dest) const
@@ -6392,25 +6405,45 @@
    dest.height = 15;
 }
 
-void TrackInfo::DrawBordersWithin(wxDC * dc, const wxRect r )
+void TrackInfo::DrawBordersWithin(wxDC * dc, const wxRect r, bool bHasMuteSolo 
)
 {
    dc->SetPen(*wxBLACK_PEN);
    // These black lines are actually within TrackInfo...
    dc->DrawLine(r.x, r.y + 16, GetTitleWidth(), r.y + 16);      // title bar
    dc->DrawLine(r.x + 16, r.y, r.x + 16, r.y + 16);     // close box
+
+   if( bHasMuteSolo && (r.height > (66+18) ))
+   {
+      dc->DrawLine(r.x, r.y + 50, GetTitleWidth(), r.y + 50);  // bevel above 
mute/solo
+      dc->DrawLine(r.x+48 , r.y+50, r.x+48, r.y + 66);         // line between 
mute/solo
+      dc->DrawLine(r.x, r.y + 66, GetTitleWidth(), r.y + 66);  // bevel below 
mute/solo
+   }
+
    dc->DrawLine(r.x, r.y + r.height - 19, GetTitleWidth(), r.y + r.height - 
19);  // minimize bar
 }
 
 void TrackInfo::DrawBackground(wxDC * dc, const wxRect r, bool bSelected,
-                             const int labelw)
+   bool bHasMuteSolo, const int labelw)
 {
    // fill in label
    wxRect fill = r;
-   fill.width = labelw - r.x;
+   fill.width = labelw - r.x+1;
    AColor::MediumTrackInfo(dc, bSelected);
    dc->DrawRectangle(fill); 
-   fill=wxRect( r.x+1, r.y+17, fill.width - 38, fill.height-37); 
-   AColor::BevelTrackInfo( *dc, true, fill );
+
+   if( bHasMuteSolo )
+   {
+      fill=wxRect( r.x+1, r.y+17, fill.width - 39, 32); 
+      AColor::BevelTrackInfo( *dc, true, fill );
+
+      fill=wxRect( r.x+1, r.y+67, fill.width, r.height-87); 
+      AColor::BevelTrackInfo( *dc, true, fill );
+   }
+   else
+   {
+      fill=wxRect( r.x+1, r.y+17, fill.width - 39, r.height-37); 
+      AColor::BevelTrackInfo( *dc, true, fill );
+   }
 }
 
 void TrackInfo::GetTrackControlsRect(const wxRect r, wxRect & dest) const

Index: TrackPanel.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/TrackPanel.h,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- TrackPanel.h        5 Jul 2007 11:55:37 -0000       1.119
+++ TrackPanel.h        23 Aug 2007 11:24:08 -0000      1.120
@@ -103,8 +103,8 @@
    void MakeMoreSliders();
    void EnsureSufficientSliders(int index);
 
-   void DrawBackground(wxDC * dc, const wxRect r, bool bSelected, const int 
labelw);
-   void DrawBordersWithin(wxDC * dc, const wxRect r );
+   void DrawBackground(wxDC * dc, const wxRect r, bool bSelected, bool 
bHasMuteSolo, const int labelw);
+   void DrawBordersWithin(wxDC * dc, const wxRect r, bool bHasMuteSolo );
    void DrawCloseBox(wxDC * dc, const wxRect r, bool down);
    void DrawTitleBar(wxDC * dc, const wxRect r, Track * t, bool down);
    void DrawMuteSolo(wxDC * dc, const wxRect r, Track * t, bool down, bool 
solo);


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to