directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r779316 - /directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateListComposite.java
Date Wed, 27 May 2009 21:28:33 GMT
Author: seelmann
Date: Wed May 27 21:28:32 2009
New Revision: 779316

URL: http://svn.apache.org/viewvc?rev=779316&view=rev
Log:
DIRSTUDIO-263 (Add certificate validation for ldaps and StartTLS):
o Adjusted dialog size
o View on double click


Modified:
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateListComposite.java

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateListComposite.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateListComposite.java?rev=779316&r1=779315&r2=779316&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateListComposite.java
(original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/CertificateListComposite.java
Wed May 27 21:28:32 2009
@@ -26,6 +26,8 @@
 
 import org.apache.directory.studio.connection.core.StudioKeyStoreManager;
 import org.apache.directory.studio.connection.ui.dialogs.CertificateInfoDialog;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.IStructuredContentProvider;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -88,7 +90,10 @@
     private void createTreeViewer()
     {
         tableViewer = new TableViewer( container, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL
| SWT.BORDER );
-        tableViewer.getTable().setLayoutData( new GridData( GridData.FILL, GridData.FILL,
true, true ) );
+        GridData gd = new GridData( GridData.FILL, GridData.FILL, true, true );
+        gd.widthHint = 360;
+        gd.heightHint = 10;
+        tableViewer.getTable().setLayoutData( gd );
         tableViewer.setContentProvider( new KeyStoreContentProvider() );
         tableViewer.setLabelProvider( new KeyStoreLabelProvider() );
         tableViewer.addSelectionChangedListener( new ISelectionChangedListener()
@@ -99,6 +104,16 @@
                 removeButton.setEnabled( !event.getSelection().isEmpty() );
             }
         } );
+        tableViewer.addDoubleClickListener( new IDoubleClickListener()
+        {
+            public void doubleClick( DoubleClickEvent event )
+            {
+                IStructuredSelection selection = ( IStructuredSelection ) event.getSelection();
+                X509Certificate certificate = ( X509Certificate ) selection.getFirstElement();
+                new CertificateInfoDialog( getShell(), new X509Certificate[]
+                    { certificate } ).open();
+            }
+        } );
     }
 
 



Mime
View raw message