diff options
author | Xavier Ducrohet <xav@android.com> | 2009-08-03 14:23:16 -0700 |
---|---|---|
committer | Xavier Ducrohet <xav@android.com> | 2009-08-03 14:23:16 -0700 |
commit | 84063f8b2027eb5a96b0079e6cefa562594f6de7 (patch) | |
tree | 0c915c573bbfef4c453016413706661776df29b4 | |
parent | 3d63ab86c74d456d4f007a9fe9a70359ceef571e (diff) | |
download | sdk-84063f8b2027eb5a96b0079e6cefa562594f6de7.zip sdk-84063f8b2027eb5a96b0079e6cefa562594f6de7.tar.gz sdk-84063f8b2027eb5a96b0079e6cefa562594f6de7.tar.bz2 |
Fix the DeviceChooserDialog table issues.
On Linux, the gtk table seems to resize itself automatically when the
layout is computed and forces the last column to resize itself at +18 pixels.
This has a problematic impact on this dialog as it is not resizable and is
made to match the size of the content. As the dialog is used time after time
the last column grows by 18 pixels at every use up to a point where it
doesn't fit the screen.
Since storing the columns size is not that useful and I couldn't find a
way to ignore this first resize, I'm just removing the width storage.
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java index 8b61e27..315f456 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/launch/DeviceChooserDialog.java @@ -36,7 +36,6 @@ import com.android.sdkuilib.internal.widgets.AvdSelector.IAvdFilter; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.ITableLabelProvider; @@ -68,12 +67,6 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener private final static int ICON_WIDTH = 16; - private final static String PREFS_COL_SERIAL = "deviceChooser.serial"; //$NON-NLS-1$ - private final static String PREFS_COL_STATE = "deviceChooser.state"; //$NON-NLS-1$ - private final static String PREFS_COL_AVD = "deviceChooser.avd"; //$NON-NLS-1$ - private final static String PREFS_COL_TARGET = "deviceChooser.target"; //$NON-NLS-1$ - private final static String PREFS_COL_DEBUG = "deviceChooser.debug"; //$NON-NLS-1$ - private Table mDeviceTable; private TableViewer mViewer; private AvdSelector mPreferredAvdSelector; @@ -334,7 +327,6 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener layout.marginLeft = 30; offsetComp.setLayout(layout); - IPreferenceStore store = AdtPlugin.getDefault().getPreferenceStore(); mDeviceTable = new Table(offsetComp, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER); GridData gd; mDeviceTable.setLayoutData(gd = new GridData(GridData.FILL_BOTH)); @@ -345,23 +337,23 @@ public class DeviceChooserDialog extends Dialog implements IDeviceChangeListener TableHelper.createTableColumn(mDeviceTable, "Serial Number", SWT.LEFT, "AAA+AAAAAAAAAAAAAAAAAAA", //$NON-NLS-1$ - PREFS_COL_SERIAL, store); + null /* prefs name */, null /* prefs store */); TableHelper.createTableColumn(mDeviceTable, "AVD Name", - SWT.LEFT, "engineering", //$NON-NLS-1$ - PREFS_COL_AVD, store); + SWT.LEFT, "AAAAAAAAAAAAAAAAAAA", //$NON-NLS-1$ + null /* prefs name */, null /* prefs store */); TableHelper.createTableColumn(mDeviceTable, "Target", SWT.LEFT, "AAA+Android 9.9.9", //$NON-NLS-1$ - PREFS_COL_TARGET, store); + null /* prefs name */, null /* prefs store */); TableHelper.createTableColumn(mDeviceTable, "Debug", SWT.LEFT, "Debug", //$NON-NLS-1$ - PREFS_COL_DEBUG, store); + null /* prefs name */, null /* prefs store */); TableHelper.createTableColumn(mDeviceTable, "State", SWT.LEFT, "bootloader", //$NON-NLS-1$ - PREFS_COL_STATE, store); + null /* prefs name */, null /* prefs store */); // create the viewer for it mViewer = new TableViewer(mDeviceTable); |