mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 04:05:49 +00:00
Fix for 128815 - numerous bookmarks improvements, including fixes for bugs: 77411, 114142, 126748, 128571.
r=blake, sr=hyatt, a=asa
This commit is contained in:
parent
22df55fdc5
commit
735bd4e7ff
@ -112,11 +112,27 @@ function updateHistoryCommands()
|
|||||||
goUpdateCommand("cmd_deleteByDomain");
|
goUpdateCommand("cmd_deleteByDomain");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function historyOnClick(aEvent)
|
||||||
|
{
|
||||||
|
// This is kind of a hack but matches the currently implemented behaviour.
|
||||||
|
// If a status bar is not present, assume we're in sidebar mode, and thus single clicks on containers
|
||||||
|
// will open the container. Single clicks on non-containers are handled below in historyOnSelect.
|
||||||
|
if (!gHistoryStatus) {
|
||||||
|
var currentIndex = gHistoryOutliner.currentIndex;
|
||||||
|
var row = { };
|
||||||
|
var col = { };
|
||||||
|
var elt = { };
|
||||||
|
gHistoryOutliner.outlinerBoxObject.getCellAt(aEvent.clientX, aEvent.clientY, row, col, elt);
|
||||||
|
if (row.value >= 0 && isContainer(gHistoryOutliner, row.value))
|
||||||
|
gHistoryOutliner.outlinerBoxObject.view.toggleOpenState(row.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function historyOnSelect()
|
function historyOnSelect()
|
||||||
{
|
{
|
||||||
if (!gHistoryStatus) {
|
if (!gHistoryStatus) {
|
||||||
OpenURL(false);
|
OpenURL(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// every time selection changes, save the last hostname
|
// every time selection changes, save the last hostname
|
||||||
@ -257,7 +273,7 @@ function OpenURL(aInNewWindow)
|
|||||||
var currentIndex = gHistoryOutliner.currentIndex;
|
var currentIndex = gHistoryOutliner.currentIndex;
|
||||||
var builder = gHistoryOutliner.builder.QueryInterface(Components.interfaces.nsIXULOutlinerBuilder);
|
var builder = gHistoryOutliner.builder.QueryInterface(Components.interfaces.nsIXULOutlinerBuilder);
|
||||||
var url = builder.getResourceAtIndex(currentIndex).Value;
|
var url = builder.getResourceAtIndex(currentIndex).Value;
|
||||||
|
|
||||||
if (aInNewWindow) {
|
if (aInNewWindow) {
|
||||||
var count = gHistoryOutliner.outlinerBoxObject.view.selection.count;
|
var count = gHistoryOutliner.outlinerBoxObject.view.selection.count;
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user