diff --git a/exports/atom.js b/exports/atom.js index 50c8c687f..7bb7cdb1e 100644 --- a/exports/atom.js +++ b/exports/atom.js @@ -27,7 +27,12 @@ const atomExport = { // Shell integration is required by both Squirrel and Settings-View if (process.platform === 'win32') { - atomExport.WinShell = require('../src/main-process/win-shell') + Object.defineProperty(atomExport, 'WinShell', { + enumerable: true, + get () { + return require('../src/main-process/win-shell') + } + }) } // The following classes can't be used from a Task handler and should therefore diff --git a/src/color.js b/src/color.js index 9db9e9b16..6208d6837 100644 --- a/src/color.js +++ b/src/color.js @@ -85,6 +85,10 @@ export default class Color { return `rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})` } + toJSON () { + return this.alpha === 1 ? this.toHexString() : this.toRGBAString() + } + isEqual (color) { if (this === color) { return true diff --git a/src/main-process/win-shell.coffee b/src/main-process/win-shell.coffee index ea070f555..94c841c47 100644 --- a/src/main-process/win-shell.coffee +++ b/src/main-process/win-shell.coffee @@ -43,6 +43,7 @@ exports.appName = appName exports.fileHandler = new ShellOption("\\Software\\Classes\\Applications\\#{exeName}", [ {key: 'shell\\open\\command', name: '', value: "#{appPath} \"%1\""}, + {key: 'shell\\open', name: 'FriendlyAppName', value: "#{appName}"}, {key: 'DefaultIcon', name: '', value: "#{fileIconPath}"} ] )