Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2014-08-06 13:35:07 +0000
committerMatthias Sohn2014-09-04 14:36:35 +0000
commit71349a6cb7bf40684bb9493ce0d5dc49af315953 (patch)
tree7153ad87129b6654e20b91ffe27a604ec7974b80
parentce05e19b25611394f19a1ee62ec629b0514a911e (diff)
downloadegit-71349a6cb7bf40684bb9493ce0d5dc49af315953.tar.gz
egit-71349a6cb7bf40684bb9493ce0d5dc49af315953.tar.xz
egit-71349a6cb7bf40684bb9493ce0d5dc49af315953.zip
Simple push wizard links to Advanced push wizard
Filed bug 443320 to track further improvements. Bug: 436726 Change-Id: Iccdecd8eb3f70326a3af99b1fb2a11669f8027b2 Signed-off-by: Mickael Istria <mistria@redhat.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java6
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushBranchPage.java23
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties3
3 files changed, 32 insertions, 0 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
index bb3e53a591..f80504b862 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/UIText.java
@@ -2043,6 +2043,12 @@ public class UIText extends NLS {
public static String PushBranchPage_UpstreamConfigOverwriteWarning;
/** */
+ public static String PushBranchPage_advancedWizardLink;
+
+ /** */
+ public static String PushBranchPage_advancedWizardLinkTooltip;
+
+ /** */
public static String PushBranchWizard_WindowTitle;
/** */
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushBranchPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushBranchPage.java
index 4e64068428..8111e8f672 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushBranchPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushBranchPage.java
@@ -53,11 +53,14 @@ import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Resource;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.RowData;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
/**
@@ -316,7 +319,27 @@ public class PushBranchPage extends WizardPage {
}
});
+ Link advancedDialogLink = new Link(main, SWT.NONE);
+ advancedDialogLink.setText(UIText.PushBranchPage_advancedWizardLink);
+ advancedDialogLink
+ .setToolTipText(UIText.PushBranchPage_advancedWizardLinkTooltip);
+ advancedDialogLink.setLayoutData(new GridData(SWT.END, SWT.END, false,
+ true));
+ advancedDialogLink.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Shell parentShell = getShell().getParent().getShell();
+ PushWizard advancedWizard = null;
+ try {
+ advancedWizard = new PushWizard(repository);
+ getShell().close();
+ new WizardDialog(parentShell, advancedWizard).open();
+ } catch (URISyntaxException ex) {
+ Activator.logError(ex.getMessage(), ex);
+ }
+ }
+ });
setControl(main);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
index 43a714665a..f3e184cc62 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/uitext.properties
@@ -705,6 +705,9 @@ PushBranchPage_PageMessage=Select a remote and the name the branch should have o
PushBranchPage_PageName=Simple Push
PushBranchPage_PageTitle=Push to branch on remote
PushBranchPage_UpstreamConfigOverwriteWarning=The existing upstream configuration for the branch will be overwritten.
+PushBranchPage_advancedWizardLink=Show <A>advanced push</A> dialog
+PushBranchPage_advancedWizardLinkTooltip=Will show an advanced, but more complex, dialog to configure the push operation. Compared to this one, the advanced \
+dialog supports operations such as pushing multiple refspecs and deleting remote branches.
PushBranchWizard_WindowTitle=Push Branch {0}
PushCommand_pushBranchTitle=Push Branch
PushCommand_pushTagTitle=Push Tag

Back to the top