summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2014-04-22 14:41:43 -0300
committerreduz <reduzio@gmail.com>2014-04-22 14:41:43 -0300
commit31f88a700656fc89877864e864d27b70e9aff70f (patch)
tree696137b5992ff66ffc25613f97c7af1532d3a142
parent71cfed8a76fabd0653365d79ae87ad6e68c7bbbc (diff)
parentc6df9d8a41582c404ba49750f6a5a659331513f5 (diff)
Merge pull request #272 from adolson/patch-1
editor window title improvements
-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 e799c103d0..4ed565fdc3 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();
}