[Amis-vcs] SF.net SVN: amis: [2238] branches/amis3
Brought to you by:
julienq,
marisademeglio
From: <dan...@us...> - 2007-12-03 14:25:25
|
Revision: 2238 http://amis.svn.sourceforge.net/amis/?rev=2238&view=rev Author: daniel_weck Date: 2007-12-03 06:25:28 -0800 (Mon, 03 Dec 2007) Log Message: ----------- - Daniel WECK * Fixed nasty bug where space character is escaped in URL syntax (%20). This is a hacky workaround that needs to be looked at properly. Modified Paths: -------------- branches/amis3/AmisAudio/TPBReader2/dmp/DmpCtl.cpp branches/amis3/AmisGuiMFC2/AmisSelfVoicing/AudioSequencePlayer.cpp branches/amis3/AmisGuiMFC2/src/gui/AmisGuiMFC2.cpp branches/amis3/AmisGuiMFC2/src/io/PreferencesFileIO.cpp Modified: branches/amis3/AmisAudio/TPBReader2/dmp/DmpCtl.cpp =================================================================== --- branches/amis3/AmisAudio/TPBReader2/dmp/DmpCtl.cpp 2007-12-03 12:35:37 UTC (rev 2237) +++ branches/amis3/AmisAudio/TPBReader2/dmp/DmpCtl.cpp 2007-12-03 14:25:28 UTC (rev 2238) @@ -318,7 +318,7 @@ logSession("Destroy filtergraph"); stop(); - if (hEventHandler) { + if (hEventHandler && pIGB != NULL) { bCatchEvents = true; bProcessEvents = true; @@ -810,10 +810,10 @@ lstrcpy(wFileName, (const unsigned short *) iszFileName); #endif - std::string strFileName; strFileName.assign(iszFileName); + // if (pIGB) destroyFilterGraph(); createFilterGraph(); Modified: branches/amis3/AmisGuiMFC2/AmisSelfVoicing/AudioSequencePlayer.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/AmisSelfVoicing/AudioSequencePlayer.cpp 2007-12-03 12:35:37 UTC (rev 2237) +++ branches/amis3/AmisGuiMFC2/AmisSelfVoicing/AudioSequencePlayer.cpp 2007-12-03 14:25:28 UTC (rev 2238) @@ -18,6 +18,7 @@ #include "gui/MmView.h" +//#include "ambulant/net/url.h" using namespace amis::audio; using namespace amis::tts; @@ -296,6 +297,8 @@ src = amis::util::FilePathTools::goRelativePath(tmpStr, src); src = amis::util::FilePathTools::getAsLocalFilePath(src); + + //src = ambulant::net::url::urlpath2filepath(src); string clipBegin = ""; string clipEnd = ""; Modified: branches/amis3/AmisGuiMFC2/src/gui/AmisGuiMFC2.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/gui/AmisGuiMFC2.cpp 2007-12-03 12:35:37 UTC (rev 2237) +++ branches/amis3/AmisGuiMFC2/src/gui/AmisGuiMFC2.cpp 2007-12-03 14:25:28 UTC (rev 2238) @@ -51,7 +51,6 @@ #include "gui/dialogs/SearchForBooksDialog.h" #include "gui/dialogs/MultipleBooksOnVolumeDialog.h" - //#include "../AmisAudio/AmisAudio.h" //using namespace amis::audio; Modified: branches/amis3/AmisGuiMFC2/src/io/PreferencesFileIO.cpp =================================================================== --- branches/amis3/AmisGuiMFC2/src/io/PreferencesFileIO.cpp 2007-12-03 12:35:37 UTC (rev 2237) +++ branches/amis3/AmisGuiMFC2/src/io/PreferencesFileIO.cpp 2007-12-03 14:25:28 UTC (rev 2238) @@ -102,7 +102,16 @@ { if (id.compare("ui-lang") == 0) { - mpPrefs->mUiLangDir = amis::util::FilePathTools::goRelativePath(mpPrefs->mSourceUrl.get_url(), value); + string strFileName = mpPrefs->mSourceUrl.get_url(); + + // TODO: This is a hacky workaround ! We need to globally make sure that URL syntax with escape characters is supported ! + int pos = strFileName.find("%20"); + while (pos != string::npos) { + strFileName = strFileName.replace(pos, 3, " "); + pos = strFileName.find("%20"); + } + + mpPrefs->mUiLangDir = amis::util::FilePathTools::goRelativePath(strFileName, value); } else if (id.compare("start-basic") == 0) @@ -115,7 +124,16 @@ else if (id.compare("user-bmk-dir") == 0) { - mpPrefs->mUserBmkDir = amis::util::FilePathTools::goRelativePath(mpPrefs->mSourceUrl.get_url(), value); + string strFileName = mpPrefs->mSourceUrl.get_url(); + + // TODO: This is a hacky workaround ! We need to globally make sure that URL syntax with escape characters is supported ! + int pos = strFileName.find("%20"); + while (pos != string::npos) { + strFileName = strFileName.replace(pos, 3, " "); + pos = strFileName.find("%20"); + } + + mpPrefs->mUserBmkDir = amis::util::FilePathTools::goRelativePath(strFileName, value); } else if (id.compare("load-last-dtb") == 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |