From: <ag...@us...> - 2012-01-11 21:28:26
|
Revision: 2672 http://zoolib.svn.sourceforge.net/zoolib/?rev=2672&view=rev Author: agreen Date: 2012-01-11 21:28:20 +0000 (Wed, 11 Jan 2012) Log Message: ----------- Look for version number under different key, really only valid with Flash. Modified Paths: -------------- trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.cpp Modified: trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.cpp 2012-01-11 21:27:58 UTC (rev 2671) +++ trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_GuestFactory.cpp 2012-01-11 21:28:20 UTC (rev 2672) @@ -145,15 +145,17 @@ return null; } +// Note that the use of CFBundleShortVersionString here is because it's where Flash +// reliably puts a usable major version number. + ZQ<int> spQGetMajorVersion(const ZMap_CF& iMap) - { return spQGetMajorVersion(iMap.Get(kCFBundleVersionKey).GetCFString()); } + { return spQGetMajorVersion(iMap.Get(CFSTR("CFBundleShortVersionString")).GetCFString()); } ZQ<int> spQGetMajorVersion(const ZRef<CFBundleRef>& iBundleRef) { if (iBundleRef) { - if (ZRef<CFStringRef> theStringRef = - (CFStringRef)::CFBundleGetValueForInfoDictionaryKey(iBundleRef, kCFBundleVersionKey)) + if (ZRef<CFStringRef> theStringRef = (CFStringRef)::CFBundleGetValueForInfoDictionaryKey(iBundleRef, CFSTR("CFBundleShortVersionString"))) { return spQGetMajorVersion(theStringRef); } } return null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |