mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 838875 - Remove deprecated third argument from PlacesUIUtils.showBookmarkDialog.
r=mano
This commit is contained in:
parent
cfb89bba05
commit
ede93cdaaa
@ -334,30 +334,26 @@ this.PlacesUIUtils = {
|
||||
* See documentation at the top of bookmarkProperties.js
|
||||
* @param aWindow
|
||||
* Owner window for the new dialog.
|
||||
* @param aResizable [optional]
|
||||
* Whether the dialog is allowed to resize. Do not pass this for new
|
||||
* callers since it's deprecated. It'll be removed in future releases.
|
||||
*
|
||||
* @see documentation at the top of bookmarkProperties.js
|
||||
* @return true if any transaction has been performed, false otherwise.
|
||||
*/
|
||||
showBookmarkDialog:
|
||||
function PUIU_showBookmarkDialog(aInfo, aParentWindow, aResizable) {
|
||||
function PUIU_showBookmarkDialog(aInfo, aParentWindow) {
|
||||
// Preserve size attributes differently based on the fact the dialog has
|
||||
// a folder picker or not. If the picker is visible, the dialog should
|
||||
// be resizable since it may not show enough content for the folders
|
||||
// hierarchy.
|
||||
let hasFolderPicker = !("hiddenRows" in aInfo) ||
|
||||
aInfo.hiddenRows.indexOf("folderPicker") == -1;
|
||||
let resizable = aResizable !== undefined ? aResizable : hasFolderPicker;
|
||||
// Use a different chrome url, since this allows to persist different sizes,
|
||||
// based on resizability of the dialog.
|
||||
let dialogURL = resizable ?
|
||||
let dialogURL = hasFolderPicker ?
|
||||
"chrome://browser/content/places/bookmarkProperties2.xul" :
|
||||
"chrome://browser/content/places/bookmarkProperties.xul";
|
||||
|
||||
let features =
|
||||
"centerscreen,chrome,modal,resizable=" + (resizable ? "yes" : "no");
|
||||
"centerscreen,chrome,modal,resizable=" + (hasFolderPicker ? "yes" : "no");
|
||||
|
||||
aParentWindow.openDialog(dialogURL, "", features, aInfo);
|
||||
return ("performed" in aInfo && aInfo.performed);
|
||||
|
Loading…
Reference in New Issue
Block a user