From e5fc6154826b24cc8421298d72d7007c54a9f999 Mon Sep 17 00:00:00 2001 From: rhysd Date: Sat, 30 Jan 2016 02:11:56 +0900 Subject: [PATCH] github-electron: Add app.dock.setIcon() API https://github.com/atom/electron/blob/master/docs/api/app.md#appdockseticonimage-os-x --- github-electron/github-electron-main-tests.ts | 1 + github-electron/github-electron.d.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/github-electron/github-electron-main-tests.ts b/github-electron/github-electron-main-tests.ts index d74d4904a..5d3060e4b 100644 --- a/github-electron/github-electron-main-tests.ts +++ b/github-electron/github-electron-main-tests.ts @@ -169,6 +169,7 @@ app.dock.setMenu(dockMenu); app.dock.setBadge('foo'); var id = app.dock.bounce('informational'); app.dock.cancelBounce(id); +app.dock.setIcon('/path/to/icon.png'); app.setUserTasks([ { diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index 97e0fb1e4..d5ca18690 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -1125,6 +1125,12 @@ declare module Electron { * Note: This API is only available on Mac. */ setMenu(menu: Menu): void; + /** + * Sets the image associated with this dock icon. + * + * Note: This API is only available on Mac. + */ + setIcon(icon: NativeImage | string): void; } interface Task {