You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Separate version hash from version number in editor and project manager
When copy-pasting the version from About dialog to bug reports at GitHub, this makes the version hash linkable to commits at GitHub.
This commit is contained in:
@@ -141,7 +141,7 @@ EditorAbout::EditorAbout() {
|
|||||||
version_btn = memnew(LinkButton);
|
version_btn = memnew(LinkButton);
|
||||||
String hash = String(VERSION_HASH);
|
String hash = String(VERSION_HASH);
|
||||||
if (hash.length() != 0) {
|
if (hash.length() != 0) {
|
||||||
hash = "." + hash.left(9);
|
hash = " " + vformat("[%s]", hash.left(9));
|
||||||
}
|
}
|
||||||
version_btn->set_text(VERSION_FULL_NAME + hash);
|
version_btn->set_text(VERSION_FULL_NAME + hash);
|
||||||
// Set the text to copy in metadata as it slightly differs from the button's text.
|
// Set the text to copy in metadata as it slightly differs from the button's text.
|
||||||
|
|||||||
@@ -6632,7 +6632,7 @@ EditorNode::EditorNode() {
|
|||||||
version_btn->set_text(VERSION_FULL_CONFIG);
|
version_btn->set_text(VERSION_FULL_CONFIG);
|
||||||
String hash = String(VERSION_HASH);
|
String hash = String(VERSION_HASH);
|
||||||
if (hash.length() != 0) {
|
if (hash.length() != 0) {
|
||||||
hash = "." + hash.left(9);
|
hash = " " + vformat("[%s]", hash.left(9));
|
||||||
}
|
}
|
||||||
// Set the text to copy in metadata as it slightly differs from the button's text.
|
// Set the text to copy in metadata as it slightly differs from the button's text.
|
||||||
version_btn->set_meta(META_TEXT_TO_COPY, "v" VERSION_FULL_BUILD + hash);
|
version_btn->set_meta(META_TEXT_TO_COPY, "v" VERSION_FULL_BUILD + hash);
|
||||||
|
|||||||
@@ -2621,7 +2621,7 @@ ProjectManager::ProjectManager() {
|
|||||||
version_btn = memnew(LinkButton);
|
version_btn = memnew(LinkButton);
|
||||||
String hash = String(VERSION_HASH);
|
String hash = String(VERSION_HASH);
|
||||||
if (hash.length() != 0) {
|
if (hash.length() != 0) {
|
||||||
hash = "." + hash.left(9);
|
hash = " " + vformat("[%s]", hash.left(9));
|
||||||
}
|
}
|
||||||
version_btn->set_text("v" VERSION_FULL_BUILD + hash);
|
version_btn->set_text("v" VERSION_FULL_BUILD + hash);
|
||||||
// Fade the version label to be less prominent, but still readable.
|
// Fade the version label to be less prominent, but still readable.
|
||||||
|
|||||||
Reference in New Issue
Block a user