1 # HG changeset patch |
1 # HG changeset patch |
2 # Parent d7a4d772ba2afb3ac43e2f2f234ffa55bcf50e70 |
2 # Parent 8671b358718cb8898a55fada20fc9999408daefe |
3 Description: Add KDE integration to Firefox (toolkit parts) |
3 Description: Add KDE integration to Firefox (toolkit parts) |
4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
4 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
5 Author: Lubos Lunak <lunak@suse.com> |
5 Author: Lubos Lunak <lunak@suse.com> |
6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
6 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
7 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
7 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
8 |
8 |
9 diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp |
9 diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp |
10 --- a/modules/libpref/Preferences.cpp |
10 --- a/modules/libpref/Preferences.cpp |
11 +++ b/modules/libpref/Preferences.cpp |
11 +++ b/modules/libpref/Preferences.cpp |
12 @@ -76,16 +76,17 @@ |
12 @@ -77,16 +77,17 @@ |
13 #include "nsXPCOMCID.h" |
13 #include "nsXPCOMCID.h" |
14 #include "nsXPCOM.h" |
14 #include "nsXPCOM.h" |
15 #include "nsXULAppAPI.h" |
15 #include "nsXULAppAPI.h" |
16 #include "nsZipArchive.h" |
16 #include "nsZipArchive.h" |
17 #include "plbase64.h" |
17 #include "plbase64.h" |
25 #endif |
25 #endif |
26 |
26 |
27 using namespace mozilla; |
27 using namespace mozilla; |
28 |
28 |
29 #ifdef DEBUG |
29 #ifdef DEBUG |
30 @@ -3868,25 +3869,37 @@ Preferences::InitInitialObjects() |
30 @@ -4201,25 +4202,37 @@ Preferences::InitInitialObjects(bool aIs |
31 // application pref files for backwards compatibility. |
31 // application pref files for backwards compatibility. |
32 static const char* specialFiles[] = { |
32 static const char* specialFiles[] = { |
33 #if defined(XP_MACOSX) |
33 #if defined(XP_MACOSX) |
34 "macprefs.js" |
34 "macprefs.js" |
35 #elif defined(XP_WIN) |
35 #elif defined(XP_WIN) |
63 NS_WARNING("Error parsing application default preferences."); |
63 NS_WARNING("Error parsing application default preferences."); |
64 } |
64 } |
65 |
65 |
66 // Load jar:$app/omni.jar!/defaults/preferences/*.js |
66 // Load jar:$app/omni.jar!/defaults/preferences/*.js |
67 // or jar:$gre/omni.jar!/defaults/preferences/*.js. |
67 // or jar:$gre/omni.jar!/defaults/preferences/*.js. |
68 @@ -3935,17 +3948,17 @@ Preferences::InitInitialObjects() |
68 @@ -4268,17 +4281,17 @@ Preferences::InitInitialObjects(bool aIs |
69 } |
69 } |
70 |
70 |
71 nsCOMPtr<nsIFile> path = do_QueryInterface(elem); |
71 nsCOMPtr<nsIFile> path = do_QueryInterface(elem); |
72 if (!path) { |
72 if (!path) { |
73 continue; |
73 continue; |
77 - pref_LoadPrefsInDir(path, nullptr, 0); |
77 - pref_LoadPrefsInDir(path, nullptr, 0); |
78 + pref_LoadPrefsInDir(path, specialFiles, ArrayLength(specialFiles)); |
78 + pref_LoadPrefsInDir(path, specialFiles, ArrayLength(specialFiles)); |
79 } |
79 } |
80 } |
80 } |
81 |
81 |
82 #ifdef MOZ_WIDGET_ANDROID |
82 if (XRE_IsParentProcess()) { |
83 // Set up the correct default for toolkit.telemetry.enabled. If this build |
83 SetupTelemetryPref(); |
84 // has MOZ_TELEMETRY_ON_BY_DEFAULT *or* we're on the beta channel, telemetry |
84 } |
85 // is on by default, otherwise not. This is necessary so that beta users who |
85 |
86 // are testing final release builds don't flipflop defaults. |
86 NS_CreateServicesFromCategory(NS_PREFSERVICE_APPDEFAULTS_TOPIC_ID, |
87 diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build |
87 diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build |
88 --- a/modules/libpref/moz.build |
88 --- a/modules/libpref/moz.build |
89 +++ b/modules/libpref/moz.build |
89 +++ b/modules/libpref/moz.build |
90 @@ -27,16 +27,20 @@ XPIDL_MODULE = 'pref' |
90 @@ -29,16 +29,20 @@ EXPORTS.mozilla += [ |
91 EXPORTS.mozilla += [ |
|
92 'Preferences.h', |
91 'Preferences.h', |
|
92 'StaticPrefs.h', |
93 ] |
93 ] |
94 |
94 |
95 UNIFIED_SOURCES += [ |
95 UNIFIED_SOURCES += [ |
96 'Preferences.cpp', |
96 'Preferences.cpp', |
97 ] |
97 ] |
169 with Files('**'): |
169 with Files('**'): |
170 BUG_COMPONENT = ('Toolkit', 'Download Manager') |
170 BUG_COMPONENT = ('Toolkit', 'Download Manager') |
171 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn |
171 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn |
172 --- a/toolkit/content/jar.mn |
172 --- a/toolkit/content/jar.mn |
173 +++ b/toolkit/content/jar.mn |
173 +++ b/toolkit/content/jar.mn |
174 @@ -69,16 +69,18 @@ toolkit.jar: |
174 @@ -68,16 +68,18 @@ toolkit.jar: |
175 content/global/bindings/checkbox.xml (widgets/checkbox.xml) |
175 content/global/bindings/checkbox.xml (widgets/checkbox.xml) |
176 content/global/bindings/colorpicker.xml (widgets/colorpicker.xml) |
176 content/global/bindings/colorpicker.xml (widgets/colorpicker.xml) |
177 content/global/bindings/datekeeper.js (widgets/datekeeper.js) |
177 content/global/bindings/datekeeper.js (widgets/datekeeper.js) |
178 content/global/bindings/datepicker.js (widgets/datepicker.js) |
178 content/global/bindings/datepicker.js (widgets/datepicker.js) |
179 content/global/bindings/datetimepopup.xml (widgets/datetimepopup.xml) |
179 content/global/bindings/datetimepopup.xml (widgets/datetimepopup.xml) |
181 content/global/bindings/datetimebox.css (widgets/datetimebox.css) |
181 content/global/bindings/datetimebox.css (widgets/datetimebox.css) |
182 * content/global/bindings/dialog.xml (widgets/dialog.xml) |
182 * content/global/bindings/dialog.xml (widgets/dialog.xml) |
183 +* content/global/bindings/dialog-kde.xml (widgets/dialog-kde.xml) |
183 +* content/global/bindings/dialog-kde.xml (widgets/dialog-kde.xml) |
184 +% override chrome://global/content/bindings/dialog.xml chrome://global/content/bindings/dialog-kde.xml desktop=kde |
184 +% override chrome://global/content/bindings/dialog.xml chrome://global/content/bindings/dialog-kde.xml desktop=kde |
185 content/global/bindings/editor.xml (widgets/editor.xml) |
185 content/global/bindings/editor.xml (widgets/editor.xml) |
186 content/global/bindings/filefield.xml (widgets/filefield.xml) |
|
187 * content/global/bindings/findbar.xml (widgets/findbar.xml) |
186 * content/global/bindings/findbar.xml (widgets/findbar.xml) |
188 content/global/bindings/general.xml (widgets/general.xml) |
187 content/global/bindings/general.xml (widgets/general.xml) |
189 content/global/bindings/groupbox.xml (widgets/groupbox.xml) |
188 content/global/bindings/groupbox.xml (widgets/groupbox.xml) |
190 content/global/bindings/listbox.xml (widgets/listbox.xml) |
189 content/global/bindings/listbox.xml (widgets/listbox.xml) |
191 content/global/bindings/menu.xml (widgets/menu.xml) |
190 content/global/bindings/menu.xml (widgets/menu.xml) |
192 content/global/bindings/menulist.xml (widgets/menulist.xml) |
191 content/global/bindings/menulist.xml (widgets/menulist.xml) |
|
192 content/global/bindings/notification.xml (widgets/notification.xml) |
193 diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml |
193 diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml |
194 new file mode 100644 |
194 new file mode 100644 |
195 --- /dev/null |
195 --- /dev/null |
196 +++ b/toolkit/content/widgets/dialog-kde.xml |
196 +++ b/toolkit/content/widgets/dialog-kde.xml |
197 @@ -0,0 +1,478 @@ |
197 @@ -0,0 +1,478 @@ |
674 + |
674 + |
675 +</bindings> |
675 +</bindings> |
676 diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js |
676 diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js |
677 --- a/toolkit/mozapps/downloads/nsHelperAppDlg.js |
677 --- a/toolkit/mozapps/downloads/nsHelperAppDlg.js |
678 +++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js |
678 +++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js |
679 @@ -627,17 +627,17 @@ nsUnknownContentTypeDialog.prototype = { |
679 @@ -1035,30 +1035,60 @@ nsUnknownContentTypeDialog.prototype = { |
680 else |
|
681 typeString = mimeInfo.MIMEType; |
|
682 } |
|
683 // When the length is unknown, contentLength would be -1 |
|
684 if (this.mLauncher.contentLength >= 0) { |
|
685 let [size, unit] = DownloadUtils. |
|
686 convertByteUnits(this.mLauncher.contentLength); |
|
687 type.value = this.dialogElement("strings") |
|
688 - .getFormattedString("orderedFileSizeWithType", |
|
689 + .getFormattedString("orderedFileSizeWithType", |
|
690 [typeString, size, unit]); |
|
691 } |
|
692 else { |
|
693 type.value = typeString; |
|
694 } |
|
695 }, |
|
696 |
|
697 // Returns true if opening the default application makes sense. |
|
698 @@ -801,17 +801,17 @@ nsUnknownContentTypeDialog.prototype = { |
|
699 switch (this.dialogElement("openHandler").selectedIndex) { |
|
700 case 0: |
|
701 // No app need be specified in this case. |
|
702 ok = true; |
|
703 break; |
|
704 case 1: |
|
705 // only enable the OK button if we have a default app to use or if |
|
706 // the user chose an app.... |
|
707 - ok = this.chosenApp || /\S/.test(this.dialogElement("otherHandler").getAttribute("path")); |
|
708 + ok = this.chosenApp || /\S/.test(this.dialogElement("otherHandler").getAttribute("path")); |
|
709 break; |
|
710 } |
|
711 } |
|
712 |
|
713 // Enable Ok button if ok to press. |
|
714 this.mDialog.document.documentElement.getButton("accept").disabled = !ok; |
|
715 }, |
|
716 |
|
717 @@ -1066,30 +1066,60 @@ nsUnknownContentTypeDialog.prototype = { |
|
718 |
680 |
719 if (params.handlerApp && |
681 if (params.handlerApp && |
720 params.handlerApp.executable && |
682 params.handlerApp.executable && |
721 params.handlerApp.executable.isFile()) { |
683 params.handlerApp.executable.isFile()) { |
722 // Remember the file they chose to run. |
684 // Remember the file they chose to run. |
1369 UNIFIED_SOURCES += [ |
1331 UNIFIED_SOURCES += [ |
1370 'android/nsAndroidHandlerApp.cpp', |
1332 'android/nsAndroidHandlerApp.cpp', |
1371 'android/nsExternalSharingAppService.cpp', |
1333 'android/nsExternalSharingAppService.cpp', |
1372 'android/nsExternalURLHandlerService.cpp', |
1334 'android/nsExternalURLHandlerService.cpp', |
1373 'android/nsMIMEInfoAndroid.cpp', |
1335 'android/nsMIMEInfoAndroid.cpp', |
1374 @@ -124,16 +126,17 @@ include('/ipc/chromium/chromium-config.m |
1336 @@ -122,16 +124,17 @@ include('/ipc/chromium/chromium-config.m |
1375 FINAL_LIBRARY = 'xul' |
1337 FINAL_LIBRARY = 'xul' |
1376 |
1338 |
1377 LOCAL_INCLUDES += [ |
1339 LOCAL_INCLUDES += [ |
1378 '/docshell/base', |
1340 '/docshell/base', |
1379 '/dom/base', |
1341 '/dom/base', |
1806 return gnomeInfo.forget(); |
1768 return gnomeInfo.forget(); |
1807 } |
1769 } |
1808 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build |
1770 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build |
1809 --- a/widget/gtk/moz.build |
1771 --- a/widget/gtk/moz.build |
1810 +++ b/widget/gtk/moz.build |
1772 +++ b/widget/gtk/moz.build |
1811 @@ -121,16 +121,17 @@ else: |
1773 @@ -122,16 +122,17 @@ else: |
1812 include('/ipc/chromium/chromium-config.mozbuild') |
1774 include('/ipc/chromium/chromium-config.mozbuild') |
1813 |
1775 |
1814 FINAL_LIBRARY = 'xul' |
1776 FINAL_LIBRARY = 'xul' |
1815 |
1777 |
1816 LOCAL_INCLUDES += [ |
1778 LOCAL_INCLUDES += [ |
2202 struct ManifestDirective |
2164 struct ManifestDirective |
2203 { |
2165 { |
2204 const char* directive; |
2166 const char* directive; |
2205 int argc; |
2167 int argc; |
2206 |
2168 |
2207 @@ -444,16 +445,17 @@ ParseManifest(NSLocationType aType, File |
2169 @@ -441,16 +442,17 @@ ParseManifest(NSLocationType aType, File |
2208 NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled"); |
2170 NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled"); |
2209 NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired"); |
2171 NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired"); |
2210 NS_NAMED_LITERAL_STRING(kApplication, "application"); |
2172 NS_NAMED_LITERAL_STRING(kApplication, "application"); |
2211 NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); |
2173 NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); |
2212 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
2174 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
2220 #endif |
2182 #endif |
2221 |
2183 |
2222 NS_NAMED_LITERAL_STRING(kMain, "main"); |
2184 NS_NAMED_LITERAL_STRING(kMain, "main"); |
2223 NS_NAMED_LITERAL_STRING(kContent, "content"); |
2185 NS_NAMED_LITERAL_STRING(kContent, "content"); |
2224 |
2186 |
2225 @@ -499,44 +501,49 @@ ParseManifest(NSLocationType aType, File |
2187 @@ -496,44 +498,49 @@ ParseManifest(NSLocationType aType, File |
2226 CopyUTF8toUTF16(s, abi); |
2188 CopyUTF8toUTF16(s, abi); |
2227 abi.Insert(char16_t('_'), 0); |
2189 abi.Insert(char16_t('_'), 0); |
2228 abi.Insert(osTarget, 0); |
2190 abi.Insert(osTarget, 0); |
2229 } |
2191 } |
2230 } |
2192 } |
2270 process = kContent; |
2232 process = kContent; |
2271 } else { |
2233 } else { |
2272 process = kMain; |
2234 process = kMain; |
2273 } |
2235 } |
2274 |
2236 |
2275 @@ -638,25 +645,27 @@ ParseManifest(NSLocationType aType, File |
2237 @@ -635,25 +642,27 @@ ParseManifest(NSLocationType aType, File |
2276 TriState stOsVersion = eUnspecified; |
2238 TriState stOsVersion = eUnspecified; |
2277 TriState stOs = eUnspecified; |
2239 TriState stOs = eUnspecified; |
2278 TriState stABI = eUnspecified; |
2240 TriState stABI = eUnspecified; |
2279 TriState stProcess = eUnspecified; |
2241 TriState stProcess = eUnspecified; |
2280 #if defined(MOZ_WIDGET_ANDROID) |
2242 #if defined(MOZ_WIDGET_ANDROID) |
2298 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) { |
2260 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, stGeckoVersion)) { |
2299 continue; |
2261 continue; |
2300 } |
2262 } |
2301 |
2263 |
2302 #if defined(MOZ_WIDGET_ANDROID) |
2264 #if defined(MOZ_WIDGET_ANDROID) |
2303 @@ -701,16 +710,17 @@ ParseManifest(NSLocationType aType, File |
2265 @@ -698,16 +707,17 @@ ParseManifest(NSLocationType aType, File |
2304 } |
2266 } |
2305 |
2267 |
2306 if (!ok || |
2268 if (!ok || |
2307 stApp == eBad || |
2269 stApp == eBad || |
2308 stAppVersion == eBad || |
2270 stAppVersion == eBad || |
2319 } |
2281 } |
2320 |
2282 |
2321 diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build |
2283 diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build |
2322 --- a/xpcom/components/moz.build |
2284 --- a/xpcom/components/moz.build |
2323 +++ b/xpcom/components/moz.build |
2285 +++ b/xpcom/components/moz.build |
2324 @@ -44,12 +44,13 @@ FINAL_LIBRARY = 'xul' |
2286 @@ -43,12 +43,13 @@ FINAL_LIBRARY = 'xul' |
|
2287 |
2325 LOCAL_INCLUDES += [ |
2288 LOCAL_INCLUDES += [ |
2326 '!..', |
2289 '!..', |
2327 '../base', |
2290 '../base', |
2328 '../build', |
2291 '../build', |
2329 '../ds', |
2292 '../ds', |
2330 '../reflect/xptinfo', |
|
2331 '/chrome', |
2293 '/chrome', |
2332 '/modules/libjar', |
2294 '/modules/libjar', |
2333 + '/toolkit/xre' |
2295 + '/toolkit/xre', |
2334 ] |
2296 ] |
2335 |
2297 |
2336 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: |
2298 if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: |
2337 CXXFLAGS += CONFIG['TK_CFLAGS'] |
2299 CXXFLAGS += CONFIG['TK_CFLAGS'] |
2338 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp |
2300 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp |