mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
Fix for 106326 - better handling of IE favorites. Adding support for one-time import of
IE favorites in addition to dynamic root which is now off by default. r=rjc, sr=hyatt
This commit is contained in:
parent
c09ce1b52a
commit
23745b4d97
@ -114,7 +114,7 @@ function UpdateBookmarksLastVisitedDate(event)
|
||||
gBookmarksService = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
|
||||
.getService(Components.interfaces.nsIBookmarksService);
|
||||
|
||||
gBookmarksService.UpdateBookmarkLastVisitedDate(url, _content.document.characterSet);
|
||||
gBookmarksService.updateLastVisitedDate(url, _content.document.characterSet);
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,8 +126,8 @@ function HandleBookmarkIcon(iconURL, addFlag)
|
||||
if (!gBookmarksService)
|
||||
gBookmarksService = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
|
||||
.getService(Components.interfaces.nsIBookmarksService);
|
||||
if (addFlag) gBookmarksService.UpdateBookmarkIcon(url, iconURL);
|
||||
else gBookmarksService.RemoveBookmarkIcon(url, iconURL);
|
||||
if (addFlag) gBookmarksService.updateBookmarkIcon(url, iconURL);
|
||||
else gBookmarksService.removeBookmarkIcon(url, iconURL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -936,7 +936,7 @@ function getShortcutOrURI(url)
|
||||
gBookmarksService = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
|
||||
.getService(Components.interfaces.nsIBookmarksService);
|
||||
|
||||
var shortcutURL = gBookmarksService.FindShortcut(url);
|
||||
var shortcutURL = gBookmarksService.resolveKeyword(url);
|
||||
if (!shortcutURL) {
|
||||
// rjc: add support for string substitution with shortcuts (4/4/2000)
|
||||
// (see bug # 29871 for details)
|
||||
@ -944,7 +944,7 @@ function getShortcutOrURI(url)
|
||||
if (aOffset > 0) {
|
||||
var cmd = url.substr(0, aOffset);
|
||||
var text = url.substr(aOffset+1);
|
||||
shortcutURL = gBookmarksService.FindShortcut(cmd);
|
||||
shortcutURL = gBookmarksService.resolveKeyword(cmd);
|
||||
if (shortcutURL && text) {
|
||||
aOffset = shortcutURL.indexOf("%s");
|
||||
if (aOffset >= 0)
|
||||
|
@ -680,6 +680,6 @@ function insertBookmarkAt(aURL, aTitle, aCharset, aFolderRes, aIndex)
|
||||
const kBMSContractID = "@mozilla.org/browser/bookmarks-service;1";
|
||||
const kBMSIID = Components.interfaces.nsIBookmarksService;
|
||||
const kBMS = Components.classes[kBMSContractID].getService(kBMSIID);
|
||||
kBMS.insertBookmarkInFolder(aURL, aTitle, aCharset, aFolderRes, aIndex);
|
||||
kBMS.createBookmarkEx(aTitle, aURL, aCharset, aFolderRes, aIndex);
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ nsBrowserStatusHandler.prototype =
|
||||
if (!gBookmarksService)
|
||||
gBookmarksService = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
|
||||
.getService(Components.interfaces.nsIBookmarksService);
|
||||
gBookmarksService.UpdateBookmarkIcon(this.urlBar.value, aHref);
|
||||
gBookmarksService.updateBookmarkIcon(this.urlBar.value, aHref);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user