directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1242343 - /directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/FileBrowserWidget.java
Date Thu, 09 Feb 2012 14:47:50 GMT
Author: pamarcelot
Date: Thu Feb  9 14:47:49 2012
New Revision: 1242343

URL: http://svn.apache.org/viewvc?rev=1242343&view=rev
Log:
Fixed a width problem (widget was more than 600 px large) with the Combo when an item of the
history has a particularly long path.

Modified:
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/FileBrowserWidget.java

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/FileBrowserWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/FileBrowserWidget.java?rev=1242343&r1=1242342&r2=1242343&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/FileBrowserWidget.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/FileBrowserWidget.java
Thu Feb  9 14:47:49 2012
@@ -31,6 +31,7 @@ import org.eclipse.swt.events.ModifyEven
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
@@ -90,9 +91,12 @@ public class FileBrowserWidget extends B
      */
     public void createWidget( final Composite parent )
     {
-
         // Combo
-        fileCombo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
+        fileCombo = new Combo( parent, SWT.DROP_DOWN | SWT.BORDER );
+        GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+        gd.widthHint = 250;
+        fileCombo.setLayoutData( gd );
+        fileCombo.setVisibleItemCount( 20 );
         fileCombo.addModifyListener( new ModifyListener()
         {
             public void modifyText( ModifyEvent e )



Mime
View raw message