summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authoradolson <adolson@gmail.com>2014-04-09 22:50:30 -0400
committeradolson <adolson@gmail.com>2014-04-09 22:50:30 -0400
commitc6df9d8a41582c404ba49750f6a5a659331513f5 (patch)
tree50e006fed64e3c5da5bc12dbef87490096c98e55 /tools/editor
parente1970a4dda6742d9f89ce9ee60381e570f222a11 (diff)
editor window title improvements
Shows the project name in the window title (good to differentiate multiple instances of Godot with different projects loaded). Clears the previous scene name from the window title when creating a new scene.
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/editor_node.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index efb0f72239..197754cf81 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -97,13 +97,14 @@ EditorNode *EditorNode::singleton=NULL;
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 title = edited.empty()?String(VERSION_FULL_NAME):String(_MKSTR(VERSION_NAME) + String(" - ")+edited.get_file());
+ if (!edited.empty())
+ title+=" - " + String(edited.get_file());
if (unsaved_cache)
title+=" (*)";
-
OS::get_singleton()->set_window_title(title);
}
@@ -1588,6 +1589,8 @@ void EditorNode::_cleanup_scene() {
}
}
+
+ _update_title();
}