Skip to content

Commit

Permalink
Shows both revisions (more helpful than either alone)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lt.Sego authored and Lt.Sego committed Mar 27, 2010
1 parent b82ca37 commit 1ce6bae
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions Client/src/org/pokenet/client/ui/LoginScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,13 @@ public void setServerRevision(String rev) {
*/
private void setClientRevision() {
String path = System.getProperty("res.path");
String gCode = "pokenetonline.googlecode.com/svn";
String SG = "";
if (path == null || path.equalsIgnoreCase("NULL")) {
path = "./";
}
File f = new File(path + "/.svn/entries");

try {
if (f.exists()) {
Scanner s = new Scanner(f);
Expand All @@ -194,34 +197,27 @@ private void setClientRevision() {
s.nextLine();

m_clientRev = new Label("Client Version: svn:" + s.nextLine());
m_clientRev.setFont(GameClient.getFontSmall());
m_clientRev.setForeground(new Color(255, 255, 255));
m_clientRev.pack();
m_clientRev.setLocation(4, 600 - m_clientRev.getHeight() - 8);
this.add(m_clientRev);

f = new File(path + "rev.txt");
s = new Scanner(f);
m_clientRev.setText(m_clientRev.getText() + " // " + s.nextLine());

} else {
f = new File(path + "rev.txt");
Scanner s;
s = new Scanner(f);

m_clientRev = new Label("Client Version: r" + s.nextLine());
m_clientRev.setFont(GameClient.getFontSmall());
m_clientRev.setForeground(new Color(255, 255, 255));
m_clientRev.pack();
m_clientRev.setLocation(4, 600 - m_clientRev.getHeight() - 8);
this.add(m_clientRev);

}
} catch (Exception e) {
System.out.println(e.getMessage());
m_clientRev = new Label("Client Version: ?");
m_clientRev.setFont(GameClient.getFontSmall());
m_clientRev.setForeground(new Color(255, 255, 255));
m_clientRev.pack();
m_clientRev.setLocation(4, 600 - m_clientRev.getHeight() - 8);
this.add(m_clientRev);
}

m_clientRev.setFont(GameClient.getFontSmall());
m_clientRev.setForeground(new Color(255, 255, 255));
m_clientRev.pack();
m_clientRev.setLocation(4, 600 - m_clientRev.getHeight() - 8);
this.add(m_clientRev);

}

Expand Down

0 comments on commit 1ce6bae

Please sign in to comment.