mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
cleanup(atom): Get rid of core.autoHideMenuBar option—we'll never show a menu bar on windows
This commit is contained in:
parent
be103b22bf
commit
45fa6d0a8b
5 changed files with 1 additions and 23 deletions
|
@ -641,6 +641,7 @@ class Atom extends Model
|
|||
@requireUserInitScript() unless safeMode
|
||||
@menu.update()
|
||||
|
||||
|
||||
@commands.add 'atom-workspace',
|
||||
'atom-workspace:add-account': =>
|
||||
@newWindow
|
||||
|
@ -687,9 +688,6 @@ class Atom extends Model
|
|||
@setWindowDimensions({width, height}) if width and height
|
||||
|
||||
@menu.update()
|
||||
@subscribe @config.onDidChange 'core.autoHideMenuBar', ({newValue}) =>
|
||||
@setAutoHideMenuBar(newValue)
|
||||
@setAutoHideMenuBar(true) if @config.get('core.autoHideMenuBar')
|
||||
|
||||
ipc.sendChannel('window-command', 'window:loaded')
|
||||
|
||||
|
@ -903,10 +901,6 @@ class Atom extends Model
|
|||
updateAvailable: (details) ->
|
||||
@emitter.emit 'update-available', details
|
||||
|
||||
setAutoHideMenuBar: (autoHide) ->
|
||||
ipc.send('call-window-method', 'setAutoHideMenuBar', autoHide)
|
||||
ipc.send('call-window-method', 'setMenuBarVisibility', !autoHide)
|
||||
|
||||
# Lets multiple components register beforeUnload callbacks.
|
||||
# The callbacks are expected to return either true or false.
|
||||
#
|
||||
|
|
|
@ -24,7 +24,6 @@ class AtomWindow
|
|||
toolbar,
|
||||
resizable,
|
||||
pathToOpen,
|
||||
hideMenuBar,
|
||||
@isSpec,
|
||||
@devMode,
|
||||
@safeMode,
|
||||
|
@ -57,7 +56,6 @@ class AtomWindow
|
|||
height: height
|
||||
resizable: resizable ? true
|
||||
icon: @constructor.iconPath
|
||||
'auto-hide-menu-bar': hideMenuBar
|
||||
'web-preferences':
|
||||
'direct-write': true
|
||||
'subpixel-font-scaling': true
|
||||
|
|
|
@ -266,7 +266,6 @@ class WindowManager
|
|||
devMode: @devMode
|
||||
safeMode: @safeMode
|
||||
windowType: 'popout'
|
||||
hideMenuBar: true
|
||||
resourcePath: @resourcePath
|
||||
bootstrapScript: require.resolve("../window-secondary-bootstrap")
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
path = require 'path'
|
||||
fs = require 'fs-plus'
|
||||
|
||||
# This is loaded by atom.coffee. See https://atom.io/docs/api/latest/Config for
|
||||
# more information about config schemas.
|
||||
module.exports =
|
||||
|
@ -56,9 +53,3 @@ module.exports =
|
|||
type: 'string'
|
||||
default: 'reply-all'
|
||||
enum: ['reply', 'reply-all']
|
||||
|
||||
if process.platform in ['win32', 'linux']
|
||||
module.exports.core.properties.autoHideMenuBar =
|
||||
type: 'boolean'
|
||||
default: false
|
||||
description: 'Automatically hide the menu bar and toggle it by pressing Alt. This is only supported on Windows & Linux.'
|
||||
|
|
|
@ -82,10 +82,6 @@ class WindowEventHandler
|
|||
ReactRemote = require './react-remote/react-remote-parent'
|
||||
ReactRemote.toggleContainerVisible()
|
||||
|
||||
if process.platform in ['win32', 'linux']
|
||||
@subscribeToCommand $(window), 'window:toggle-menu-bar', ->
|
||||
atom.config.set('core.autoHideMenuBar', !atom.config.get('core.autoHideMenuBar'))
|
||||
|
||||
@subscribeToCommand $(document), 'core:focus-next', @focusNext
|
||||
|
||||
@subscribeToCommand $(document), 'core:focus-previous', @focusPrevious
|
||||
|
|
Loading…
Reference in a new issue