From 693d383a69a7cd481bf3329154949c15eef16368 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 3 Nov 2015 08:46:19 +0000 Subject: [PATCH] Added IPC Handlers --- src/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 382ed18..c625def 100644 --- a/src/main.js +++ b/src/main.js @@ -4,6 +4,7 @@ var Menu = require('menu'); var globalShortcut = require('global-shortcut') var fs = require('fs'); var Tray = require('tray'); +var ipc = require('ipc'); require('crash-reporter').start(); // Start crash reporter @@ -12,7 +13,6 @@ var menu = new Menu(); Menu.setApplicationMenu(menu); var mainWindow = null; - // Make sure the application closes app.on('window-all-closed', function () { app.quit(); @@ -32,4 +32,12 @@ app.on('ready', function () { mainWindow.on('closed', function() { mainWindow = undefined; }); +}); + +ipc.on('hide', function () { + mainWindow.hide(); +}); + +ipc.on('show', function () { + mainWindow.show(); }); \ No newline at end of file