Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2013-09-24 06:24:13 -0400
committerGerrit Code Review @ Eclipse.org2013-10-07 14:41:45 -0400
commit31148a3ccf2ca4836936069fe478dc1f450690a0 (patch)
tree95a9ec6d4146c8ac9c5101408448058baff0b2c3
parent71852f953f4721bbd6d41bf85ec116076dba57b6 (diff)
downloadorg.eclipse.mylyn.tasks-31148a3ccf2ca4836936069fe478dc1f450690a0.tar.gz
org.eclipse.mylyn.tasks-31148a3ccf2ca4836936069fe478dc1f450690a0.tar.xz
org.eclipse.mylyn.tasks-31148a3ccf2ca4836936069fe478dc1f450690a0.zip
344416: improve tab order on repository settings page
Swap user name text field with anonymous button in the tab order. Bug: 344416 Change-Id: If80f0a9a277747c9942a4206faae474569c122b4 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=344416 Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
index a8618bde0..77f824855 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2010 Tasktop Technologies and others.
+ * Copyright (c) 2004, 2013 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,6 +16,8 @@ package org.eclipse.mylyn.tasks.ui.wizards;
import java.lang.reflect.InvocationTargetException;
import java.nio.charset.Charset;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -66,6 +68,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
@@ -314,10 +317,22 @@ public abstract class AbstractRepositorySettingsPage extends AbstractTaskReposit
}
Point p = innerComposite.getContent().computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
innerComposite.setMinSize(p);
+ swapUserNameWithAnonymousInTabList();
Dialog.applyDialogFont(innerComposite);
setControl(innerComposite);
}
+ private void swapUserNameWithAnonymousInTabList() {
+ List<Control> tabList = Arrays.asList(compositeContainer.getTabList());
+ if (tabList.contains(repositoryUserNameEditor.getTextControl(compositeContainer))
+ && tabList.contains(anonymousButton)) {
+ int userNameIndex = tabList.indexOf(repositoryUserNameEditor.getTextControl(compositeContainer));
+ int anonymousIndex = tabList.indexOf(anonymousButton);
+ Collections.swap(tabList, userNameIndex, anonymousIndex);
+ compositeContainer.setTabList(tabList.toArray(new Control[tabList.size()]));
+ }
+ }
+
/**
* @since 3.5
*/

Back to the top