From 1ce6bae4856d0667ab67b88313bce3245f8039ea Mon Sep 17 00:00:00 2001 From: "Lt.Sego" Date: Sat, 27 Mar 2010 17:03:38 +0000 Subject: [PATCH] Shows both revisions (more helpful than either alone) --- .../org/pokenet/client/ui/LoginScreen.java | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/Client/src/org/pokenet/client/ui/LoginScreen.java b/Client/src/org/pokenet/client/ui/LoginScreen.java index 97448b3ab..7af16dda1 100644 --- a/Client/src/org/pokenet/client/ui/LoginScreen.java +++ b/Client/src/org/pokenet/client/ui/LoginScreen.java @@ -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); @@ -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); }