[Title]NET : check port number
authorshihyun.kim <shihyun.kim@samsung.com>
Thu, 17 Jan 2013 12:04:55 +0000 (21:04 +0900)
committershihyun.kim <shihyun.kim@samsung.com>
Thu, 17 Jan 2013 12:04:55 +0000 (21:04 +0900)
[Desc.]
* If port number of proxy is empty, set 'OK' button disable.
[Issue]

InstallManager_java/src/org/tizen/installmanager/ui/dialog/ProxySettingsDialog.java

index 893d75a..7d4089a 100644 (file)
@@ -41,7 +41,6 @@ import org.eclipse.swt.widgets.Text;
 import org.tizen.installmanager.core.Config;
 import org.tizen.installmanager.core.Options;
 import org.tizen.installmanager.lib.Downloader;
-import org.tizen.installmanager.lib.ErrorController.ErrorCode;
 import org.tizen.installmanager.lib.Log;
 import org.tizen.installmanager.lib.NetworkProxy.ProxyType;
 import org.tizen.installmanager.ui.InstallManagerWindow;
@@ -212,13 +211,14 @@ public class ProxySettingsDialog extends Dialog {
                                        Integer.parseInt(proxyPort);
                                } catch (NumberFormatException e) {
                                        httpPortText.setText("");
+                                       getButton(Window.OK).setEnabled(false);
                                        return;
                                }
                                
                                if (proxyHost.isEmpty()) {
                                        getButton(Window.OK).setEnabled(false);
                                } else {
-                                       if (proxyPort.isEmpty()) {
+                                       if (proxyPort.isEmpty() || proxyPort.equals("")) {
                                                getButton(Window.OK).setEnabled(false);
                                        } else {
                                                getButton(Window.OK).setEnabled(true);