LoginDialog used for login to the pserver.
1.1 --- a/vcscvs/src/org/netbeans/modules/vcs/cmdline/CvsCustomizer.java Mon Sep 04 09:51:56 2000 +0000
1.2 +++ b/vcscvs/src/org/netbeans/modules/vcs/cmdline/CvsCustomizer.java Mon Sep 04 14:39:06 2000 +0000
1.3 @@ -46,6 +46,7 @@
1.4
1.5 static final long serialVersionUID =-4163355905662053542L;
1.6
1.7 + private boolean loginCancelled = false;
1.8 /** Creates new modal CvsCustomizer on a new JFrame */
1.9 public CvsCustomizer() {
1.10 this (new javax.swing.JFrame (), true);
1.11 @@ -775,9 +776,13 @@
1.12 // Add your handling code here:
1.13 //MK applyChanges(); // since there's next button and not ok, no apply is done.
1.14 setVisible(false);
1.15 - if (!isLoggedIn()) {
1.16 - setVisible(true);
1.17 - return;
1.18 + if (!isLoggedIn()) {
1.19 + if (loginCancelled) {
1.20 + setVisible(true);
1.21 + return;
1.22 + } else {
1.23 + fileSystem.setDoCommandRefresh(false); // set offline mode
1.24 + }
1.25 }
1.26 applyChanges();
1.27 isReadyForMount = true;
1.28 @@ -1229,6 +1234,8 @@
1.29 if (entry == null) {
1.30 // do remote login
1.31 // D("remote Login:");
1.32 + LoginDialog login = LoginDialog.createDialog();
1.33 + /*
1.34 String passwd = "";
1.35 NotifyDescriptor.InputLine not = new NotifyDescriptorInputPassword(org.openide.util.NbBundle.getBundle(CvsCustomizer.class).getString("CvsCustomizer.passwordLabel"),
1.36 org.openide.util.NbBundle.getBundle(CvsCustomizer.class).getString("CvsCustomizer.inputPassword"));
1.37 @@ -1247,6 +1254,12 @@
1.38 return ok;
1.39 }
1.40 return false; // cancel pressed on password dialog.
1.41 + */
1.42 + login.setPserverName(serverTextField.getText().trim());
1.43 + login.setConnectString(connectStr);
1.44 + login.show();
1.45 + loginCancelled = !login.isOffline();
1.46 + return login.isLoggedIn();
1.47 }
1.48 return true; // was found in .pass file
1.49 }