From 8e5f9d2d5beec3f8761783686d533a377a221b58 Mon Sep 17 00:00:00 2001 From: Edward Mann Date: Thu, 17 May 2007 03:11:14 +0000 Subject: [PATCH] Applied code to fix the PHP Browser hang issue reported in bug #1374420. It was tested and verified that it fixed the issue. This commit also changes the behavior of the browser url bar. If you had typed in php.net and hit enter it would have saved a copy to your browser history. Then if you wanted to go to phpeclipse.net, you would not get past php before it would auto take you to php.net. This is changed. you can now type in the url you would like to visit before any action is taken. --- .../phpeclipse/webbrowser/internal/WebBrowser.java | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/net.sourceforge.phpeclipse.webbrowser/src/net/sourceforge/phpeclipse/webbrowser/internal/WebBrowser.java b/net.sourceforge.phpeclipse.webbrowser/src/net/sourceforge/phpeclipse/webbrowser/internal/WebBrowser.java index 961fd5d..c4e6e52 100644 --- a/net.sourceforge.phpeclipse.webbrowser/src/net/sourceforge/phpeclipse/webbrowser/internal/WebBrowser.java +++ b/net.sourceforge.phpeclipse.webbrowser/src/net/sourceforge/phpeclipse/webbrowser/internal/WebBrowser.java @@ -139,7 +139,8 @@ public class WebBrowser extends Composite { public void widgetSelected(SelectionEvent we) { try { if (combo.getSelectionIndex() != -1) - setURL(combo.getItem(combo.getSelectionIndex())); + setURL(combo.getItem(combo.getSelectionIndex()), + false); } catch (Exception e) { } } @@ -238,7 +239,8 @@ public class WebBrowser extends Composite { shell.dispose(); else { // #1365431 (toshihiro) editor.closeEditor(); causes NPE - if (editor != null) editor.closeEditor(); + if (editor != null) + editor.closeEditor(); } } }); @@ -379,11 +381,12 @@ public class WebBrowser extends Composite { if (newURL != null) url = newURL; - if (browse) + if (browse) { navigate(url); - addToHistory(url); - updateHistory(); + addToHistory(url); + updateHistory(); + } } protected void addToHistory(String url) { -- 1.7.1