Update window title when application is activated.

Variables customizing `windowTitle` such as `$TM_SCM_BRANCH` can change while TM is inactive, while user is working in command line or different app. So it is better to refresh `windowTitle` once we get back to TM.
This commit is contained in:
Adam Strzelecki
2012-08-28 21:57:18 +02:00
parent d31aefd20d
commit c28d2ec2fd

View File

@@ -369,7 +369,12 @@ OAK_DEBUG_VAR(DocumentController);
{
DocumentController* controller = (DocumentController*)[window delegate];
if([controller isKindOfClass:[DocumentController class]] && !controller->documentTabs.empty())
{
[controller->textView performSelector:@selector(applicationDidBecomeActiveNotification:) withObject:aNotification];
settings_t const& settings = [controller selectedDocument]->settings();
controller.windowTitle = [NSString stringWithCxxString:settings.get(kSettingsWindowTitleKey, [controller selectedDocument]->display_name())];
}
}
}