mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
updater: use system look&feel
This commit is contained in:
@@ -155,6 +155,7 @@ public class Main {
|
||||
patchCopy.getPath() + File.pathSeparator + log4jCopy.getPath(),
|
||||
"-Djava.io.tmpdir=" + tempDir,
|
||||
"-Didea.updater.log=" + PathManager.getLogPath(),
|
||||
"-Dswing.defaultlaf=" + UIManager.getSystemLookAndFeelClassName(),
|
||||
"com.intellij.updater.Runner",
|
||||
"install",
|
||||
PathManager.getHomePath());
|
||||
|
||||
@@ -66,7 +66,6 @@ public class Runner {
|
||||
return logFolder;
|
||||
}
|
||||
|
||||
// public static void initLogger(String logFolder) {
|
||||
public static void initLogger() {
|
||||
if (logger == null) {
|
||||
String logFolder = getLogDir();
|
||||
@@ -82,7 +81,6 @@ public class Runner {
|
||||
updateError.setFile(new File(logFolder, "idea_updater_error.log").getAbsolutePath());
|
||||
updateError.setLayout(new PatternLayout("%d{dd MMM yyyy HH:mm:ss} %-5p %C{1}.%M - %m%n"));
|
||||
updateError.setThreshold(Level.ERROR);
|
||||
// The error(s) from an old run of the updater (if there were) could be found in idea_updater.log file
|
||||
updateError.setAppend(false);
|
||||
updateError.activateOptions();
|
||||
|
||||
@@ -198,17 +196,20 @@ public class Runner {
|
||||
in.close();
|
||||
}
|
||||
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
// todo[r.sh] to delete in IDEA 14 (after a full circle of platform updates)
|
||||
if (System.getProperty("swing.defaultlaf") == null) {
|
||||
SwingUtilities.invokeAndWait(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
}
|
||||
catch (Exception ignore) {
|
||||
printStackTrace(ignore);
|
||||
}
|
||||
}
|
||||
catch (Exception ignore) {
|
||||
printStackTrace(ignore);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
new SwingUpdaterUI(props.getProperty(OLD_BUILD_DESCRIPTION),
|
||||
props.getProperty(NEW_BUILD_DESCRIPTION),
|
||||
|
||||
Reference in New Issue
Block a user