You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Merge pull request #272 from adolson/patch-1
editor window title improvements
This commit is contained in:
@@ -97,13 +97,14 @@ EditorNode *EditorNode::singleton=NULL;
|
|||||||
|
|
||||||
void EditorNode::_update_title() {
|
void EditorNode::_update_title() {
|
||||||
|
|
||||||
|
String appname = Globals::get_singleton()->get("application/name");
|
||||||
|
String title = appname.empty()?String(VERSION_FULL_NAME):String(_MKSTR(VERSION_NAME) + String(" - ") + appname);
|
||||||
String edited = edited_scene?edited_scene->get_filename():String();
|
String edited = edited_scene?edited_scene->get_filename():String();
|
||||||
|
if (!edited.empty())
|
||||||
String title = edited.empty()?String(VERSION_FULL_NAME):String(_MKSTR(VERSION_NAME) + String(" - ")+edited.get_file());
|
title+=" - " + String(edited.get_file());
|
||||||
if (unsaved_cache)
|
if (unsaved_cache)
|
||||||
title+=" (*)";
|
title+=" (*)";
|
||||||
|
|
||||||
|
|
||||||
OS::get_singleton()->set_window_title(title);
|
OS::get_singleton()->set_window_title(title);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1588,6 +1589,8 @@ void EditorNode::_cleanup_scene() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_update_title();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user