зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
684793f190
Коммит
7d40913fb4
|
@ -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;
|
||||
if (!url || url.length == 0)
|
||||
break;
|
||||
|
||||
AppendRecentMenuitem(i+1, popup, title, url, i+2);
|
||||
// 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)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче