Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-06-23 19:37:25 +0000
committerMichael Valenta2003-06-23 19:37:25 +0000
commit920084c0c686f3a534a288eac80b1c224aa9fccd (patch)
tree383ca5a7961722cb725810285f6dc5c8bfa18ee4 /bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal
parent86ae15274935eddbc74525a07da842d0266a4d6c (diff)
downloadeclipse.platform.team-920084c0c686f3a534a288eac80b1c224aa9fccd.tar.gz
eclipse.platform.team-920084c0c686f3a534a288eac80b1c224aa9fccd.tar.xz
eclipse.platform.team-920084c0c686f3a534a288eac80b1c224aa9fccd.zip
38856: [CVS Merge] Change button labels in Update prompt
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal')
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeDialog.java27
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java2
2 files changed, 28 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeDialog.java
index 138560a1b..21db6c10b 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeDialog.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui.subscriber;
+import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -22,6 +23,8 @@ import org.eclipse.team.ui.sync.SyncResourceSet;
*/
public class MergeDialog extends SyncResourceSetDetailsDialog {
+ public static final int YES = IDialogConstants.YES_ID;
+
/**
* @param parentShell
* @param dialogTitle
@@ -44,4 +47,28 @@ public class MergeDialog extends SyncResourceSetDetailsDialog {
createWrappingLabel(composite, "All mergable resources have been updated. However, some non-mergable resources remain. Should these resources be updated, ignoring any local changes?");
}
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, YES, IDialogConstants.YES_LABEL, true);
+ createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, true);
+ super.createButtonsForButtonBar(parent);
+ }
+
+ protected boolean includeOkButton() {
+ return false;
+ }
+
+ protected boolean includeCancelButton() {
+ return false;
+ }
+
+ protected void buttonPressed(int id) {
+ // hijack yes and no buttons to set the correct return
+ // codes.
+ if(id == YES || id == IDialogConstants.NO_ID) {
+ setReturnCode(id);
+ close();
+ } else {
+ super.buttonPressed(id);
+ }
+ }
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
index c81cd58a4..4a61bab08 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateAction.java
@@ -267,7 +267,7 @@ public class MergeUpdateAction extends SubscriberUpdateAction {
result[0] = dialog.open();
}
});
- return (result[0] == Dialog.OK);
+ return (result[0] == MergeDialog.YES);
}
/*

Back to the top