UI: Add a link to the GitHub commit in the Help menu
The "Go to GitHub commit" item in the Help menu opens the URL https://github.com/solvespace/solvespace/commits/5efc148 and allows the user to see the date of the commit that SolveSpace was built from. Closes #1172pull/1192/head
parent
bb7a6cbbba
commit
f94fc89587
|
@ -2,6 +2,7 @@
|
||||||
#define SOLVESPACE_CONFIG_H
|
#define SOLVESPACE_CONFIG_H
|
||||||
|
|
||||||
#define PACKAGE_VERSION "@PROJECT_VERSION@~@solvespace_GIT_HASH@"
|
#define PACKAGE_VERSION "@PROJECT_VERSION@~@solvespace_GIT_HASH@"
|
||||||
|
#define GIT_HASH_URL "https://github.com/solvespace/solvespace/commit/@solvespace_GIT_HASH@"
|
||||||
|
|
||||||
/* Non-OS X *nix only */
|
/* Non-OS X *nix only */
|
||||||
#define UNIX_DATADIR "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATAROOTDIR@/solvespace"
|
#define UNIX_DATADIR "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATAROOTDIR@/solvespace"
|
||||||
|
|
|
@ -183,6 +183,7 @@ const MenuEntry Menu[] = {
|
||||||
{ 0, N_("&Help"), Command::NONE, 0, KN, mHelp },
|
{ 0, N_("&Help"), Command::NONE, 0, KN, mHelp },
|
||||||
{ 1, N_("&Language"), Command::LOCALE, 0, KN, mHelp },
|
{ 1, N_("&Language"), Command::LOCALE, 0, KN, mHelp },
|
||||||
{ 1, N_("&Website / Manual"), Command::WEBSITE, 0, KN, mHelp },
|
{ 1, N_("&Website / Manual"), Command::WEBSITE, 0, KN, mHelp },
|
||||||
|
{ 1, N_("&Go to GitHub commit"), Command::GITHUB, 0, KN, mHelp },
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
{ 1, N_("&About"), Command::ABOUT, 0, KN, mHelp },
|
{ 1, N_("&About"), Command::ABOUT, 0, KN, mHelp },
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1056,6 +1056,10 @@ void SolveSpaceUI::MenuHelp(Command id) {
|
||||||
PACKAGE_VERSION, 2022);
|
PACKAGE_VERSION, 2022);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case Command::GITHUB:
|
||||||
|
Platform::OpenInBrowser(GIT_HASH_URL);
|
||||||
|
break;
|
||||||
|
|
||||||
default: ssassert(false, "Unexpected menu ID");
|
default: ssassert(false, "Unexpected menu ID");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue