1
Fork 0

Added IPC Handlers

This commit is contained in:
Jake Howard 2015-11-03 08:46:19 +00:00
parent 58b50a09e7
commit 693d383a69

View file

@ -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();
});