From 15cd21904ce95a09f19d013ed2ce5a13d664adac Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Tue, 4 Jul 2017 16:41:06 -0300 Subject: [PATCH] Change windows title showing current active service Fixes #843 --- 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 5c780959..5e9b9a50 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) {