mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-04-19 13:06:30 +02:00
Wrong use of boolean, should be different
This commit is contained in:
parent
5fc7d6382d
commit
e6637b9af8
@ -172,6 +172,8 @@ public class UpdateManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cancelled) {
|
if (cancelled) {
|
||||||
|
System.out.println("Update cancelled by user!");
|
||||||
|
System.exit(1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ public interface IUserInterface {
|
|||||||
|
|
||||||
void executeManager(Runnable task);
|
void executeManager(Runnable task);
|
||||||
|
|
||||||
|
// Return true if the installation was cancelled!
|
||||||
Future<Boolean> showOptions(List<IOptionDetails> option);
|
Future<Boolean> showOptions(List<IOptionDetails> option);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -102,14 +102,14 @@ public class OptionsSelectWindow extends JDialog implements ActionListener {
|
|||||||
addWindowListener(new WindowAdapter() {
|
addWindowListener(new WindowAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void windowClosing(WindowEvent e) {
|
public void windowClosing(WindowEvent e) {
|
||||||
future.complete(false);
|
future.complete(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void windowClosed(WindowEvent e) {
|
public void windowClosed(WindowEvent e) {
|
||||||
// Just in case closing didn't get triggered - if something else called dispose() the
|
// Just in case closing didn't get triggered - if something else called dispose() the
|
||||||
// future will have already completed
|
// future will have already completed
|
||||||
future.complete(false);
|
future.complete(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -189,10 +189,10 @@ public class OptionsSelectWindow extends JDialog implements ActionListener {
|
|||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
if (e.getActionCommand().equals("OK")) {
|
if (e.getActionCommand().equals("OK")) {
|
||||||
tableModel.finalise();
|
tableModel.finalise();
|
||||||
future.complete(true);
|
future.complete(false);
|
||||||
dispose();
|
dispose();
|
||||||
} else if (e.getActionCommand().equals("Cancel")) {
|
} else if (e.getActionCommand().equals("Cancel")) {
|
||||||
future.complete(false);
|
future.complete(true);
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user