From 14d6ca3fd0fac6babd4c3f996f3b0f962a373177 Mon Sep 17 00:00:00 2001 From: Ryan Zumstein Date: Sun, 22 Apr 2018 20:50:24 -0500 Subject: [PATCH] Add statusbar toggling --- app.js | 8 ++++++++ electron/menu.js | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/app.js b/app.js index 0013fec8..aabb5dc9 100644 --- a/app.js +++ b/app.js @@ -127,6 +127,14 @@ ipc.on('reloadCurrentService', function(e) { var tab = Ext.cq1('app-main').getActiveTab(); if ( tab.id !== 'ramboxTab' ) tab.reloadService(); }); +// Toggle Status Bar +ipc.on('toggleStatusBar', function() { + var tab = Ext.cq1('app-main').getActiveTab(); + + if ( tab.id !== 'ramboxTab' ) { + tab.down('statusbar').closed ? tab.setStatusBar(tab.record.get('statusbar')) : tab.closeStatusBar(); + } +}); // Focus the current service when Alt + Tab or click in webviews textfields window.addEventListener('focus', function() { if(Ext.cq1("app-main")) Ext.cq1("app-main").getActiveTab().down('component').el.dom.focus(); diff --git a/electron/menu.js b/electron/menu.js index ae47f71a..7b485e91 100644 --- a/electron/menu.js +++ b/electron/menu.js @@ -162,6 +162,15 @@ module.exports = function(config) { { type: 'separator' }, + { + label: '&Toggle Status Bar', + click() { + sendAction('toggleStatusBar'); + } + }, + { + type: 'separator' + }, { role: 'zoomin' },