Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] TVT fix for 70217


Fix for 70217: C++ Build Properties view: Platform overlaps field.
This patch, created on the Head branch, expands the labels as the translations change. Tested on w2k and linux sles.
This should go to both the Head and 2.0 branch.
Thanks,
Tanya
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/ChangeLog,v
retrieving revision 1.19
diff -u -r1.19 ChangeLog
--- ChangeLog	15 Jun 2004 19:37:27 -0000	1.19
+++ ChangeLog	20 Jul 2004 14:05:23 -0000
@@ -1,3 +1,7 @@
+2004-07-20 Tanya Wolff
+	Fixed 70217: C++ Build Properties view: Platform overlaps field
+	* src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java
+	
 2004-06-15 Tanya Wolff
 	Removed intermediate composites to allow groupings to be readable by screenreader in the Manage Configuration dialog.
 	
Index: src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java,v
retrieving revision 1.20
diff -u -r1.20 BuildPropertyPage.java
--- src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java	18 Jun 2004 18:35:06 -0000	1.20
+++ src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java	20 Jul 2004 14:05:24 -0000
@@ -189,18 +189,15 @@
 
 
 		// Add a config selection area
-		Group configGroup = ControlFactory.createGroup(composite, ManagedBuilderUIMessages.getResourceString(ACTIVE_LABEL), 1);
-		gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
-		gd.grabExcessHorizontalSpace = true;
-		configGroup.setLayoutData(gd);
-		// Use the form layout inside the group composite
-		FormLayout form = new FormLayout();
-		form.marginHeight = 5;
-		form.marginWidth = 5;
-		configGroup.setLayout(form);
-		
+		Group configGroup = ControlFactory.createGroup(composite, ManagedBuilderUIMessages.getResourceString(ACTIVE_LABEL), 3);
+		((GridLayout)(configGroup.getLayout())).makeColumnsEqualWidth=false;
+
 		Label platformLabel = ControlFactory.createLabel(configGroup, ManagedBuilderUIMessages.getResourceString(PLATFORM_LABEL));
+		((GridData) (platformLabel.getLayoutData())).horizontalAlignment = GridData.HORIZONTAL_ALIGN_BEGINNING;
+		((GridData) (platformLabel.getLayoutData())).grabExcessHorizontalSpace =  false;
+		
 		targetSelector = ControlFactory.createSelectCombo(configGroup, getPlatformNames(), defaultTarget.getName()); 
+		((GridData) (targetSelector.getLayoutData())).horizontalSpan = 2;
 		targetSelector.addListener(SWT.Selection, new Listener () {
 			public void handleEvent(Event e) {
 				handleTargetSelection();
@@ -208,7 +205,11 @@
 		});
 		targetSelector.setToolTipText(ManagedBuilderUIMessages.getResourceString(PLAT_TIP));
 		Label configLabel = ControlFactory.createLabel(configGroup, ManagedBuilderUIMessages.getResourceString(CONFIG_LABEL));
+		((GridData) (configLabel.getLayoutData())).horizontalAlignment = GridData.HORIZONTAL_ALIGN_BEGINNING;
+		((GridData) (configLabel.getLayoutData())).grabExcessHorizontalSpace =  false;
+		
 		configSelector = new Combo(configGroup, SWT.READ_ONLY|SWT.DROP_DOWN);
+		configSelector.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 		configSelector.addListener(SWT.Selection, new Listener () {
 			public void handleEvent(Event e) {
 				handleConfigSelection();
@@ -216,37 +217,14 @@
 		});
 		configSelector.setToolTipText(ManagedBuilderUIMessages.getResourceString(CONF_TIP));
 		manageConfigs = ControlFactory.createPushButton(configGroup, ManagedBuilderUIMessages.getResourceString(ADD_CONF));
+		((GridData) (manageConfigs.getLayoutData())).horizontalAlignment = GridData.END;
 		manageConfigs.setToolTipText(ManagedBuilderUIMessages.getResourceString(ADD_TIP));
 		manageConfigs.addSelectionListener(new SelectionAdapter() {
 		public void widgetSelected(SelectionEvent e) {
 				handleManageConfig();
 			}
 		});
-		// Now do the form layout for the widgets
-		FormData fd = new FormData();
-		// Anchor the labels in the centre of their respective combos
-		fd.top = new FormAttachment(targetSelector, 0, SWT.CENTER);
-		platformLabel.setLayoutData(fd);
-		fd = new FormData();
-		fd.top = new FormAttachment(configSelector, 0, SWT.CENTER);
-		configLabel.setLayoutData(fd);
-		// Anchor platform combo left to the config selector
-		fd = new FormData();
-		fd.left = new FormAttachment(configSelector, 0, SWT.LEFT);
-		fd.right = new FormAttachment(100, 0);
-		targetSelector.setLayoutData(fd);
-		// Anchor button right to combo and left to group
-		fd = new FormData();
-		fd.top = new FormAttachment(configSelector, 0, SWT.CENTER);
-		fd.right = new FormAttachment(100,0);
-		manageConfigs.setLayoutData(fd);
-		// Anchor config combo left 5 pixels from label, top 5% below the centre, and right to the button
-		fd = new FormData();
-		fd.left = new FormAttachment(configLabel, 5); 
-		fd.top = new FormAttachment(55,0);
-		fd.right = new FormAttachment(manageConfigs, -5 , SWT.LEFT);
-		configSelector.setLayoutData(fd);		
-
+		
 		// Create the sash form
 		sashGroup = ControlFactory.createGroup(composite, ManagedBuilderUIMessages.getResourceString(SETTINGS_LABEL), 1);
 		sashGroup.setLayoutData(new GridData(GridData.FILL_BOTH));

Back to the top