directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r613913 - in /directory/studio/trunk/studio-connection-ui: resources/icons/ src/main/java/org/apache/directory/studio/connection/ui/ src/main/java/org/apache/directory/studio/connection/ui/widgets/
Date Mon, 21 Jan 2008 15:13:54 GMT
Author: pamarcelot
Date: Mon Jan 21 07:13:51 2008
New Revision: 613913

URL: http://svn.apache.org/viewvc?rev=613913&view=rev
Log:
Fix for DIRSTUDIO-138 (Add visual feedback to the user, if SSL (ldaps) is enabled).

Added:
    directory/studio/trunk/studio-connection-ui/resources/icons/connection_ssl_connected.gif
  (with props)
    directory/studio/trunk/studio-connection-ui/resources/icons/connection_ssl_disconnected.gif
  (with props)
Modified:
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIConstants.java
    directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java

Added: directory/studio/trunk/studio-connection-ui/resources/icons/connection_ssl_connected.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/resources/icons/connection_ssl_connected.gif?rev=613913&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/studio-connection-ui/resources/icons/connection_ssl_connected.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/studio-connection-ui/resources/icons/connection_ssl_disconnected.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/resources/icons/connection_ssl_disconnected.gif?rev=613913&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/studio-connection-ui/resources/icons/connection_ssl_disconnected.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIConstants.java?rev=613913&r1=613912&r2=613913&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIConstants.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ConnectionUIConstants.java
Mon Jan 21 07:13:51 2008
@@ -50,6 +50,12 @@
 
     /** The image used to display the disconnected state of connections. */
     public static final String IMG_CONNECTION_DISCONNECTED = "resources/icons/connection_disconnected.gif";
+    
+    /** The image used to display the connected state of SSL connections. */
+    public static final String IMG_CONNECTION_SSL_CONNECTED = "resources/icons/connection_ssl_connected.gif";
+
+    /** The image used to display the disconnected state of SSL connections. */
+    public static final String IMG_CONNECTION_SSL_DISCONNECTED = "resources/icons/connection_ssl_disconnected.gif";
 
     /** The image to connect connections. */
     public static final String IMG_CONNECTION_CONNECT = "resources/icons/connection_connect.gif";

Modified: directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java?rev=613913&r1=613912&r2=613913&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java
(original)
+++ directory/studio/trunk/studio-connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/ConnectionLabelProvider.java
Mon Jan 21 07:13:51 2008
@@ -50,7 +50,7 @@
     {
         if ( obj instanceof ConnectionFolder )
         {
-            ConnectionFolder folder = (ConnectionFolder) obj;
+            ConnectionFolder folder = ( ConnectionFolder ) obj;
             return folder.getName();
         }
         if ( obj instanceof Connection )
@@ -94,9 +94,18 @@
         else if ( obj instanceof Connection )
         {
             Connection conn = ( Connection ) obj;
-            return conn.getJNDIConnectionWrapper().isConnected() ? ConnectionUIPlugin.getDefault().getImage(
-                ConnectionUIConstants.IMG_CONNECTION_CONNECTED ) : ConnectionUIPlugin.getDefault().getImage(
-                ConnectionUIConstants.IMG_CONNECTION_DISCONNECTED );
+            if ( conn.getEncryptionMethod() == EncryptionMethod.LDAPS )
+            {
+                return conn.getJNDIConnectionWrapper().isConnected() ? ConnectionUIPlugin.getDefault().getImage(
+                    ConnectionUIConstants.IMG_CONNECTION_SSL_CONNECTED ) : ConnectionUIPlugin.getDefault().getImage(
+                    ConnectionUIConstants.IMG_CONNECTION_SSL_DISCONNECTED );
+            }
+            else
+            {
+                return conn.getJNDIConnectionWrapper().isConnected() ? ConnectionUIPlugin.getDefault().getImage(
+                    ConnectionUIConstants.IMG_CONNECTION_CONNECTED ) : ConnectionUIPlugin.getDefault().getImage(
+                    ConnectionUIConstants.IMG_CONNECTION_DISCONNECTED );
+            }
         }
         else
         {



Mime
View raw message