mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 935273 - Force nocrop property in FilePicker for b2g. r=fabrice
This commit is contained in:
parent
b4e4f41a8a
commit
d0a040b7e7
@ -47,6 +47,7 @@ FilePicker.prototype = {
|
||||
/* members */
|
||||
|
||||
mParent: undefined,
|
||||
mExtraProps: {},
|
||||
mFilterTypes: [],
|
||||
mFileEnumerator: undefined,
|
||||
mFilePickerShownCallback: undefined,
|
||||
@ -85,6 +86,8 @@ FilePicker.prototype = {
|
||||
|
||||
if (filterMask & Ci.nsIFilePicker.filterImages) {
|
||||
this.mFilterTypes = this.mFilterTypes.concat(IMAGE_FILTERS);
|
||||
// This property is needed for the gallery app pick activity.
|
||||
this.mExtraProps['nocrop'] = true;
|
||||
}
|
||||
|
||||
// Ci.nsIFilePicker.filterXML is not supported
|
||||
@ -117,6 +120,12 @@ FilePicker.prototype = {
|
||||
detail.type = this.mFilterTypes;
|
||||
}
|
||||
|
||||
for (let prop in this.mExtraProps) {
|
||||
if (!(prop in detail)) {
|
||||
detail[prop] = this.mExtraProps[prop];
|
||||
}
|
||||
}
|
||||
|
||||
cpmm.sendAsyncMessage('file-picker', detail);
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user