Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Simple Dock menu for OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Vuyka committed May 2, 2015
1 parent 9bef44f commit 9b55c84
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ app.on('ready', function () {
mainWindow = null;
});

// Dock Menu (OSX)
if (process.platform === 'darwin') {
var dockMenu = Menu.buildFromTemplate([
{ label: 'New Window', click: function() { console.log('New Window'); } },
{ label: 'New Window with Settings', submenu: [
{ label: 'Basic' },
{ label: 'Pro'},
]},
{ label: 'New Command...'},
]);
app.dock.setMenu(dockMenu);
}

// Application Menu
if (process.platform === 'darwin') {
var osxTemplate = [
{
Expand Down

0 comments on commit 9b55c84

Please sign in to comment.