mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 952894 - Use existing triggers to clear open search engines state r=rnewman
This commit is contained in:
parent
be3a852b60
commit
5f07023e42
@ -637,6 +637,7 @@ public class Tab {
|
||||
clearFavicon();
|
||||
|
||||
setHasFeeds(false);
|
||||
setHasOpenSearch(false);
|
||||
updateTitle(null);
|
||||
updateIdentityData(null);
|
||||
setReaderEnabled(false);
|
||||
|
@ -18,8 +18,7 @@
|
||||
android:title="@string/contextmenu_subscribe"/>
|
||||
|
||||
<item android:id="@+id/add_search_engine"
|
||||
android:title="@string/contextmenu_add_search_engine"
|
||||
android:visible="false"/>
|
||||
android:title="@string/contextmenu_add_search_engine"/>
|
||||
|
||||
<item android:id="@+id/copyurl"
|
||||
android:title="@string/contextmenu_copyurl"/>
|
||||
|
@ -365,10 +365,7 @@ public class BrowserToolbar extends GeckoRelativeLayout
|
||||
menu.findItem(R.id.add_to_launcher).setVisible(false);
|
||||
}
|
||||
|
||||
if (!tab.hasFeeds()) {
|
||||
menu.findItem(R.id.subscribe).setVisible(false);
|
||||
}
|
||||
|
||||
menu.findItem(R.id.subscribe).setVisible(tab.hasFeeds());
|
||||
menu.findItem(R.id.add_search_engine).setVisible(tab.hasOpenSearch());
|
||||
} else {
|
||||
// if there is no tab, remove anything tab dependent
|
||||
|
@ -3777,18 +3777,8 @@ Tab.prototype = {
|
||||
|
||||
// Clear page-specific opensearch engines and feeds for a new request.
|
||||
if (aStateFlags & Ci.nsIWebProgressListener.STATE_START && aRequest && aWebProgress.isTopLevel) {
|
||||
this.browser.engines = null;
|
||||
|
||||
// Send message to clear search engine option in context menu.
|
||||
let newEngineMessage = {
|
||||
type: "Link:OpenSearch",
|
||||
tabID: this.id,
|
||||
visible: false
|
||||
};
|
||||
|
||||
sendMessageToJava(newEngineMessage);
|
||||
|
||||
this.browser.feeds = null;
|
||||
this.browser.engines = null;
|
||||
this.browser.feeds = null;
|
||||
}
|
||||
|
||||
// true if the page loaded successfully (i.e., no 404s or other errors)
|
||||
|
Loading…
Reference in New Issue
Block a user