OSDN Git Service

Correct number format exception on proxy port and update to 0.92.1
authorRandy Baumgarte <randy@fbn.cx>
Mon, 11 Oct 2010 16:16:16 +0000 (12:16 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Mon, 11 Oct 2010 16:33:45 +0000 (12:33 -0400)
src/cx/fbn/nevernote/Global.java
src/cx/fbn/nevernote/dialog/ConfigConnectionPage.java

index c4e77bc..d5c1139 100644 (file)
@@ -47,7 +47,7 @@ import cx.fbn.nevernote.gui.ShortcutKeys;
 import cx.fbn.nevernote.utilities.ApplicationLogger;\r
 \r
 public class Global {\r
 import cx.fbn.nevernote.utilities.ApplicationLogger;\r
 \r
 public class Global {\r
-       public static String version = "0.92";\r
+       public static String version = "0.92.1";\r
     public static String username = ""; \r
     public static String password = "";     \r
     \r
     public static String username = ""; \r
     public static String password = "";     \r
     \r
index 12ae530..9cd0aeb 100644 (file)
@@ -86,9 +86,16 @@ public class ConfigConnectionPage extends QWidget {
                proxyPassword.setEchoMode(QLineEdit.EchoMode.Password);\r
                \r
                proxyHost.setText(Global.getProxyValue("url"));\r
                proxyPassword.setEchoMode(QLineEdit.EchoMode.Password);\r
                \r
                proxyHost.setText(Global.getProxyValue("url"));\r
-               proxyPort.setValue(new Integer(Global.getProxyValue("port")));\r
+               String portString = Global.getProxyValue("port");\r
+               Integer port = new Integer(80);\r
+               try {\r
+                       port = new Integer(portString.trim());\r
+               } catch (Exception e) {\r
+               }\r
+\r
                proxyPort.setMinimum(1);\r
                proxyPort.setMaximum(65565);\r
                proxyPort.setMinimum(1);\r
                proxyPort.setMaximum(65565);\r
+               proxyPort.setValue(port);\r
                proxyUserid.setText(Global.getProxyValue("userid"));\r
                proxyPassword.setText(Global.getProxyValue("password"));\r
                \r
                proxyUserid.setText(Global.getProxyValue("userid"));\r
                proxyPassword.setText(Global.getProxyValue("password"));\r
                \r