From ecfab655182a6d21fbae0530c321d15349f6a26b Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 5 Jan 2010 03:39:46 +0100 Subject: [PATCH] Improve usability of sharing wizard Having an ellipsis in the "Create..." button's text gives users the assumption that a dialog will come up before the real action is triggered hence the ellipsis is removed. In order to improve consistency the label for the ".git" postfix is enabled together with the edit field for the repository to be created. Bug: 292592 Change-Id: Ie920b3b4dc83ce35a005fe3b4bcf875d33f57499 Signed-off-by: Matthias Sohn --- .../egit/ui/internal/sharing/ExistingOrNewPage.java | 14 +++++++++----- .../src/org/eclipse/egit/ui/uitext.properties | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/sharing/ExistingOrNewPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/sharing/ExistingOrNewPage.java index a480d1ea..842285a4 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/sharing/ExistingOrNewPage.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/sharing/ExistingOrNewPage.java @@ -54,11 +54,13 @@ import org.eclipse.swt.widgets.TreeItem; */ class ExistingOrNewPage extends WizardPage { + private static final String DOT_GIT_SEGMENT = File.separatorChar + ".git"; //$NON-NLS-1$ private final SharingWizard myWizard; private Button button; private Tree tree; private Text repositoryToCreate; private IPath minumumPath; + private Text dotGitSegment; ExistingOrNewPage(SharingWizard w) { super(ExistingOrNewPage.class.getName()); @@ -190,11 +192,12 @@ class ExistingOrNewPage extends WizardPage { .segmentCount()); } }); - Text l = new Text(g,SWT.NONE); - l.setEnabled(false); - l.setEditable(false); - l.setText(File.separatorChar + ".git"); //$NON-NLS-1$ - l.setLayoutData(GridDataFactory.fillDefaults().create()); + dotGitSegment = new Text(g ,SWT.NONE); + dotGitSegment.setEnabled(false); + dotGitSegment.setEditable(false); + dotGitSegment.setText(DOT_GIT_SEGMENT); + dotGitSegment.setLayoutData(GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).create()); + tree.addSelectionListener(new SelectionListener() { public void widgetSelected(SelectionEvent e) { updateCreateOptions(); @@ -247,6 +250,7 @@ class ExistingOrNewPage extends WizardPage { } button.setEnabled(p != null); repositoryToCreate.setEnabled(p != null); + dotGitSegment.setEnabled(p != null); getContainer().updateButtons(); } diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties index 4ad29aae..d6ccecbd 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/uitext.properties @@ -27,7 +27,7 @@ SharingWizard_failed=Failed to initialize Git team provider. GenericOperationFailed={0} Failed -ExistingOrNewPage_CreateButton=&Create... +ExistingOrNewPage_CreateButton=&Create Repository ExistingOrNewPage_title=Configure Git Repository ExistingOrNewPage_description=Select Git Repository Location ExistingOrNewPage_ErrorFailedToCreateRepository=Failed to create repository -- 2.11.4.GIT