From: <mg...@us...> - 2008-02-23 11:12:27
|
Revision: 976 http://planeshift.svn.sourceforge.net/planeshift/?rev=976&view=rev Author: mgist Date: 2008-02-23 03:12:32 -0800 (Sat, 23 Feb 2008) Log Message: ----------- - Added a workaround for FS#483 from Vornne. Modified Paths: -------------- trunk/docs/history.txt trunk/src/client/gui/shortcutwindow.cpp Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2008-02-22 23:30:54 UTC (rev 975) +++ trunk/docs/history.txt 2008-02-23 11:12:32 UTC (rev 976) @@ -1,3 +1,6 @@ +*** 2008-02-23 by Mike Gist +- Added a workaround for FS#483 from Vornne. + *** 2008-02-22 by Mike Gist - Added support for loading colldet from reduced maps. Modified: trunk/src/client/gui/shortcutwindow.cpp =================================================================== --- trunk/src/client/gui/shortcutwindow.cpp 2008-02-22 23:30:54 UTC (rev 975) +++ trunk/src/client/gui/shortcutwindow.cpp 2008-02-23 11:12:32 UTC (rev 976) @@ -507,6 +507,40 @@ if (!found) // Don't save if no commands have been defined return ; +#if(CS_PROCESSOR_SIZE == 64) // Workaround pending CS trac #423 + csString xml; + xml += "<shortcuts>\n"; + csString nodeName, temp; + for (i=0;i < NUM_SHORTCUTS; i++) + { + if (cmds[i].IsEmpty()) + continue; + + nodeName.Format("shortcut%d", i + 1); + if (names[i].IsEmpty()) + { + temp.Format("%d", i); + } + else + { + temp = names[i]; + } + xml += " <"; xml += nodeName; xml +=" name=\""; xml += temp; xml += "\">"; + + if ( (strchr (cmds[i], '\r') != 0) + || (strchr (cmds[i], '\n') != 0) ) + { + temp.Format("<![CDATA[%s]]>", cmds[i].GetData() ); + } + else + { + temp = cmds[i]; + } + xml += temp; xml += "</"; xml += nodeName; xml += ">\n"; + } + xml += "</shortcuts>\n"; + vfs->WriteFile(COMMAND_FILE, xml.GetData(), xml.Length()); +#else // Save the commands with their labels csRef<iDocumentSystem> xml = csPtr<iDocumentSystem>(new csTinyDocumentSystem); csRef<iDocument> doc = xml->CreateDocument(); @@ -538,6 +572,7 @@ text->SetValue(cmds[i].GetData()); } doc->Write(vfs, COMMAND_FILE); +#endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |