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

Modified Files:
      Tag: Audacity_UmixIt
        Lyrics.cpp 
Log Message:
bug fix, in case mBrandingPanel not created

Index: Lyrics.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Attic/Lyrics.cpp,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -d -r1.1.2.6 -r1.1.2.7
--- Lyrics.cpp  30 Nov 2006 23:34:20 -0000      1.1.2.6
+++ Lyrics.cpp  12 Dec 2006 03:17:23 -0000      1.1.2.7
@@ -62,12 +62,10 @@
       wxString strURL = pBranding->GetBrandURL();
 
       wxString strIMGtag = "";
-      wxString strLogoFilename = pBranding->GetBrandLogoFilename();
-      if (!strLogoFilename.IsEmpty()){
-         wxString strLogoPathname = 
-            pProject->GetDirManager()->GetProjectDataDir() + wxFILE_SEP_PATH + 
strLogoFilename;
-         if (::wxFileExists(FILENAME(strLogoPathname))) 
-            strIMGtag = "<img src=\"" + FILENAME(strLogoPathname) + "\" 
alt=\"" + strLogoFilename + "\"><br>";
+      wxFileName brandLogoFileName = pBranding->GetBrandLogoFileName();
+      if (brandLogoFileName.IsOk() && brandLogoFileName.FileExists()){
+         strIMGtag = "<img src=\"" + FILENAME(brandLogoFileName.GetFullPath()) 
+ 
+                        "\" alt=\"" + brandLogoFileName.GetFullName() + 
"\"><br>";
       }
 
       if (strURL.IsEmpty()) {
@@ -94,6 +92,7 @@
       mBrandingPanel->SetPage(strBranding);
       mBrandingHeight = DEFAULT_BRANDING_HEIGHT;
    } else {
+      mBrandingPanel = NULL;
       mBrandingHeight = 0;
    }
 
@@ -382,13 +381,16 @@
 void Lyrics::OnSize(wxSizeEvent &evt)
 {
    GetClientSize(&mWidth, &mHeight);
-   //vvv UmixIt: Remove lower lyrics display for BNL release.
-   int nTenthOfHeight = mHeight / 10;
-   mBrandingHeight = (DEFAULT_BRANDING_HEIGHT > nTenthOfHeight) ? 
DEFAULT_BRANDING_HEIGHT : nTenthOfHeight;
-   mKaraokeHeight = (mHeight - mBrandingHeight); // gray bar? * 9 / 10; // 
mHeight * 3 / 4; // mKaraokeHeight = mHeight / 2;
-   // mBrandingPanel->SetSize(0, mKaraokeHeight, mWidth, mHeight - 
mKaraokeHeight);
-   mBrandingPanel->SetSize(0, mKaraokeHeight, // gray bar? (mHeight - 
mBrandingHeight), 
-                           mWidth, mBrandingHeight);
+   if (mBrandingPanel != NULL) {
+      int nTenthOfHeight = mHeight / 10;
+      mBrandingHeight = (DEFAULT_BRANDING_HEIGHT > nTenthOfHeight) ? 
DEFAULT_BRANDING_HEIGHT : nTenthOfHeight;
+      mKaraokeHeight = (mHeight - mBrandingHeight); // gray bar? * 9 / 10; // 
mHeight * 3 / 4; // mKaraokeHeight = mHeight / 2;
+      // mBrandingPanel->SetSize(0, mKaraokeHeight, mWidth, mHeight - 
mKaraokeHeight);
+      mBrandingPanel->SetSize(0, mKaraokeHeight, // gray bar? (mHeight - 
mBrandingHeight), 
+                              mWidth, mBrandingHeight);
+   } else {
+      mKaraokeHeight = mHeight;
+   }
    
    gKaraokeFontPointSize = (int)((float)(DEFAULT_FONT_POINTSIZE * mHeight) / 
(float)LYRICS_DEFAULT_HEIGHT);
    // Usually don't get the size window we want, usually less than 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to