Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2009-11-05 18:03:23 +0000
committersminto2009-11-05 18:03:23 +0000
commit8ed1270d4216fe46acb626c344ba14743c739859 (patch)
tree8d7490e0aa7b044e257c3241a54ce073dbcf6645
parent9994cae2bd0bd1a1ff10251ba40a306e425826d9 (diff)
downloadorg.eclipse.mylyn.tasks-8ed1270d4216fe46acb626c344ba14743c739859.tar.gz
org.eclipse.mylyn.tasks-8ed1270d4216fe46acb626c344ba14743c739859.tar.xz
org.eclipse.mylyn.tasks-8ed1270d4216fe46acb626c344ba14743c739859.zip
RESOLVED - bug 294357: tasks with no priority should not show a "-" in the summary part
https://bugs.eclipse.org/bugs/show_bug.cgi?id=294357
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java32
1 files changed, 17 insertions, 15 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java
index 59414d58f..6f003edbe 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java
@@ -106,11 +106,9 @@ public class TaskEditorSummaryPart extends AbstractTaskEditorPart {
}
return editor.getControl();
} else {
- //some connectors don't have priorities. in this case we just show the defalut icon.
+ //some connectors don't have priorities. in this case we just show no icon.
//this can't be handled within the attribute editor, as it asserts that the attribute cannot be null
- Label imageOnly = toolkit.createLabel(composite, ""); //$NON-NLS-1$
- imageOnly.setImage(CommonImages.getImage(CommonImages.PRIORITY_3_LARGE));
- return imageOnly;
+ return null;
}
}
@@ -156,18 +154,22 @@ public class TaskEditorSummaryPart extends AbstractTaskEditorPart {
// add priority as an icon
TaskAttribute priorityAttribute = getTaskData().getRoot().getMappedAttribute(TaskAttribute.PRIORITY);
final Control priorityEditor = addAttributeWithIcon(composite, toolkit, priorityAttribute, false);
- GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).span(1, 2).applyTo(priorityEditor);
- // forward focus to the summary editor
- priorityEditor.addFocusListener(new FocusAdapter() {
- @Override
- public void focusGained(FocusEvent e) {
- if (summaryEditor != null && summaryEditor.getControl() != null) {
- summaryEditor.getControl().setFocus();
- //only forward it on first view
- priorityEditor.removeFocusListener(this);
+ if (priorityEditor != null) {
+ GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).span(1, 2).applyTo(priorityEditor);
+ // forward focus to the summary editor
+ priorityEditor.addFocusListener(new FocusAdapter() {
+ @Override
+ public void focusGained(FocusEvent e) {
+ if (summaryEditor != null && summaryEditor.getControl() != null) {
+ summaryEditor.getControl().setFocus();
+ //only forward it on first view
+ priorityEditor.removeFocusListener(this);
+ }
}
- }
- });
+ });
+ } else {
+ layout.numColumns = 1;
+ }
addSummaryText(composite, toolkit);

Back to the top