Skip to content

Commit

Permalink
Frame: Fixed GW2 Icon
Browse files Browse the repository at this point in the history
  • Loading branch information
leosarra committed Dec 8, 2017
1 parent cb3bd92 commit c8f1794
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 27 deletions.
1 change: 1 addition & 0 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="resources"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ gw2_launcher.cfg
gw2_launcher_log.txt
gw2_launcher_log_op.txt
/target/
*.cfg
6 changes: 3 additions & 3 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>resources</directory>
</resource>
</resources>
<plugins>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>resources</directory>
</resource>
</resources>
<plugins>
<plugin>
Expand Down
File renamed without changes
20 changes: 1 addition & 19 deletions src/chooser/DirChooser.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,6 @@ public class DirChooser implements Task {

private static Logger log = Logger.getLogger( CoreUpdater.class.getName() );

public DirChooser(){

//Change to look and feel to make it more similar to the Windows' one
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
SwingUtilities.updateComponentTreeUI(f);

}
public void esegui() {
//Functor pattern
Operations.LogSetup(log,false);
Expand All @@ -59,8 +42,7 @@ public void esegui() {
icon.setLocationRelativeTo(null);
icon.setUndecorated(true);
icon.setVisible(true);
icon.setIconImage(Toolkit.getDefaultToolkit().
getImage(JFrame.class.getResource("/img/gw2_64_1-1.png")));
icon.setIconImage(Toolkit.getDefaultToolkit().getImage(DirChooser.class.getResource("/gw2_64_1-1.png")));
icon.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//Loop until "Cancel" is pressed or a valid directory is selected
while (!found) {
Expand Down
2 changes: 1 addition & 1 deletion src/frame/CoreFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public CoreFrame(String dir){
path_string=dir;

this.setIconImage(Toolkit.getDefaultToolkit().
getImage(CoreFrame.class.getResource("/img/gw2_64_1-1.png")));
getImage(CoreFrame.class.getResource("/gw2_64_1-1.png")));


//Settings of the CoreFrame object
Expand Down
1 change: 0 additions & 1 deletion src/updater/UpdateNotifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ private String getJSONData(){
WebResource webResource = client.resource(UriBuilder.fromUri("https://api.github.com/repos/"+username+"/"+repoName+"/releases").build());
ClientResponse response = webResource.accept("application/json").get(ClientResponse.class);
String output = response.getEntity(String.class);
//System.out.println(output);
return output;
}
}

0 comments on commit c8f1794

Please sign in to comment.