mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Introduce a non-explicit getUserDefault-method
This commit is contained in:
@@ -136,8 +136,8 @@ class ApplicationDelegate
|
||||
getPrimaryDisplayWorkAreaSize: ->
|
||||
remote.screen.getPrimaryDisplay().workAreaSize
|
||||
|
||||
getAppleActionOnDoubleClick: ->
|
||||
remote.systemPreferences.getUserDefault("AppleActionOnDoubleClick", "string")
|
||||
getUserDefault: (key, type) ->
|
||||
remote.systemPreferences.getUserDefault(key, type)
|
||||
|
||||
confirm: ({message, detailedMessage, buttons}) ->
|
||||
buttons ?= {}
|
||||
|
||||
@@ -17,7 +17,8 @@ class TitleBar
|
||||
@updateWindowSheetOffset()
|
||||
|
||||
dblclickHandler: =>
|
||||
switch @applicationDelegate.getAppleActionOnDoubleClick()
|
||||
# User preference deciding which action to take on a title bar double-click
|
||||
switch @applicationDelegate.getUserDefault('AppleActionOnDoubleClick', 'string')
|
||||
when 'Minimize'
|
||||
@applicationDelegate.minimizeWindow()
|
||||
when 'Maximize'
|
||||
|
||||
Reference in New Issue
Block a user