Easier way to reference the program website in commands

This commit is contained in:
David Capello 2014-05-05 21:28:58 -03:00
parent e624b391c2
commit fa204baf42
3 changed files with 10 additions and 6 deletions

View File

@ -390,20 +390,20 @@
<separator />
<item command="Launch" text="Quick &amp;Reference">
<param name="type" value="url" />
<param name="path" value="http://aseprite.org/quickref/" />
<param name="path" value="/quickref/" />
</item>
<item command="Launch" text="Documentation">
<param name="type" value="url" />
<param name="path" value="http://aseprite.org/docs/" />
<param name="path" value="/docs/" />
</item>
<item command="Launch" text="Tutorial">
<param name="type" value="url" />
<param name="path" value="http://aseprite.org/tutorial/" />
<param name="path" value="/tutorial/" />
</item>
<separator />
<item command="Launch" text="Release Notes">
<param name="type" value="url" />
<param name="path" value="http://aseprite.org/release-notes/" />
<param name="path" value="/release-notes/" />
</item>
<item command="Launch" text="Twitter">
<param name="type" value="url" />
@ -412,7 +412,7 @@
<separator />
<item command="Launch" text="&amp;Donate">
<param name="type" value="url" />
<param name="path" value="http://aseprite.org/donate/" />
<param name="path" value="/donate/" />
</item>
<item command="About" text="&amp;About" />
</menu>

View File

@ -63,6 +63,10 @@ void LaunchCommand::onLoadParams(Params* params)
m_type = Url;
m_path = params->get("path");
if (m_type == Url && !m_path.empty() && m_path[0] == '/') {
m_path = WEBSITE + m_path.substr(1);
}
}
void LaunchCommand::onExecute(Context* context)

View File

@ -34,7 +34,7 @@
// General information
#define PACKAGE "Aseprite"
#define VERSION "1.0.0-dev"
#define WEBSITE "http://aseprite.org/"
#define WEBSITE "http://www.aseprite.org/"
#define WEBSITE_DOWNLOAD WEBSITE "download/"
#define WEBSITE_CONTRIBUTORS WEBSITE "contributors/"
#define COPYRIGHT "Copyright (C) 2001-2014 David Capello"