From 7249ca2ba99cef77ab3388caa2a7e6cecf4cbcca Mon Sep 17 00:00:00 2001 From: Justin Cherniak Date: Tue, 9 May 2017 19:33:33 -0700 Subject: [PATCH] Update titlebar of application to include title of active tab to assist with time tracking programs --- app/view/main/MainController.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/view/main/MainController.js b/app/view/main/MainController.js index 786ae565..92c2ad4e 100644 --- a/app/view/main/MainController.js +++ b/app/view/main/MainController.js @@ -10,10 +10,20 @@ Ext.define('Rambox.view.main.MainController', { // Set Google Analytics event ga_storage._trackPageview('/index.html', 'main'); - if ( newTab.id === 'ramboxTab' || !newTab.record.get('enabled') ) return; + if ( newTab.id === 'ramboxTab' ) { + document.title = 'Rambox'; + return; + } + + if (!newTab.record.get('enabled') ) { + return; + } var webview = newTab.down('component').el.dom; if ( webview ) webview.focus(); + + // Update the main window so it includes the active tab title. + document.title = 'Rambox - ' + newTab.title; } ,updatePositions: function(tabPanel, tab) {