summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Zarna2013-08-09 06:42:46 (EDT)
committer Gerrit Code Review @ Eclipse.org2013-08-14 11:49:46 (EDT)
commitdcdeca0f318eb14ede254e597a203a56e0e6c770 (patch)
treed090b256374c3da96cc7d11d8e02af9b714af562
parent784655946dad87c784b454edc071eb523a7f2afa (diff)
downloadorg.eclipse.mylyn.tasks-dcdeca0f318eb14ede254e597a203a56e0e6c770.zip
org.eclipse.mylyn.tasks-dcdeca0f318eb14ede254e597a203a56e0e6c770.tar.gz
org.eclipse.mylyn.tasks-dcdeca0f318eb14ede254e597a203a56e0e6c770.tar.bz2
397041: make it clear what private notes section is forrefs/changes/77/15277/3
Bug: 397041 Change-Id: I53347062a501d7b5876424d845d190a0df7da741 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=397041 Signed-off-by: Tomasz Zarna <tomasz.zarna@tasktop.com>
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java32
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties4
2 files changed, 17 insertions, 19 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java
index 615f6ef..0926c9b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/PlanningPart.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
@@ -378,15 +378,13 @@ public class PlanningPart extends AbstractLocalEditorPart {
toolkit.paintBordersFor(composite);
}
- private void addNotesLabelText(final FormToolkit toolkit, Composite composite) {
-
- if (notesString.length() == 0 && !noteEditor.getViewer().getTextWidget().isFocusControl()) {
- notesString = PERSONAL_NOTES;
- noteEditor.setText(notesString);
+ private void addNotesLabelText(final FormToolkit toolkit, final Composite composite) {
+ if (!noteEditor.getViewer().getTextWidget().isFocusControl()) {
+ setNotesLabelText(composite);
}
+ noteEditor.getViewer().getTextWidget().addFocusListener(new FocusListener() {
- FocusListener removePersonalNotesFocusListener = new FocusListener() {
-
+ @Override
public void focusGained(FocusEvent e) {
if (noteEditor.getText().equals(PERSONAL_NOTES)) {
noteEditor.setText(""); //$NON-NLS-1$
@@ -397,23 +395,23 @@ public class PlanningPart extends AbstractLocalEditorPart {
}
}
+ @Override
public void focusLost(FocusEvent e) {
+ setNotesLabelText(composite);
}
- };
- boolean changeColor = false;
- if (noteEditor.getText().equals(PERSONAL_NOTES)) {
- changeColor = true;
- }
+ });
+ }
- if (noteEditor.getViewer() != null) {
- noteEditor.getViewer().getTextWidget().addFocusListener(removePersonalNotesFocusListener);
- if (changeColor) {
+ private void setNotesLabelText(Composite composite) {
+ if (notesString.length() == 0) {
+ notesString = PERSONAL_NOTES;
+ noteEditor.setText(notesString);
+ if (noteEditor.getViewer() != null) {
noteEditor.getViewer()
.getTextWidget()
.setForeground(composite.getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
}
}
-
}
private void createActiveTime(FormToolkit toolkit, Composite toolbarComposite, int numColumns) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties
index 62f6488..249cff9 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009, 2010 Tasktop Technologies and others.
+# Copyright (c) 2009, 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
@@ -40,7 +40,7 @@ PlanningPart_Active_time_Label=Active time:
PlanningPart_Default_Product=Eclipse
PlanningPart_Later=Later
PlanningPart_Next_Week=Next Week
-PlanningPart_Personal_Notes=Notes
+PlanningPart_Personal_Notes=You can type private notes here. Private notes are never submitted to the repository.
PlanningPart_Reset_Active_Time=Reset Active Time
PlanningPart_Scheduled_for_X_Tooltip=Scheduled for {0}
PlanningPart_This_Week=This Week