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

Modified Files:
        FileNames.cpp FileNames.h HelpText.cpp Menus.cpp Menus.h 
Log Message:
-First pass at a help index.

Index: Menus.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.h,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- Menus.h     16 Sep 2007 13:45:58 -0000      1.110
+++ Menus.h     18 Sep 2007 11:49:26 -0000      1.111
@@ -272,6 +272,7 @@
         // Help Menu
 
 void OnAbout();
+void OnHelp();
 void OnHelpWelcome();
 void OnBenchmark();
 void OnScreenshot();

Index: FileNames.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/FileNames.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- FileNames.cpp       11 Sep 2007 22:24:31 -0000      1.13
+++ FileNames.cpp       18 Sep 2007 11:49:26 -0000      1.14
@@ -92,6 +92,18 @@
    return gDataDir;
 }
 
+wxString FileNames::HtmlHelpDir()
+{
+   // FIX-ME uses DataDir().  Should use directory where we expect help to be.
+   // Perhaps it's same directory as Audacity.exe?
+   return FileNames::MkDir( wxFileName( DataDir(), wxT("Help") ).GetFullPath() 
);
+}
+
+wxString FileNames::HtmlHelpIndexFile()
+{
+   return wxFileName( HtmlHelpDir(), wxT("index.htm") ).GetFullPath();
+}
+
 wxString FileNames::ChainDir()
 {
    return FileNames::MkDir( wxFileName( DataDir(), wxT("Chains") 
).GetFullPath() );

Index: FileNames.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/FileNames.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- FileNames.h 11 Sep 2007 22:24:31 -0000      1.9
+++ FileNames.h 18 Sep 2007 11:49:26 -0000      1.10
@@ -23,6 +23,8 @@
    static wxString TempDir();
    static wxString DataDir();
    static wxString AutoSaveDir();
+   static wxString HtmlHelpDir();
+   static wxString HtmlHelpIndexFile();
    static wxString ChainDir();
    static wxString NRPDir();
    static wxString NRPFile();

Index: Menus.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/Menus.cpp,v
retrieving revision 1.342
retrieving revision 1.343
diff -u -d -r1.342 -r1.343
--- Menus.cpp   16 Sep 2007 20:44:12 -0000      1.342
+++ Menus.cpp   18 Sep 2007 11:49:26 -0000      1.343
@@ -90,6 +90,7 @@
 
 #include "FileDialog.h"
 #include "SplashDialog.h"
+#include "widgets/ErrorDialog.h"
 
 enum {
    kAlignZero=0,
@@ -728,6 +729,7 @@
       c->AddItem(wxT("About"),          _("&About Audacity..."),          
FN(OnAbout));
 
    c->AddItem(wxT("Welcome"),          _("&Start Up Message..."),          
FN(OnHelpWelcome));
+   c->AddItem(wxT("Help"),             _("&Index..."),                      
FN(OnHelp));
 
 
 #if 1 // Debugging tools are enabled in unstable builds
@@ -4247,6 +4249,14 @@
    dlog.ShowModal();
 }
 
+void AudacityProject::OnHelp()
+{
+   ShowHelpDialog( 
+      this, 
+      FileNames::HtmlHelpIndexFile(), 
+      wxT("http://audacity.sourceforge.net/help/documentation";  ));
+}
+
 void AudacityProject::OnBenchmark()
 {
    ::RunBenchmark(this);

Index: HelpText.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/HelpText.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- HelpText.cpp        16 Sep 2007 23:52:01 -0000      1.3
+++ HelpText.cpp        18 Sep 2007 11:49:26 -0000      1.4
@@ -80,6 +80,10 @@
    {
       return _("Supported Formats");
    }
+   if(Key ==  wxT("remotehelp") )
+   {
+      return _("No Local Help");
+   }
    return Key;
 }
 
@@ -202,35 +206,6 @@
       return WrapText(
          wxString(wxT(""))+
 
-#ifdef EXACTLY_AS_IN_FAQ
-_("<h2>Can Audacity import file formats like WMA, AAC, FLAC, etc.?</h2> ") +
-_("<p>Audacity <b>cannot</b> import or export files in ") +
-_("<b>WMA, AAC, RealAudio, Shorten (SHN)</b>, ") +
-_("or most other proprietary formats, or any kind of Digital Rights ") +
-_("Management (DRM) protected file, including many purchased online such ") +
-_("as on iTunes or Napster. Because of licensing and patent restrictions, ") +
-_("we are not allowed to add these formats to Audacity. Future versions of ") +
-_("Audacity might be able to support these formats using codecs installed ") +
-_("in your operating system.</p> ") +
-_("<p>Some open formats are not yet supported by Audacity, including <b>Ogg 
Speex</b> ") +
-_("and <b>FLAC</b>.  We hope to support these formats in future versions of 
Audacity.</p> ") +
-_("<p>Audacity can currently import WAV, AIFF, AU, MP2/MP3 and OGG Vorbis ") +
-_("files. If you cannot import your file into Audacity, you can as a ") +
-_("workround convert it to WAV or AIFF. As long as it's not a ") +
-_("DRM-protected file, you could do this with iTunes® or with ") +
-_("<a href=\"http://www.erightsoft.com/SUPER.html#Dnload\";>SUPER</a> ") +
-_("player. If it's a DRM-protected file, you can burn it to an audio CD in ") +
-_("the application that is licensed to play it, then extract (rip) the CD ") +
-_("track to WAV or AIFF. On Windows, you can use Windows Media Player 11, ") +
-_("iTunes, or <a href=\"http://cdexos.sourceforge.net/?q=download\";>CDex</a> 
to ") +
-_("extract to WAV. Or you can play the file on your computer and record it – 
") +
-_("see <a 
href=\"http://audacity.sourceforge.net/help/faq?s=recording&amp;i=streaming\";> 
") +
-_("Can Audacity record RealAudio or other streaming audio?</a>.</p> ") +
-_("<p>For more detail on supported formats, see the ") +
-_("<a href=\"http://audacity.sourceforge.net/about/features\";>feature 
list</a>.</p> ") +
-_("<p>See also: <a 
href=\"http://audacity.sourceforge.net/help/faq?s=files&amp;i=midi\";> ") +
-_("Why can't I play MIDI files?</a></p>")
-#else
 _("<p>Audacity can currently import WAV, AIFF, AU, MP2/MP3 and OGG Vorbis ") +
 _("files.") +
 _("<p>Audacity <b>cannot</b> import or export files in ") +
@@ -245,7 +220,17 @@
 _("and <b>FLAC</b>.") +
 _("<p>More information is available on line ") +
 _("<a 
href=\"http://audacity.sourceforge.net/help/faq?s=files&i=wma-proprietary\";>here</a>
 ")
-#endif
+         );
+   }
+   if(Key ==  wxT("remotehelp") )
+   {
+// *URL* will be replaced by whatever URL we are looking for.
+      return WrapText(
+         wxString(wxT(""))+
+_("<p>You don't appear to have Audacity help files on your machine. ") +
+_("You can download the help files and then access them from ") +
+_("Audacity or you can click <a href=\"*URL*\">here</a> to read ") +
+_("the help online.")
          );
    }
    return wxT("");


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to