Update of /cvsroot/audacity/audacity-src/src/import In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23176/src/import
Modified Files: Import.cpp Log Message: Be verbose about an audio file that should have been importable, but is not. Index: Import.cpp =================================================================== RCS file: /cvsroot/audacity/audacity-src/src/import/Import.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- Import.cpp 26 Jul 2009 21:38:05 -0000 1.55 +++ Import.cpp 11 Jan 2010 15:08:34 -0000 1.56 @@ -123,10 +123,10 @@ // This list is used to call plugins in correct order ImportPluginList importPlugins; - - bool haveCompatiblePlugin = false; - ImportPluginList::compatibility_iterator importPluginNode; + + // This list is used to remember plugins that should have been compatible with the file. + ImportPluginList compatiblePlugins; // If user explicitly selected a filter, // then we should try importing via corresponding plugin first @@ -148,7 +148,7 @@ importPlugins.Append(plugin); } if (plugin->SupportsExtension(extension)) - haveCompatiblePlugin = true; + compatiblePlugins.Append(plugin); importPluginNode = importPluginNode->GetNext(); } @@ -250,7 +250,7 @@ } #endif - if (!haveCompatiblePlugin) + if (compatiblePlugins.GetCount() <= 0) { // if someone has sent us a .cda file, send them away if (extension.IsSameAs(wxT("cda"), false)) { @@ -327,7 +327,20 @@ else { // We DO have a plugin for this file, but import failed. - errorMessage.Printf(_("Audacity recognized the type of the file '%s',\nbut was unable to import it."),fName.c_str()); + wxString pluglist = wxEmptyString; + + importPluginNode = compatiblePlugins.GetFirst(); + while(importPluginNode) + { + ImportPlugin *plugin = importPluginNode->GetData(); + if (pluglist == wxEmptyString) + pluglist = plugin->GetPluginFormatDescription(); + else + pluglist = pluglist + wxT(", ") + plugin->GetPluginFormatDescription(); + importPluginNode = importPluginNode->GetNext(); + } + + errorMessage.Printf(_("Audacity recognized the type of the file '%s'.\nImporters supposedly supporting such files are:\n%s,\nbut none of them understood this file format."),fName.c_str(), pluglist.c_str()); } return 0; ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Audacity-cvs mailing list Audacity-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/audacity-cvs