diff --git a/third_party/firefox_sendtophone/chrome/content/ff-overlay.js b/third_party/firefox_sendtophone/chrome/content/ff-overlay.js index bf288fe..2d2b9c1 100644 --- a/third_party/firefox_sendtophone/chrome/content/ff-overlay.js +++ b/third_party/firefox_sendtophone/chrome/content/ff-overlay.js @@ -102,8 +102,11 @@ sendtophone.checkDrag = function(event) { //event.dataTransfer.dropEffect = "copy"; var types = event.dataTransfer.types; - if (types.contains("text/plain") || types.contains("text/uri-list") || types.contains("text/x-moz-url") || types.contains("application/x-moz-file")) + if (types.contains("text/plain") || types.contains("text/uri-list") || types.contains("text/x-moz-url")) event.preventDefault(); + + if (this.prefs.getCharPref( "fileServerUrl" ) && types.contains("application/x-moz-file") ) + event.preventDefault(); } sendtophone.doDrop = function(event) @@ -154,8 +157,10 @@ sendtophone.pickFile = function(folder) if (folder) fp.init(window, this.strings.getString("SendFolderToPhone"), Ci.nsIFilePicker.modeGetFolder); else + { fp.init(window, this.strings.getString("SendFileToPhone"), Ci.nsIFilePicker.modeOpenMultiple); - fp.appendFilters(Ci.nsIFilePicker.filterAll | Ci.nsIFilePicker.filterImages); + fp.appendFilters(Ci.nsIFilePicker.filterAll | Ci.nsIFilePicker.filterImages); + } var rv = fp.show(); diff --git a/third_party/firefox_sendtophone/chrome/content/ff-overlay.xul b/third_party/firefox_sendtophone/chrome/content/ff-overlay.xul index 3260fc5..3c3d95c 100644 --- a/third_party/firefox_sendtophone/chrome/content/ff-overlay.xul +++ b/third_party/firefox_sendtophone/chrome/content/ff-overlay.xul @@ -10,10 +10,10 @@ - + + oncommand="sendtophone.pickFile(false)" id="sendtophoneContextMenuSendFiles"/> @@ -28,11 +28,11 @@ - + - + - + - - %downloadDTD; + + %downloadManagerDTD; + + %uploadDTD; ]> - - diff --git a/third_party/firefox_sendtophone/chrome/content/uploads.js b/third_party/firefox_sendtophone/chrome/content/uploads.js index 1e0a7b7..56f9efd 100644 --- a/third_party/firefox_sendtophone/chrome/content/uploads.js +++ b/third_party/firefox_sendtophone/chrome/content/uploads.js @@ -65,8 +65,8 @@ let gUploadListener = { gUploadsView.removeChild(item); // If no more pending uploads, close the tab. - // Use a 100ms timeout to avoid flicker while compress -> upload a folder - window.setTimeout( checkPendingUploads, 100); + // Use a 0 ms timeout to avoid flicker while compress -> upload a folder + window.setTimeout( checkPendingUploads, 0); } }; diff --git a/third_party/firefox_sendtophone/chrome/content/uploads.xul b/third_party/firefox_sendtophone/chrome/content/uploads.xul index bbd27ad..367bc68 100644 --- a/third_party/firefox_sendtophone/chrome/content/uploads.xul +++ b/third_party/firefox_sendtophone/chrome/content/uploads.xul @@ -10,19 +10,6 @@ onload="Startup();" onunload="Shutdown();" onclose="return closeWindow(false);"> - -