Browse code

[tbird] BM-14428 Fix: tb 68 support : deprecated xul <caption>, changes in file detach

Nicolas Lascombes authored on 24/06/2019 13:38:15
Showing 2 changed files
... ...
@@ -2,6 +2,7 @@
2 2
 
3 3
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
4 4
 <?xml-stylesheet type="text/css" href="chrome://messenger/skin/preferences/preferences.css"?>
5
+<?xml-stylesheet type="text/css" href="chrome://messenger/skin/messenger.css"?>
5 6
 <?xml-stylesheet href="chrome://messenger/content/bindings.css" type="text/css"?>
6 7
 
7 8
 <?xml-stylesheet href="chrome://bm/skin/style.css" type="text/css"?>
... ...
@@ -14,7 +15,9 @@
14 15
             title="&bm.preferences.tab.label;"
15 16
             onload="gBMPreferences.init();">
16 17
         <groupbox>
17
-            <caption label="&bm.preferences.server.label;"/>
18
+            <hbox class="groupbox-title">
19
+                <label class="header" value="&bm.preferences.server.label;"/>
20
+            </hbox>
18 21
             <hbox align="center">
19 22
                 <label value="&bm.preferences.server.address.label;"/>
20 23
                 <textbox id="bmserver" flex="1" class="uri-element"/>
... ...
@@ -22,7 +25,9 @@
22 25
             </hbox>
23 26
         </groupbox>
24 27
         <groupbox>
25
-            <caption label="&bm.preferences.calendar.label;"/>
28
+            <hbox class="groupbox-title">
29
+                <label class="header" value="&bm.preferences.calendar.label;"/>
30
+            </hbox>
26 31
             <hbox align="center">
27 32
                 <label value="&bm.preferences.calendar.calendar.label;"/>
28 33
                 <spacer flex="1"/>
... ...
@@ -30,7 +35,9 @@
30 35
             </hbox>
31 36
         </groupbox>
32 37
         <groupbox>
33
-            <caption label="&bm.preferences.im.label;"/>
38
+            <hbox class="groupbox-title">
39
+                <label class="header" value="&bm.preferences.im.label;"/>
40
+            </hbox>
34 41
             <hbox align="center">
35 42
                 <label value="&bm.preferences.im.add.label;"/>
36 43
                 <spacer flex="1"/>
... ...
@@ -38,7 +45,9 @@
38 45
             </hbox>
39 46
         </groupbox>
40 47
         <groupbox>
41
-            <caption label="&bm.preferences.mail.label;"/>
48
+            <hbox class="groupbox-title">
49
+                <label class="header" value="&bm.preferences.mail.label;"/>
50
+            </hbox>
42 51
             <hbox align="center">
43 52
                 <label value="&bm.preferences.mail.vacation.label;"/>
44 53
                 <spacer flex="1"/>
... ...
@@ -46,7 +55,9 @@
46 55
             </hbox>
47 56
         </groupbox>
48 57
         <groupbox>
49
-            <caption label="&bm.preferences.log.label;"/>
58
+            <hbox class="groupbox-title">
59
+                <label class="header" value="&bm.preferences.log.label;"/>
60
+            </hbox>
50 61
             <hbox align="center">
51 62
                 <checkbox id="bm-checkbox-debug"
52 63
                      label="&bm.preferences.log.pref.label;"
... ...
@@ -99,6 +99,11 @@ bmFileProvider.prototype = {
99 99
         return true;
100 100
     },
101 101
     
102
+     // for TB >= 68
103
+    getPreviousUploads: function() {
104
+        return [];
105
+    },
106
+
102 107
     /**
103 108
      * upload the file to the cloud provider. The callback's OnStopRequest
104 109
      * method will be called when finished, with success or an error code.
... ...
@@ -119,20 +124,24 @@ bmFileProvider.prototype = {
119 124
                 throw Cr.NS_ERROR_FAILURE;
120 125
             }
121 126
         }
127
+        let self = this;
122 128
         if (!aCallback) {
123 129
             let wrapper = function(aFile) {
124 130
                 return new Promise(function(resolve, reject) {
125
-                    this._uploadFile(aFile, {
131
+                    self._uploadFile(aFile, {
126 132
                         onStartRequest: function() {},
127 133
                         onStopRequest: function(p, ctx, cr) {
128 134
                             if (!Components.isSuccessCode(cr)) {
129 135
                                 throw cr;
130 136
                             }
131
-                            resolve({});
137
+                            let upload = {
138
+                                url: self._urlsForFiles[aFile.path]
139
+                            }
140
+                            resolve(upload);
132 141
                         }
133 142
                     });
134
-                }.bind(this));
135
-            }.bind(this);
143
+                });
144
+            };
136 145
             async function asyncUpload(aFile) {
137 146
                 return await wrapper(aFile);
138 147
             }