Don't include current URL when building Recent Files menu. Checking in work for Ryan Cassin, b=17502, r=cmanske

This commit is contained in:
cmanske%netscape.com 2000-07-01 02:16:04 +00:00
Родитель 684793f190
Коммит 7d40913fb4
1 изменённых файлов: 12 добавлений и 6 удалений

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

@ -1020,19 +1020,25 @@ function BuildRecentMenu()
var historyCount = 10;
try { historyCount = gPrefs.CopyUnicharPref("editor.history.url_maximum"); } catch(e) {}
var a=1; // Keeps track of which access key to use in the menuitem
for(i = 0; i < historyCount; i++)
{
var title = getUnicharPref("editor.history_title_"+i);
var url = getUnicharPref("editor.history_url_"+i);
var url = getUnicharPref("editor.history_url_"+i);
if (!url || url.length == 0)
break;
AppendRecentMenuitem(i+1, popup, title, url, i+2);
if (!url || url.length == 0)
break;
// If the current url is already opened, don't put useless entries into the menu
if (url != window.editorShell.editorDocument.location)
{
AppendRecentMenuitem(a, popup, title, url);
a++;
}
}
}
function AppendRecentMenuitem(accessKey, menupopup, title, url, menuIndex)
function AppendRecentMenuitem(accessKey, menupopup, title, url)
{
if (menupopup)
{