Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMarkus Schorn2009-08-18 07:43:15 -0400
committerMarkus Schorn2009-08-18 07:43:15 -0400
commit91a83e0c2b0c17de835b55a8b951ecea4df092de (patch)
tree56f2ba688920f8c5edfdf12f59170be08926d485 /core
parent5f1b748a22dab52578f08af4465dc5d27703eeb5 (diff)
downloadorg.eclipse.cdt-91a83e0c2b0c17de835b55a8b951ecea4df092de.tar.gz
org.eclipse.cdt-91a83e0c2b0c17de835b55a8b951ecea4df092de.tar.xz
org.eclipse.cdt-91a83e0c2b0c17de835b55a8b951ecea4df092de.zip
Improve dialog label, related to bug 144085.
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.java1
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.properties1
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/OptionalMessageDialog.java16
3 files changed, 13 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.java
index 104504e0c6..73b6be4c62 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.java
@@ -65,6 +65,7 @@ public final class CUIMessages extends NLS {
public static String TextEditorDropAdapter_unreadableFile;
public static String TextEditorDropAdapter_noFile;
public static String OptionalMessageDialog_dontShowAgain;
+ public static String OptionalMessageDialog_rememberDecision;
public static String CStructureCreatorVisitor_translationUnitName;
public static String FileTransferDragAdapter_refreshing;
public static String FileTransferDragAdapter_problem;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.properties
index 802223f2bd..18887f7933 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.properties
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CUIMessages.properties
@@ -66,6 +66,7 @@ TextEditorDropAdapter_unreadableFile=Unreadable file: ''{0}''
TextEditorDropAdapter_noFile=Not a file: ''{0}''
OptionalMessageDialog_dontShowAgain= Do not show this &message again
+OptionalMessageDialog_rememberDecision=Re&member my decision
CStructureCreatorVisitor_translationUnitName=Translation Unit
FileTransferDragAdapter_refreshing=Refreshing...
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/OptionalMessageDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/OptionalMessageDialog.java
index efa8f4f3a6..2c6fe84a62 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/OptionalMessageDialog.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/OptionalMessageDialog.java
@@ -34,9 +34,6 @@ import org.eclipse.cdt.internal.ui.CUIMessages;
* to choose that the dialog isn't shown again the next time.
*/
public class OptionalMessageDialog extends MessageDialog {
- // String constants for widgets
- private static final String CHECKBOX_TEXT= CUIMessages.OptionalMessageDialog_dontShowAgain;
-
// Dialog store id constants
private static final String STORE_ID= "OptionalMessageDialog.hide."; //$NON-NLS-1$
private static final String KEY_DETAIL = ".detail"; //$NON-NLS-1$
@@ -46,9 +43,10 @@ public class OptionalMessageDialog extends MessageDialog {
private Button fHideDialogCheckBox;
private String fId;
+ private String fHideMessage;
/**
- * Opens the dialog but only if the user hasn't choosen to hide it.
+ * Opens the dialog but only if the user hasn't chosen to hide it.
* Returns <code>NOT_SHOWN</code> if the dialog was not shown.
*/
public static int open(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) {
@@ -62,6 +60,14 @@ public class OptionalMessageDialog extends MessageDialog {
protected OptionalMessageDialog(String id, Shell parent, String title, Image titleImage, String message, int dialogType, String[] buttonLabels, int defaultButtonIndex) {
super(parent, title, titleImage, message, dialogType, buttonLabels, defaultButtonIndex);
fId= id;
+ switch(dialogType) {
+ case QUESTION:
+ case QUESTION_WITH_CANCEL:
+ fHideMessage= CUIMessages.OptionalMessageDialog_rememberDecision;
+ break;
+ default:
+ fHideMessage= CUIMessages.OptionalMessageDialog_dontShowAgain;
+ }
}
@Override
@@ -75,7 +81,7 @@ public class OptionalMessageDialog extends MessageDialog {
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
fHideDialogCheckBox= new Button(composite, SWT.CHECK | SWT.LEFT);
- fHideDialogCheckBox.setText(CHECKBOX_TEXT);
+ fHideDialogCheckBox.setText(fHideMessage);
fHideDialogCheckBox.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {

Back to the top