зеркало из https://github.com/mozilla/pjs.git
#ifdef out code that uses the old bookmarks service so that we can complete initialization without hitting exceptions. MOZ_PLACES only.
This commit is contained in:
Родитель
11a69b2fe5
Коммит
6ff9886f96
|
@ -140,10 +140,12 @@ function pageShowEventHandlers(event)
|
|||
targetBrowser = gBrowser.mCurrentBrowser;
|
||||
}
|
||||
|
||||
#ifndef MOZ_PLACES
|
||||
// update the last visited date
|
||||
if (targetBrowser.currentURI.spec)
|
||||
BMSVC.updateLastVisitedDate(targetBrowser.currentURI.spec,
|
||||
targetBrowser.contentDocument.characterSet);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -811,7 +813,9 @@ function delayedStartup()
|
|||
|
||||
// loads the services
|
||||
initServices();
|
||||
#ifndef MOZ_PLACES
|
||||
initBMService();
|
||||
#endif
|
||||
gBrowser.addEventListener("pageshow", function(evt) { setTimeout(pageShowEventHandlers, 0, evt); }, true);
|
||||
|
||||
window.addEventListener("keypress", ctrlNumberTabSelection, false);
|
||||
|
@ -827,6 +831,7 @@ function delayedStartup()
|
|||
// add bookmark options to context menu for tabs
|
||||
addBookmarkMenuitems();
|
||||
// now load bookmarks
|
||||
#ifndef MOZ_PLACES
|
||||
BMSVC.readBookmarks();
|
||||
var bt = document.getElementById("bookmarks-ptf");
|
||||
if (bt) {
|
||||
|
@ -835,6 +840,7 @@ function delayedStartup()
|
|||
document.getElementById("bookmarks-chevron").ref = btf;
|
||||
bt.database.AddObserver(BookmarksToolbarRDFObserver);
|
||||
}
|
||||
#endif
|
||||
window.addEventListener("resize", BookmarksToolbar.resizeFunc, false);
|
||||
#ifndef MOZ_PLACES
|
||||
document.getElementById("PersonalToolbar")
|
||||
|
@ -1061,7 +1067,9 @@ function nonBrowserWindowDelayedStartup()
|
|||
{
|
||||
// loads the services
|
||||
initServices();
|
||||
#ifndef MOZ_PLACES
|
||||
initBMService();
|
||||
#endif
|
||||
|
||||
// init global pref service
|
||||
gPrefService = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
|
@ -3095,6 +3103,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged)
|
|||
// fix up the personal toolbar folder
|
||||
var bt = document.getElementById("bookmarks-ptf");
|
||||
if (bt) {
|
||||
#ifndef MOZ_PLACES
|
||||
var btf = BMSVC.getBookmarksToolbarFolder().Value;
|
||||
var btchevron = document.getElementById("bookmarks-chevron");
|
||||
bt.ref = btf;
|
||||
|
@ -3108,6 +3117,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged)
|
|||
bt.database.AddObserver(BookmarksToolbarRDFObserver);
|
||||
bt.builder.rebuild();
|
||||
btchevron.builder.rebuild();
|
||||
#endif
|
||||
|
||||
// fake a resize; this function takes care of flowing bookmarks
|
||||
// from the bar to the overflow item
|
||||
|
|
Загрузка…
Ссылка в новой задаче