Bug 335323 - Fix bookmark-properties dialog dimensions and the dialog modality flag in the various modes of the dialog. r=sspitzer

This commit is contained in:
mozilla.mano%sent.com 2007-03-30 23:47:07 +00:00
Родитель 80464c3459
Коммит 649b1f3afe
2 изменённых файлов: 22 добавлений и 7 удалений

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

@ -58,6 +58,7 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="BookmarkPropertiesPanel.onDialogLoad();"
onunload="BookmarkPropertiesPanel.onDialogUnload();"
style="min-width: 30em;"
persist="screenX screenY width">
<stringbundleset id="stringbundleset">

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

@ -707,6 +707,8 @@ var PlacesUtils = {
*
* The showMinimalAdd* methods open the dialog by its alternative URI. Thus
* they persist the dialog dimensions separately from the showAdd* methods.
* Note these variants also do not return the dialog "performed" state since
* they may not open the dialog modally.
*/
/**
@ -821,7 +823,7 @@ var PlacesUtils = {
else
info.hiddenRows.push("keyword");
return this._showBookmarkDialog(info, true);
this._showBookmarkDialog(info, true);
},
/**
@ -912,7 +914,7 @@ var PlacesUtils = {
if (!aShowPicker)
info.hiddenRows.push("folder picker");
}
return this._showBookmarkDialog(info, true);
this._showBookmarkDialog(info, true);
},
/**
@ -933,7 +935,7 @@ var PlacesUtils = {
hiddenRows: ["description"],
URIList: aURIList
};
return this._showBookmarkDialog(info, true);
this._showBookmarkDialog(info, true);
},
/**
@ -1011,16 +1013,28 @@ var PlacesUtils = {
* @param aMinimalUI
* [optional] if true, the dialog is opened by its alternative
* chrome: uri.
* @return true if any transaction has been performed.
*
* Note: In minimal UI mode, we open the dialog non-modal on any system but
* Mac OS X.
* @return true if any transaction has been performed, false otherwise.
* Note: the return value of this method is not reliable in minimal UI mode
* since the dialog may not be opened modally.
*/
_showBookmarkDialog: function PU__showBookmarkDialog(aInfo, aMinimalUI) {
var dialogURL = aMinimalUI ?
"chrome://browser/content/places/bookmarkPageDialog.xul" :
"chrome://browser/content/places/bookmarkProperties.xul";
window.openDialog(dialogURL, "",
"width=600,height=400,chrome,dependent,modal,resizable",
aInfo);
var features;
if (aMinimalUI)
#ifdef XP_MACOSX
features = "centerscreen,chrome,dialog,resizable,modal";
#else
features = "centerscreen,chrome,dialog,resizable,dependent";
#endif
else
features = "centerscreen,chrome,modal,resizable=no";
window.openDialog(dialogURL, "", features, aInfo);
return ("performed" in aInfo && aInfo.performed);
},