Bug 531071: bypass the awesomescreen when the browser is being opened for specific page [r=gavin]

This commit is contained in:
Mark Finkle 2009-12-01 01:04:55 -05:00
Родитель 4e7f2dfc55
Коммит 93e1225172
1 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -499,8 +499,8 @@ var BrowserUI = {
// Give the new page lots of room // Give the new page lots of room
Browser.hideSidebars(); Browser.hideSidebars();
this.closeAutoComplete(true);
this._edit.popup.close();
this._edit.value = aURI; this._edit.value = aURI;
var flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP; var flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
@ -515,6 +515,13 @@ var BrowserUI = {
BrowserSearch.updateSearchButtons(); BrowserSearch.updateSearchButtons();
this._edit.showHistoryPopup(); this._edit.showHistoryPopup();
}, },
closeAutoComplete: function closeAutoComplete(aResetInput) {
if (aResetInput)
this._edit.popup.close();
else
this._edit.popup.closePopup();
},
isAutoCompleteOpen: function isAutoCompleteOpen() { isAutoCompleteOpen: function isAutoCompleteOpen() {
return this._edit.popup.popupOpen; return this._edit.popup.popupOpen;
@ -529,8 +536,7 @@ var BrowserUI = {
// Give the new page lots of room // Give the new page lots of room
Browser.hideSidebars(); Browser.hideSidebars();
this.closeAutoComplete(false);
this._edit.popup.closePopup();
// Make sure we're online before attempting to load // Make sure we're online before attempting to load
Util.forceOnline(); Util.forceOnline();
@ -553,12 +559,14 @@ var BrowserUI = {
this.hidePanel(); this.hidePanel();
if (aURI == "about:blank") { if (aURI == "about:blank") {
// Display awesomebar UI
this.showToolbar(true); this.showToolbar(true);
this.showAutoComplete(); this.showAutoComplete();
} }
else { else {
// Give the new page lots of room // Give the new page lots of room
Browser.hideSidebars(); Browser.hideSidebars();
this.closeAutoComplete(true);
} }
return tab; return tab;