Skip to content

Commit

Permalink
about window
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Stone committed Aug 26, 2017
1 parent 140ec9b commit 2a59f1b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "browserosaurus",
"productName": "Browserosaurus",
"version": "1.0.1",
"description": "Choose which browser to use when you open a link",
"version": "1.0.2",
"description": "The browser prompter for macOS",
"homepage": "",
"main": "src/main.js",
"scripts": {
Expand Down Expand Up @@ -33,6 +33,7 @@
"prettier": "^1.4.4"
},
"dependencies": {
"about-window": "^1.7.1",
"electron-compile": "^6.4.1",
"jsonpath": "^0.2.11",
"mousetrap": "^1.6.1",
Expand Down
9 changes: 9 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { app, BrowserWindow, Tray, Menu } from 'electron'
import jp from 'jsonpath'
import { spawn } from 'child_process'
import parser from 'xml2json'
import openAboutWindow from 'about-window'

import browsers from './browsers'

Expand Down Expand Up @@ -71,6 +72,14 @@ function createPickerWindow(numberOfBrowsers, callback) {
tray = new Tray(`${__dirname}/images/icon/tray_iconTemplate.png`)
tray.setPressedImage(`${__dirname}/images/icon/tray_iconHighlight.png`)
const contextMenu = Menu.buildFromTemplate([
{
label: 'About',
click: function() {
openAboutWindow({
icon_path: `${__dirname}/images/icon/icon.png`
})
}
},
{
label: 'Quit',
click: function() {
Expand Down

0 comments on commit 2a59f1b

Please sign in to comment.