Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsminto2005-07-20 23:31:34 +0000
committersminto2005-07-20 23:31:34 +0000
commitd06319cef9e6e8b87ba206d8221af82958f405d4 (patch)
tree4bbc829931a697a53eacc554bd6c24ed8fb7bc83 /org.eclipse.mylyn.tasks.ui
parent6f01a2028ba96990d51973c5614c1c581172a00f (diff)
downloadorg.eclipse.mylyn.tasks-d06319cef9e6e8b87ba206d8221af82958f405d4.tar.gz
org.eclipse.mylyn.tasks-d06319cef9e6e8b87ba206d8221af82958f405d4.tar.xz
org.eclipse.mylyn.tasks-d06319cef9e6e8b87ba206d8221af82958f405d4.zip
kens patch for Bug 104257 make mode where only one task context can be active
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java6
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java6
2 files changed, 12 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java
index faf870fdd..834e777a3 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/TaskListManager.java
@@ -112,6 +112,12 @@ public class TaskListManager {
}
public void activateTask(ITask task) {
+ if (!MylarTasksPlugin.getDefault().isMultipleMode()) {
+ for (ITask t : taskList.getActiveTasks()) {
+ for (ITaskActivityListener listener : listeners) listener.taskDeactivated(t);
+ }
+ taskList.clearActiveTasks();
+ }
taskList.setActive(task, true);
for (ITaskActivityListener listener : listeners) listener.taskActivated(task);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java
index d5c46e422..a2331b493 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskList.java
@@ -165,4 +165,10 @@ public class TaskList implements Serializable {
categories.clear();
rootTasks.clear();
}
+ public void clearActiveTasks() {
+ for (ITask task : activeTasks) {
+ task.setActive(false);
+ }
+ activeTasks.clear();
+ }
}

Back to the top