directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r753352 - /directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java
Date Fri, 13 Mar 2009 19:13:36 GMT
Author: seelmann
Date: Fri Mar 13 19:13:30 2009
New Revision: 753352

URL: http://svn.apache.org/viewvc?rev=753352&view=rev
Log:
Simplified way to set width of combo

Modified:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java?rev=753352&r1=753351&r2=753352&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserQuickSearchWidget.java
Fri Mar 13 19:13:30 2009
@@ -41,10 +41,7 @@
 import org.apache.directory.studio.ldapbrowser.core.model.impl.QuickSearch;
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.apache.directory.studio.ldapbrowser.core.utils.LdapFilterUtils;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.fieldassist.ComboContentAdapter;
-import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -53,8 +50,6 @@
 import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.FontMetrics;
-import org.eclipse.swt.graphics.GC;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -193,12 +188,7 @@
         String[] operators = new String[]
             { "=", "!=", "<=", ">=", "~=" };
         quickSearchOperatorCombo = BaseWidgetUtils.createReadonlyCombo( innerComposite, operators,
0, 1 );
-        GC gc = new GC( parent );
-        gc.setFont( JFaceResources.getDialogFont() );
-        FontMetrics fontMetrics = gc.getFontMetrics();
-        gc.dispose();
-        int width = Dialog.convertHorizontalDLUsToPixels( fontMetrics, IDialogConstants.BUTTON_WIDTH
/ 2 );
-        GridData data = new GridData( width, SWT.DEFAULT );
+        GridData data = new GridData();
         quickSearchOperatorCombo.setLayoutData( data );
 
         String[] values = HistoryUtils.load( VALUE_HISTORY_DIALOGSETTING_KEY );



Mime
View raw message