Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2009-06-11 16:14:29 -0400
committersminto2009-06-11 16:14:29 -0400
commit07f82f961a790ffd1d84fc4bf267ff743736f96b (patch)
tree513ac4f3ee963cc377c211115a918e92aaf24b1e
parentf6512ffdf4fe04fc73fefbf26e5237905f071ffe (diff)
downloadorg.eclipse.mylyn.tasks-07f82f961a790ffd1d84fc4bf267ff743736f96b.tar.gz
org.eclipse.mylyn.tasks-07f82f961a790ffd1d84fc4bf267ff743736f96b.tar.xz
org.eclipse.mylyn.tasks-07f82f961a790ffd1d84fc4bf267ff743736f96b.zip
NEW - bug 264583: improve the Task List presentation switcher
https://bugs.eclipse.org/bugs/show_bug.cgi?id=264583
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index 1776f2d8a..531a2fd41 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -1007,6 +1007,9 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I
getSite().setSelectionProvider(getViewer());
getSite().getPage().addPartListener(editorListener);
+ // we need to update the icon here as the action was not created when the presentation was applied
+ updatePresentationSelectorImage();
+
// Need to do this because the page, which holds the active working set is not around on creation, see bug 203179
PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPageListener(PAGE_LISTENER);
}
@@ -1050,12 +1053,18 @@ public class TaskListView extends ViewPart implements IPropertyChangeListener, I
refresh(true);
currentPresentation = presentation;
- presentationDropDownSelectionAction.setImageDescriptor(currentPresentation.getImageDescriptor());
+ updatePresentationSelectorImage();
} finally {
getViewer().getControl().setRedraw(true);
}
}
+ private void updatePresentationSelectorImage() {
+ if (presentationDropDownSelectionAction != null && currentPresentation != null) {
+ presentationDropDownSelectionAction.setImageDescriptor(currentPresentation.getImageDescriptor());
+ }
+ }
+
public AbstractTaskListPresentation getCurrentPresentation() {
return currentPresentation;
}

Back to the top