move PWA selector code to before profile validation. register shutdown hook when systray launches
Former-commit-id: 770776b088a5c31ac94ede711814b07a94eb2748 Former-commit-id: bf7ed3a10a036a614dd8866ea152cf00fce889f0
This commit is contained in:
@ -260,6 +260,12 @@ public class I2PBrowser extends I2PCommonBrowser {
|
||||
if (useSystray) {
|
||||
logger.info("Starting systray");
|
||||
systray(args);
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
shutdownSystray();
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.warning(e.toString());
|
||||
|
@ -257,6 +257,7 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
|
||||
}
|
||||
File baseProfileDir = new File(baseProfile);
|
||||
File profileDir = new File(profile);
|
||||
setupUserChrome(profileDir, app);
|
||||
if (!baseProfileDir.exists() || !profileDir.exists()) {
|
||||
logger.info("Empty directories");
|
||||
return false;
|
||||
@ -276,6 +277,12 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
|
||||
logger.info("Error copying base profile to profile" + e);
|
||||
return false;
|
||||
}
|
||||
logger.info("Done setting up fancy Firefox options");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void setupUserChrome(File profileDir, boolean app) {
|
||||
File workingUserOverrides = new File(profileDir, "user-overrides.js");
|
||||
logger.info(workingUserOverrides.getAbsolutePath());
|
||||
if (workingUserOverrides.exists()) {
|
||||
@ -317,9 +324,6 @@ public class I2PFirefoxProfileBuilder extends I2PCommonBrowser {
|
||||
deleteAppChrome(profileDir.toString());
|
||||
}
|
||||
}
|
||||
logger.info("Done setting up fancy Firefox options");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user