mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 03:27:31 +09:00
[Pale-Moon] Issue #1925 - Follow-up: Don't show link items when pref is less than 1.
A user setting the pref to 0 most likely wants to get rid of the items, so let's allow that by simply not calling PlacesMenu.call at all in that case.
This commit is contained in:
parent
e3d51b39b6
commit
075eebec12
1 changed files with 9 additions and 6 deletions
|
|
@ -504,13 +504,16 @@ function HistoryMenu(aPopupShowingEvent) {
|
||||||
XPCOMUtils.defineLazyServiceGetter(this, "_ss",
|
XPCOMUtils.defineLazyServiceGetter(this, "_ss",
|
||||||
"@mozilla.org/browser/sessionstore;1",
|
"@mozilla.org/browser/sessionstore;1",
|
||||||
"nsISessionStore");
|
"nsISessionStore");
|
||||||
let maxResults = Services.prefs.getIntPref("browser.history.menuMaxResults",15);
|
let maxResults = Services.prefs.getIntPref("browser.history.menuMaxResults", 15);
|
||||||
if (maxResults < 1 || maxResults > 50) {
|
// Workaround so that maxResults = 0 wouldn't create unlimited items
|
||||||
// Return to sanity...
|
if (maxResults > 0) {
|
||||||
maxResults = 15;
|
if (maxResults > 50) {
|
||||||
|
// Return to sanity...
|
||||||
|
maxResults = 15;
|
||||||
|
}
|
||||||
|
PlacesMenu.call(this, aPopupShowingEvent,
|
||||||
|
"place:sort=4&maxResults=" + maxResults.toString().trim());
|
||||||
}
|
}
|
||||||
PlacesMenu.call(this, aPopupShowingEvent,
|
|
||||||
"place:sort=4&maxResults=" + maxResults.toString().trim());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HistoryMenu.prototype = {
|
HistoryMenu.prototype = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue