File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ app.on('ready', function(){
3636 appIcon . window = new BrowserWindow ( defaults ) ;
3737 appIcon . window . loadUrl ( 'file://' + __dirname + '/index.html' ) ;
3838 appIcon . window . on ( 'blur' , hideWindow ) ;
39+
40+ initMenu ( ) ;
3941 }
4042
4143 function showWindow ( bounds ) {
@@ -49,6 +51,27 @@ app.on('ready', function(){
4951 appIcon . window . show ( ) ;
5052 }
5153
54+ function initMenu ( ) {
55+ var template = [ {
56+ label : 'Edit' ,
57+ submenu : [
58+ {
59+ label : 'Copy' ,
60+ accelerator : 'Command+C' ,
61+ selector : 'copy:'
62+ } ,
63+ {
64+ label : 'Paste' ,
65+ accelerator : 'Command+V' ,
66+ selector : 'paste:'
67+ }
68+ ]
69+ } ] ;
70+
71+ menu = Menu . buildFromTemplate ( template ) ;
72+ Menu . setApplicationMenu ( menu ) ;
73+ }
74+
5275 function hideWindow ( ) {
5376 if ( ! appIcon . window ) return ;
5477 appIcon . window . hide ( ) ;
Original file line number Diff line number Diff line change 44 "description" : " Github Notifications on your menu bar." ,
55 "main" : " main.js" ,
66 "scripts" : {
7- "build-js" : " npm run mkdirs && browserify -t reactify src/js/app.js -o build/js/app.js" ,
7+ "build-js" : " npm run mkdir -p build/js && browserify -t reactify src/js/app.js -o build/js/app.js" ,
88 "build" : " npm install && mkdir -p build/js && grunt build && npm run build-js" ,
99 "watch-js" : " watchify -t reactify src/js/app.js -o build/js/app.js -v" ,
1010 "watch" : " grunt build && npm build && npm run watch-js | grunt watch" ,
You can’t perform that action at this time.
0 commit comments