Updated Windows front-end to create version 3 cel URLs. Added detailed comment explaining the different cel URL time sources in url.h.

ver1_6_1
Chris Laurel 2008-10-22 21:12:05 +00:00
parent 6078948aa6
commit d716facf80
2 changed files with 17 additions and 4 deletions

View File

@ -28,12 +28,22 @@ class CelestiaState;
class Url
{
public:
enum UrlType {
enum UrlType
{
Absolute = 0,
Relative = 1,
Settings = 2,
};
/*! The TimeSource specifies what the time will be set to when the user
* activates the URL.
* - UseUrlTime indicates that the simulation time should be set to whatever
* value was stored in the URL.
* - UseSimulationTime means that the simulation time at activation is not
* changed.
* - UseSystemTime means that the simulation time will be set to whatever the
* current system time is when the URL is activated.
*/
enum TimeSource
{
UseUrlTime = 0,

View File

@ -453,7 +453,10 @@ static bool CopyStateURLToClipboard()
if (!b)
return false;
Url url(appCore);
CelestiaState appState;
appState.captureState(appCore);
Url url(appState, Url::CurrentVersion);
string urlString = url.getAsString();
char* s = const_cast<char*>(urlString.c_str());
@ -3898,7 +3901,7 @@ LRESULT CALLBACK MainWindowProc(HWND hWnd,
if (!urlString.substr(0,4).compare("cel:"))
{
appCore->flash(_("Loading URL"));
appCore->goToUrl(urlString);
appCore->goToUrl(urlString);
}
else if (DetermineFileType(urlString) == Content_CelestiaScript)
{