var menubar = require('menubar'), tray = require('tray'), ipc = require('ipc'), exec = require('child_process').exec;; /* * The main process listens for events from the web renderer. */ // When photos are dragged onto the toolbar and photos are requested to be updated it will fire an 'update-photos' ipc event. // The web renderer will send the list of photos, type of update and new value to apply // Once this main process completes the update it will send a 'update-photos-completed' event back to the renderer with information // so a proper response can be displayed. ipc.on('update-photos', function(event, args) { var params = args, normalize console.log('update-photos') console.log(args) if(typeof(args['files']) === 'undefined' || args['files'].length === 0) { console.log('no files passed in to update-photos'); return; } normalize = function(files) { for(var i=0; i