always exit, disable systray when not running browser on OSX

Former-commit-id: 864068c5e4556640cf57043577fd2a3bdab27299
Former-commit-id: 11836fe4fced5f304ed98b7b79dbda599a91ad76
This commit is contained in:
admin
2022-11-09 23:54:24 -05:00
parent 3c47eeb5f9
commit 8228750fe5
2 changed files with 7 additions and 5 deletions

View File

@ -317,6 +317,10 @@ public class I2PBrowser extends I2PCommonBrowser {
Image image = toolkit.getImage("icon.png");
PopupMenu menu = new PopupMenu();
TrayIcon icon = new TrayIcon(image, "I2P Browser Profile Controller", menu);
icon.setImageAutoSize(true);
tray.add(icon);
Menu submenuStrict = new Menu("Strict Mode");
MenuItem launchRegularBrowserStrict = new MenuItem("Launch I2P Browser");
launchRegularBrowserStrict.addActionListener(new ActionListener() {
@ -401,10 +405,6 @@ public class I2PBrowser extends I2PCommonBrowser {
}
});
menu.add(closeItem);
TrayIcon icon = new TrayIcon(image, "I2P Browser Profile Controller", menu);
icon.setImageAutoSize(true);
tray.add(icon);
return true;
}
}