diff --git a/.gitignore b/.gitignore
index dd8b395..1e6aaaf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ gw2_launcher_log_op.txt
/out/
/.settings/
*.class
+dependency-reduced-pom.xml
diff --git a/pom.xml b/pom.xml
index 0c0638b..a442793 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
4.0.0
org.lithium
Guild_Wars_2_Launcher
- 1.0.2
+ 1.0.3
Guild Wars 2 Launcher
Custom launcher for Guild Wars 2 with the purpose to keep ArcDPS up-to-date and fully functional
diff --git a/src/launcher/Main.java b/src/launcher/Main.java
index 99aabf9..d32b595 100644
--- a/src/launcher/Main.java
+++ b/src/launcher/Main.java
@@ -19,7 +19,7 @@
public class Main {
private static final String username="LithiumSR";
private static final String repoName="gw2_launcher";
- private static final String version="1.0.2";
+ private static final String version="1.0.3";
public static void main(String[] args) throws InterruptedException {
diff --git a/src/listeners/MyActionListener.java b/src/listeners/MyActionListener.java
index 729f615..5c35e66 100644
--- a/src/listeners/MyActionListener.java
+++ b/src/listeners/MyActionListener.java
@@ -41,10 +41,10 @@ public void actionPerformed(ActionEvent e) {
cf.startwith.setEnabled(true);
}
else {
- int dialogButton=0;
- JOptionPane.showConfirmDialog(null,"Would you like to remove ArcDPS' settings files too? \n"
+ int dialogButton=JOptionPane.YES_NO_OPTION;
+ int dialogResult=JOptionPane.showConfirmDialog(null,"Would you like to remove ArcDPS' settings files too? \n"
+ "If you are going to install ArcDPS in the future press 'No'. ","Remove settings?",dialogButton);
- if (dialogButton==0){
+ if (dialogResult==JOptionPane.YES_OPTION){
Operations.removeArcSetting(cf, path);
}
Operations.removeArc(cf, path);
diff --git a/src/updater/CoreUpdater.java b/src/updater/CoreUpdater.java
index 0336309..f0cc7ea 100644
--- a/src/updater/CoreUpdater.java
+++ b/src/updater/CoreUpdater.java
@@ -103,10 +103,10 @@ else if (!check && old_dll.exists()){
if(!ini.exists() && (cf.getMode().equals("arc_only"))) { //If ini file is not detected ask to the user if he would like to restore it with a default version from the website
- int dialogButton = 0;
+ int dialogButton = JOptionPane.YES_NO_OPTION;
log.log( Level.INFO,"archdps.ini not found");
- JOptionPane.showConfirmDialog(null,"ArcDPS configuration file not found. Would you like to download a default configoration?","ArcDPS configuration file not detected",dialogButton);
- if (dialogButton==JOptionPane.YES_OPTION){
+ int dialogResult = JOptionPane.showConfirmDialog(null,"ArcDPS configuration file not found. Would you like to download a default configoration?","ArcDPS configuration file not detected",dialogButton);
+ if (dialogResult==JOptionPane.YES_OPTION){
Operations.downloadINI(cf,path); //Method used to download the .ini
}
@@ -138,9 +138,9 @@ public static void runWithoutDPS(String path){
//Error dialog needed for static methods
public static void errorDialog(String path){
int dialogButton = JOptionPane.YES_NO_OPTION;
- JOptionPane.showConfirmDialog(null,"Something went wrong. Check your internet connection. Would you like to run GW2 without ArcDPS?",
+ int dialogResult = JOptionPane.showConfirmDialog(null,"Something went wrong. Check your internet connection. Would you like to run GW2 without ArcDPS?",
"Updater failed",dialogButton);
- if (dialogButton==JOptionPane.YES_OPTION) {
+ if (dialogResult==JOptionPane.YES_OPTION) {
CoreUpdater.runWithoutDPS(path);
}
diff --git a/src/updater/FastUpdater.java b/src/updater/FastUpdater.java
index f1dc804..8d9fae9 100644
--- a/src/updater/FastUpdater.java
+++ b/src/updater/FastUpdater.java
@@ -100,8 +100,8 @@ else if (!check && !old_dll.exists()){
//if there is not d3d9.dll and no backup it means that ArcDPS is not installed
int dialogButton = JOptionPane.YES_NO_OPTION;
//Ask to the user if he would like to install ArcDPS
- JOptionPane.showConfirmDialog(null,"ArcDPS not installed. Would you like to install ArcDPS?","ArcDPS not detected",dialogButton);
- if (dialogButton==JOptionPane.YES_OPTION){
+ int dialogResult=JOptionPane.showConfirmDialog(null,"ArcDPS not installed. Would you like to install ArcDPS?","ArcDPS not detected",dialogButton);
+ if (dialogResult==JOptionPane.YES_OPTION){
try {
dll.createNewFile(); //placeholder that is going to be updated by updateDll()
} catch (IOException e) {
@@ -130,10 +130,10 @@ else if (!check && !old_dll.exists()){
if(!ini.exists()) { //If ini file is not detected ask to the user if he would like to restore it with a default version from the website
- int dialogButton = 0;
+ int dialogButton = JOptionPane.YES_NO_OPTION;
log.log( Level.INFO,"archdps.ini not found");
- JOptionPane.showConfirmDialog(null,"ArcDPS configuration file not found. Would you like to download a default configoration?","ArcDPS configuration file not detected",dialogButton);
- if (dialogButton==JOptionPane.YES_OPTION){
+ int dialogResult=JOptionPane.showConfirmDialog(null,"ArcDPS configuration file not found. Would you like to download a default configoration?","ArcDPS configuration file not detected",dialogButton);
+ if (dialogResult==JOptionPane.YES_OPTION){
downloadINI(); //Method used to download the .ini
}
@@ -273,9 +273,9 @@ public static void runWithoutDPS(String path){
//Error dialog needed for static methods
public static void errorDialog(String path){
int dialogButton = JOptionPane.YES_NO_OPTION;
- JOptionPane.showConfirmDialog(null,"Something went wrong. Check your internet connection. Would you like to run GW2 without ArcDPS?",
+ int dialogResult=JOptionPane.showConfirmDialog(null,"Something went wrong. Check your internet connection. Would you like to run GW2 without ArcDPS?",
"Updater failed",dialogButton);
- if (dialogButton==JOptionPane.YES_OPTION) {
+ if (dialogResult==JOptionPane.YES_OPTION) {
log.log( Level.INFO,"Launching gw2 without Arc after error dialog");
FastUpdater.runWithoutDPS(path);
}
diff --git a/src/updater/UpdateNotifier.java b/src/updater/UpdateNotifier.java
index d2d5853..6800957 100644
--- a/src/updater/UpdateNotifier.java
+++ b/src/updater/UpdateNotifier.java
@@ -42,9 +42,9 @@ public void run() {
if (sem.isGreaterThan(version)) {
String URI="http://www.github.com/"+username+"/"+repoName+"/releases";
logger.log(Level.SEVERE,"An update is avaiable. Please get the update at "+URI);
- int dialogButton=0;
- JOptionPane.showConfirmDialog(null,"An update for the launcher is avaiable. Would you like to go to the download page?","An update is avaiable",dialogButton);
- if (dialogButton==JOptionPane.YES_OPTION){
+ int dialogButton=JOptionPane.YES_NO_OPTION;
+ int dialogResult=JOptionPane.showConfirmDialog(null,"An update for the launcher is avaiable. Would you like to go to the download page?","An update is avaiable",dialogButton);
+ if (dialogResult==JOptionPane.YES_OPTION){
try {
java.awt.Desktop.getDesktop().browse(new java.net.URI(URI));
} catch (IOException | URISyntaxException e) {