Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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