fixed bug with tray icon when run from other directories
This commit is contained in:
		
							parent
							
								
									ee7a386421
								
							
						
					
					
						commit
						6ca7811342
					
				
							
								
								
									
										3
									
								
								tray.js
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tray.js
									
									
									
									
									
								
							@ -1,3 +1,4 @@
 | 
			
		||||
var path = require('path');
 | 
			
		||||
var electron = require('electron');
 | 
			
		||||
var app = electron.app;
 | 
			
		||||
 | 
			
		||||
@ -48,7 +49,7 @@ function checkLinuxTraySupport (cb) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function createTray() {
 | 
			
		||||
  tray = new electron.Tray('./images/daplie-logo.png');
 | 
			
		||||
  tray = new electron.Tray(path.join(__dirname, 'images', 'daplie-logo.png'));
 | 
			
		||||
  tray.on('click', function () { win.show(); });
 | 
			
		||||
  updateTrayMenu();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user