mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-05 12:05:22 +00:00
Fixing 'Manage Bookmarks...' menu item. Victim of global search and replace. Hooking up 'Add Current Page' menu item.
This commit is contained in:
parent
70139f59d3
commit
17133e3861
@ -111,17 +111,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
function BrowserAddBookmark(url,title)
|
||||
{
|
||||
// get RDF Core service
|
||||
var rdfCore = XPAppCoresManager.Find("RDFCore");
|
||||
if (!rdfCore) {
|
||||
rdfCore = new RDFCore();
|
||||
if (!rdfCore) {
|
||||
return(false);
|
||||
}
|
||||
rdfCore.Init("RDFCore");
|
||||
XPAppCoresManager.Add(rdfCore);
|
||||
}
|
||||
// Add it
|
||||
rdfCore.addBookmark(url,title);
|
||||
}
|
||||
|
||||
function BrowserEditBookmarks()
|
||||
{
|
||||
var prefsCore = XPAppCoresManager.Find("PrefsCore");
|
||||
if (!PrefsCore) {
|
||||
PrefsCore = new ToolkitCore();
|
||||
if (PrefsCore) {
|
||||
toolkitCore.Init("PrefsCore");
|
||||
var toolkitCore = XPAppCoresManager.Find("toolkitCore");
|
||||
if (!toolkitCore) {
|
||||
toolkitCore = new ToolkitCore();
|
||||
if (toolkitCore) {
|
||||
toolkitCore.Init("toolkitCore");
|
||||
}
|
||||
}
|
||||
if (PrefsCore) {
|
||||
PrefsCore.ShowWindow(window);
|
||||
if (toolkitCore) {
|
||||
toolkitCore.ShowWindow("resource://res/rdf/bookmarks.xul",window);
|
||||
}
|
||||
}
|
||||
|
||||
@ -432,8 +448,7 @@
|
||||
</menu>
|
||||
<menu name="Bookmarks" onclick="OpenBookmarkURL(event.target)"
|
||||
datasources="rdf:bookmarks" id="NC:BookmarksRoot" open="true">
|
||||
<menuitem name="Add Current Page"/>
|
||||
<menuitem name="Add To Personal Toolbar"/>
|
||||
<menuitem name="Add Current Page" onclick="BrowserAddBookmark(window.frames[0].location.href,window.frames[0].document.title);"/>
|
||||
<menuitem name="Manage Bookmarks..." onclick="BrowserEditBookmarks();"/>
|
||||
<separator/>
|
||||
</menu>
|
||||
|
Loading…
Reference in New Issue
Block a user