From f3b457d8bae178139843baad3e987566fe79ba42 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Fri, 28 Aug 2015 17:33:46 -0400 Subject: [PATCH 1/2] Add a notification when toggling the menu bar Refs #4289 --- src/window-event-handler.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/window-event-handler.coffee b/src/window-event-handler.coffee index 25baf0443..e5235ee7e 100644 --- a/src/window-event-handler.coffee +++ b/src/window-event-handler.coffee @@ -86,9 +86,13 @@ class WindowEventHandler @subscribeToCommand $(window), 'window:toggle-dev-tools', -> atom.toggleDevTools() if process.platform in ['win32', 'linux'] - @subscribeToCommand $(window), 'window:toggle-menu-bar', -> + @subscribeToCommand $(window), 'window:toggle-menu-bar', => atom.config.set('core.autoHideMenuBar', not atom.config.get('core.autoHideMenuBar')) + if atom.config.get('core.autoHideMenuBar') + detail = "To toggle, press the Alt key or execute the window:toggle-menu-bar command" + atom.notifications.addInfo('Menu bar hidden', {detail}) + @subscribeToCommand $(document), 'core:focus-next', @focusNext @subscribeToCommand $(document), 'core:focus-previous', @focusPrevious From 01b9c3a0b0b38e665f44b3dde377fd418e084916 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Fri, 28 Aug 2015 18:06:04 -0400 Subject: [PATCH 2/2] :shirt: No fat arrow --- src/window-event-handler.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window-event-handler.coffee b/src/window-event-handler.coffee index e5235ee7e..10ea89dca 100644 --- a/src/window-event-handler.coffee +++ b/src/window-event-handler.coffee @@ -86,7 +86,7 @@ class WindowEventHandler @subscribeToCommand $(window), 'window:toggle-dev-tools', -> atom.toggleDevTools() if process.platform in ['win32', 'linux'] - @subscribeToCommand $(window), 'window:toggle-menu-bar', => + @subscribeToCommand $(window), 'window:toggle-menu-bar', -> atom.config.set('core.autoHideMenuBar', not atom.config.get('core.autoHideMenuBar')) if atom.config.get('core.autoHideMenuBar')