Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-10-28 13:57:59 -0400
committermkersten2005-10-28 13:57:59 -0400
commit6edfcfd3f897ceb816510ad1dceebe4b998fb0f5 (patch)
treefa0eae95b9ffd85e815035633be1417bba63d9d5
parentef9b3644850b1583f923c8a8e743afe6082ec1f7 (diff)
downloadorg.eclipse.mylyn.tasks-6edfcfd3f897ceb816510ad1dceebe4b998fb0f5.tar.gz
org.eclipse.mylyn.tasks-6edfcfd3f897ceb816510ad1dceebe4b998fb0f5.tar.xz
org.eclipse.mylyn.tasks-6edfcfd3f897ceb816510ad1dceebe4b998fb0f5.zip
Patch for Bug #113585: Automatically fetch task title
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskInputDialog.java28
1 files changed, 17 insertions, 11 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskInputDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskInputDialog.java
index 5f52e22ae..ae21dc026 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskInputDialog.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskInputDialog.java
@@ -194,21 +194,27 @@ public class TaskInputDialog extends Dialog {
browser.addTitleListener(new TitleListener(){
- boolean changeCalled = false;
+ //Determines when to ignore the second call to changed()
+ boolean ignore = false;
public void changed(TitleEvent event) {
- if (!changeCalled){
- changeCalled = true;
- if (event.title.equals(url) ||
- event.title.equals("Object not found!") ||
- event.title.equals("No page to display") ||
- event.title.equals("Cannot find server") ||
- event.title.equals("Invalid Bug ID")){ //Last one is bugzilla-specific
- MessageDialog.openError(Display.getDefault().getActiveShell(), "Task Description Error", "Could not retrieve a description from the specified web page.");
+ if (!ignore){
+ if (event.title.equals(url)){
+ return;
}
else{
- taskNameTextWidget.setText(event.title);
- }
+ ignore = true;
+ if (event.title.equals(url + "/") ||
+ event.title.equals("Object not found!") ||
+ event.title.equals("No page to display") ||
+ event.title.equals("Cannot find server") ||
+ event.title.equals("Invalid Bug ID")){ //Last one is bugzilla-specific
+ MessageDialog.openError(Display.getDefault().getActiveShell(), "Task Description Error", "Could not retrieve a description from the specified web page.");
+ }
+ else{
+ taskNameTextWidget.setText(event.title);
+ }
+ }
}
}
});

Back to the top