From 00e52fae972276d577e27d7a2fb4ac3ce90ee237 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 25 Nov 2022 16:29:00 -0500 Subject: [PATCH] autoupdater frame icon --- .../com/rusefi/autoupdate/Autoupdate.java | 18 ++++++++++++------ .../src/main/resources/com/rusefi/logo.png | Bin 0 -> 3967 bytes 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 java_console/autoupdate/src/main/resources/com/rusefi/logo.png diff --git a/java_console/autoupdate/src/main/java/com/rusefi/autoupdate/Autoupdate.java b/java_console/autoupdate/src/main/java/com/rusefi/autoupdate/Autoupdate.java index d93291cb6b..1a34dbbffb 100644 --- a/java_console/autoupdate/src/main/java/com/rusefi/autoupdate/Autoupdate.java +++ b/java_console/autoupdate/src/main/java/com/rusefi/autoupdate/Autoupdate.java @@ -21,7 +21,9 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; public class Autoupdate { - private static final String TITLE = "rusEFI Bundle Updater 20220717"; + private static final String LOGO_PATH = "/com/rusefi/"; + private static final String LOGO = LOGO_PATH + "logo.png"; + private static final String TITLE = "rusEFI Bundle Updater 20221125"; private static final String AUTOUPDATE_MODE = "autoupdate"; private static final String RUSEFI_CONSOLE_JAR = "rusefi_console.jar"; private static final String COM_RUSEFI_LAUNCHER = "com.rusefi.Launcher"; @@ -138,7 +140,11 @@ public class Autoupdate { frameClosed.countDown(); } }; - frameHelper.getFrame().setTitle(TITLE); + JFrame frame = frameHelper.getFrame(); + frame.setTitle(TITLE); + ImageIcon icon = AutoupdateUtil.loadIcon(LOGO); + if (icon != null) + frame.setIconImage(icon.getImage()); JPanel choice = new JPanel(new BorderLayout()); choice.add(new JLabel("Do you want to update bundle to latest version?"), BorderLayout.NORTH); @@ -151,7 +157,7 @@ public class Autoupdate { @Override public void actionPerformed(ActionEvent e) { PersistentConfiguration.getConfig().getRoot().setProperty(AUTOUPDATE_MODE, UpdateMode.NEVER.toString()); - frameHelper.getFrame().dispose(); + frame.dispose(); } }); middle.add(never); @@ -161,7 +167,7 @@ public class Autoupdate { no.addActionListener(new AbstractAction() { @Override public void actionPerformed(ActionEvent e) { - frameHelper.getFrame().dispose(); + frame.dispose(); } }); middle.add(no); @@ -171,7 +177,7 @@ public class Autoupdate { @Override public void actionPerformed(ActionEvent e) { doUpdate.set(true); - frameHelper.getFrame().dispose(); + frame.dispose(); } }); middle.add(once); @@ -183,7 +189,7 @@ public class Autoupdate { public void actionPerformed(ActionEvent e) { PersistentConfiguration.getConfig().getRoot().setProperty(AUTOUPDATE_MODE, UpdateMode.ALWAYS.toString()); doUpdate.set(true); - frameHelper.getFrame().dispose(); + frame.dispose(); } }); middle.add(always); diff --git a/java_console/autoupdate/src/main/resources/com/rusefi/logo.png b/java_console/autoupdate/src/main/resources/com/rusefi/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..0fd074a9f6446563fe5523619c6b46c8cd52c8c4 GIT binary patch literal 3967 zcmYjUcQhQ{ww@tMbfQHsL4r&4gs345(ME~hd(R-s7$ruJ8Y8-3kQqc5y@k<@8luf0 zi0Bc$!>Fp}Hzi14 zsPc)y%>QxFR`NKK8}#}$y#+bdjj%DhMXtZU55t{qP8t~*0X3#ahaJdq9t~XBZ%szm7X~_Ah^$ z00gE6M&B>hZqs?z?8=&Z8pm7lu)KG(mzSSC7ux|wjXd!*Gv!b3{SP^aCAwrR6Jw7%CAIlavr7iy#9FI_gW!3d|X7YN_OnDW^GzG z953NhB6GdY^7t4O+<;O`4$t?*ueP8bLA%ze#!npvN_RAs%~TYq+X^Nm93z&^Kl;w( znA>xfQ7dITA=-dcR1qr#j#cN2t;POce@`SgP6?fKAVtbACLM13LTsm{t_qj}cmh0C zSuSmEk-I(`roOi=oc+guDi3o4Z$T12khU7hIyn$1E7-C^4!hlhf>f0a1Lt@1pgtBe zuztnPR-r*%`76Bb+I)t?cQ4je;!Nozt#rwH$@Gkj*g5f&K-uoX$9(k$8lb61ewt~8 z%=0>C%-Jv5svTuCw;sHY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