Introduce a non-explicit getUserDefault-method

This commit is contained in:
Zirro
2016-08-05 21:40:34 +02:00
parent 24befe2454
commit 04b8bd03ae
2 changed files with 4 additions and 3 deletions

View File

@@ -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 ?= {}

View File

@@ -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'