gprofng-gui-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] Fix 66464 localhost erroneously added to client GUI "Connect


From: vladimir . mezentsev
Subject: [PATCH 2/2] Fix 66464 localhost erroneously added to client GUI "Connect to remote host" window
Date: Fri, 20 Dec 2024 12:56:24 -0800

From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

ChangeLog
2024-12-20  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

        * org/gprofng/mpmt/remote/ConnectionDialog.java (hostNameComboBox):
        Add "localhost" on Linux only.
---
 org/gprofng/mpmt/remote/ConnectionDialog.java | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/org/gprofng/mpmt/remote/ConnectionDialog.java 
b/org/gprofng/mpmt/remote/ConnectionDialog.java
index 6fc2afd..13f13a1 100644
--- a/org/gprofng/mpmt/remote/ConnectionDialog.java
+++ b/org/gprofng/mpmt/remote/ConnectionDialog.java
@@ -321,10 +321,11 @@ public final class ConnectionDialog extends AnDialog 
implements ItemListener {
             .removeDocumentListener(comboboxDocumentListener);
       }
       hostNameComboBox.removeAllItems();
-      hostNameComboBox.addItem(local_host);
+      if (Analyzer.getInstance().os_name.contains("Linux")) {
+        hostNameComboBox.addItem(local_host);
+      }
       for (StringPickListElement hostElement :
           UserPref.getInstance().getHostNamePicklist().getStringElements()) {
-       // System.out.println("past remote host: " + hostElement.getString());
         hostNameComboBox.addItem(hostElement.getString());
       }
       hostNameComboBox.setSelectedItem(hostName);
@@ -333,13 +334,10 @@ public final class ConnectionDialog extends AnDialog 
implements ItemListener {
             .getDocument()
             .addDocumentListener(comboboxDocumentListener);
       }
-      //            } else {
-      //                connectionProperties = null;
-      //            }
       connectionStarted();
       // Connect to remote host
       Thread worker =
-          new Thread(/*m_window.getAnalyzer().tgroup, */ "Connection_thread") {
+          new Thread("Connection_thread") {
 
             final int timeout = 3;
 
@@ -377,15 +375,6 @@ public final class ConnectionDialog extends AnDialog 
implements ItemListener {
     }
   }
 
-  /**
-   * Gets host name
-   *
-   * @return String host name
-   */
-  //    public String getHost() {
-  //        String host = fld_host.getSelectedItem().toString();
-  //        return host;
-  //    }
   /** Sets buttons and fields states as they should be during connecting */
   private void connectionStarted() {
     Analyzer.getInstance().connectingToRemoteHost = true;
-- 
2.43.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]