baykovr / AVPI

an open source voice command macro software
https://baykovr.github.io/gavpi.html
GNU General Public License v3.0
198 stars 42 forks source link

Multiple instances when opening from system tray #58

Closed cr0ss0vr closed 8 years ago

cr0ss0vr commented 8 years ago

Steps to reproduce:

1) open app 2) close app (to minimise it to system tray) 3) double click system tray icon a bunch 4) multiple windows open

weird error that I cant reproduce after doing the above: 5) select profile 6) start listening 7) close all GAVPI windows (to minimise to system tray)

gave a nasty NPE the first time, not done it since though

cr0ss0vr commented 8 years ago

potential fix:

change core/GAVPI.cs OpenMainWindow function to check status of OPEN_LOG_MENU_ITEM

if(sysTrayMenu.MenuItems[OPEN_LOG_MENU_ITEM].Enabled){ //do mainform stuff }

alternatively have it toggle open on doubleclick

OnDoubleClickIcon(){

if(sysTrayMenu.MenuItems[ OPEN_LOG_MENU_ITEM ].enabled){ OpenMainWindow( sysTrayMenu.MenuItems[ OPEN_LOG_MENU_ITEM ], null ); }else{

}

baykovr commented 8 years ago

Thanks, fixed in commit above.