1 # HG changeset patch |
1 # HG changeset patch |
2 # User msirringhaus@suse.de |
2 # User msirringhaus@suse.de |
3 # Date 1559294891 -7200 |
3 # Date 1559294891 -7200 |
4 # Fri May 31 11:28:11 2019 +0200 |
4 # Fri May 31 11:28:11 2019 +0200 |
5 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 |
5 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 |
6 # Parent 53e325f006bd6a31f6f3d40ae248e4058897055a |
6 # Parent c8bc6be5267f16016d506973a2d6a7c58a1cd441 |
7 Description: Add KDE integration to Firefox (toolkit parts) |
7 Description: Add KDE integration to Firefox (toolkit parts) |
8 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
8 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
9 Author: Lubos Lunak <lunak@suse.com> |
9 Author: Lubos Lunak <lunak@suse.com> |
10 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
10 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
11 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
11 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
354 return result.forget().downcast<nsISupports>(); |
354 return result.forget().downcast<nsISupports>(); |
355 } |
355 } |
356 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build |
356 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build |
357 --- a/toolkit/xre/moz.build |
357 --- a/toolkit/xre/moz.build |
358 +++ b/toolkit/xre/moz.build |
358 +++ b/toolkit/xre/moz.build |
359 @@ -92,17 +92,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "co |
359 @@ -93,17 +93,19 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "co |
360 "../components/printingui", |
360 "../components/printingui", |
361 ] |
361 ] |
362 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": |
362 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": |
363 UNIFIED_SOURCES += [ |
363 UNIFIED_SOURCES += [ |
364 "nsNativeAppSupportDefault.cpp", |
364 "nsNativeAppSupportDefault.cpp", |
839 #endif |
839 #endif |
840 return IPC_OK(); |
840 return IPC_OK(); |
841 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build |
841 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build |
842 --- a/uriloader/exthandler/moz.build |
842 --- a/uriloader/exthandler/moz.build |
843 +++ b/uriloader/exthandler/moz.build |
843 +++ b/uriloader/exthandler/moz.build |
844 @@ -77,17 +77,19 @@ else: |
844 @@ -80,17 +80,19 @@ else: |
845 SOURCES += [ |
845 SOURCES += [ |
846 osdir + "/nsOSHelperAppService.cpp", |
846 osdir + "/nsOSHelperAppService.cpp", |
847 ] |
847 ] |
848 if CONFIG["CC_TYPE"] in ("clang", "gcc"): |
848 if CONFIG["CC_TYPE"] in ("clang", "gcc"): |
849 CXXFLAGS += ["-Wno-error=shadow"] |
849 CXXFLAGS += ["-Wno-error=shadow"] |
859 UNIFIED_SOURCES += [ |
859 UNIFIED_SOURCES += [ |
860 "android/nsMIMEInfoAndroid.cpp", |
860 "android/nsMIMEInfoAndroid.cpp", |
861 ] |
861 ] |
862 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": |
862 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": |
863 UNIFIED_SOURCES += [ |
863 UNIFIED_SOURCES += [ |
864 @@ -125,16 +127,17 @@ include("/ipc/chromium/chromium-config.m |
864 @@ -128,16 +130,17 @@ include("/ipc/chromium/chromium-config.m |
865 FINAL_LIBRARY = "xul" |
865 FINAL_LIBRARY = "xul" |
866 |
866 |
867 LOCAL_INCLUDES += [ |
867 LOCAL_INCLUDES += [ |
868 "/docshell/base", |
868 "/docshell/base", |
869 "/dom/base", |
869 "/dom/base", |
1204 #include "nsOSHelperAppService.h" |
1204 #include "nsOSHelperAppService.h" |
1205 #include "nsMIMEInfoUnix.h" |
1205 #include "nsMIMEInfoUnix.h" |
1206 #ifdef MOZ_WIDGET_GTK |
1206 #ifdef MOZ_WIDGET_GTK |
1207 -# include "nsGNOMERegistry.h" |
1207 -# include "nsGNOMERegistry.h" |
1208 +# include "nsCommonRegistry.h" |
1208 +# include "nsCommonRegistry.h" |
|
1209 # ifdef MOZ_BUILD_APP_IS_BROWSER |
|
1210 # include "nsIToolkitShellService.h" |
|
1211 # include "nsIGNOMEShellService.h" |
|
1212 # endif |
1209 #endif |
1213 #endif |
1210 #include "nsISupports.h" |
1214 #include "nsISupports.h" |
1211 #include "nsString.h" |
1215 #include "nsString.h" |
1212 #include "nsReadableUtils.h" |
1216 #include "nsReadableUtils.h" |
1213 #include "nsUnicharUtils.h" |
1217 @@ -1024,17 +1024,17 @@ nsresult nsOSHelperAppService::GetHandle |
1214 #include "nsIFileStreams.h" |
|
1215 #include "nsILineInputStream.h" |
|
1216 #include "nsIFile.h" |
|
1217 @@ -1020,17 +1020,17 @@ nsresult nsOSHelperAppService::GetHandle |
|
1218 |
1218 |
1219 nsresult nsOSHelperAppService::OSProtocolHandlerExists( |
1219 nsresult nsOSHelperAppService::OSProtocolHandlerExists( |
1220 const char* aProtocolScheme, bool* aHandlerExists) { |
1220 const char* aProtocolScheme, bool* aHandlerExists) { |
1221 nsresult rv = NS_OK; |
1221 nsresult rv = NS_OK; |
1222 |
1222 |
1231 } else { |
1231 } else { |
1232 *aHandlerExists = false; |
1232 *aHandlerExists = false; |
1233 nsCOMPtr<nsIHandlerService> handlerSvc = |
1233 nsCOMPtr<nsIHandlerService> handlerSvc = |
1234 do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv); |
1234 do_GetService(NS_HANDLERSERVICE_CONTRACTID, &rv); |
1235 if (NS_SUCCEEDED(rv) && handlerSvc) { |
1235 if (NS_SUCCEEDED(rv) && handlerSvc) { |
1236 @@ -1040,17 +1040,17 @@ nsresult nsOSHelperAppService::OSProtoco |
1236 @@ -1044,17 +1044,17 @@ nsresult nsOSHelperAppService::OSProtoco |
1237 } |
1237 } |
1238 |
1238 |
1239 return rv; |
1239 return rv; |
1240 } |
1240 } |
1241 |
1241 |
1250 #endif |
1250 #endif |
1251 } |
1251 } |
1252 |
1252 |
1253 NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol( |
1253 NS_IMETHODIMP nsOSHelperAppService::IsCurrentAppOSDefaultForProtocol( |
1254 const nsACString& aScheme, bool* _retval) { |
1254 const nsACString& aScheme, bool* _retval) { |
1255 @@ -1137,17 +1137,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1255 @@ -1147,17 +1147,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1256 nsresult rv = |
1256 nsresult rv = |
1257 LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
1257 LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
1258 minorType, mime_types_description, true); |
1258 minorType, mime_types_description, true); |
1259 |
1259 |
1260 if (NS_FAILED(rv) || majorType.IsEmpty()) { |
1260 if (NS_FAILED(rv) || majorType.IsEmpty()) { |
1269 } |
1269 } |
1270 #endif |
1270 #endif |
1271 |
1271 |
1272 rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
1272 rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), majorType, |
1273 minorType, mime_types_description, false); |
1273 minorType, mime_types_description, false); |
1274 @@ -1248,17 +1248,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1274 @@ -1258,17 +1258,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1275 |
1275 |
1276 // Now look up our extensions |
1276 // Now look up our extensions |
1277 nsAutoString extensions, mime_types_description; |
1277 nsAutoString extensions, mime_types_description; |
1278 LookUpExtensionsAndDescription(majorType, minorType, extensions, |
1278 LookUpExtensionsAndDescription(majorType, minorType, extensions, |
1279 mime_types_description); |
1279 mime_types_description); |
1291 NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?"); |
1291 NS_ASSERTION(!gnomeInfo->HasExtensions(), "How'd that happen?"); |
1292 gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions)); |
1292 gnomeInfo->SetFileExtensions(NS_ConvertUTF16toUTF8(extensions)); |
1293 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build |
1293 diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build |
1294 --- a/widget/gtk/moz.build |
1294 --- a/widget/gtk/moz.build |
1295 +++ b/widget/gtk/moz.build |
1295 +++ b/widget/gtk/moz.build |
1296 @@ -137,16 +137,17 @@ FINAL_LIBRARY = "xul" |
1296 @@ -136,16 +136,17 @@ FINAL_LIBRARY = "xul" |
1297 |
1297 |
1298 LOCAL_INCLUDES += [ |
1298 LOCAL_INCLUDES += [ |
1299 "/layout/base", |
1299 "/layout/base", |
1300 "/layout/forms", |
1300 "/layout/forms", |
1301 "/layout/generic", |
1301 "/layout/generic", |
1335 #include "nsMemory.h" |
1335 #include "nsMemory.h" |
1336 #include "nsEnumeratorUtils.h" |
1336 #include "nsEnumeratorUtils.h" |
1337 #include "nsNetUtil.h" |
1337 #include "nsNetUtil.h" |
1338 #include "nsReadableUtils.h" |
1338 #include "nsReadableUtils.h" |
1339 #include "MozContainer.h" |
1339 #include "MozContainer.h" |
1340 #include "gfxPlatformGtk.h" |
1340 #include "WidgetUtilsGtk.h" |
1341 |
1341 |
1342 #include "nsFilePicker.h" |
1342 #include "nsFilePicker.h" |
1343 +#include "nsKDEUtils.h" |
1343 +#include "nsKDEUtils.h" |
1344 +#include "nsURLHelper.h" |
1344 +#include "nsURLHelper.h" |
1345 |
1345 |
1346 using namespace mozilla; |
1346 #undef LOG |
1347 |
1347 #ifdef MOZ_LOGGING |
1348 #define MAX_PREVIEW_SIZE 180 |
1348 # include "mozilla/Logging.h" |
1349 // bug 1184009 |
1349 # include "nsTArray.h" |
1350 #define MAX_PREVIEW_SOURCE_SIZE 4096 |
1350 # include "Units.h" |
1351 |
1351 extern mozilla::LazyLogModule gWidgetLog; |
1352 nsIFile* nsFilePicker::mPrevDisplayDirectory = nullptr; |
1352 # define LOG(args) MOZ_LOG(gWidgetLog, mozilla::LogLevel::Debug, args) |
1353 @@ -231,17 +234,19 @@ nsFilePicker::AppendFilters(int32_t aFil |
1353 @@ -242,17 +245,19 @@ nsFilePicker::AppendFilters(int32_t aFil |
1354 mAllowURLs = !!(aFilterMask & filterAllowURLs); |
1354 mAllowURLs = !!(aFilterMask & filterAllowURLs); |
1355 return nsBaseFilePicker::AppendFilters(aFilterMask); |
1355 return nsBaseFilePicker::AppendFilters(aFilterMask); |
1356 } |
1356 } |
1357 |
1357 |
1358 NS_IMETHODIMP |
1358 NS_IMETHODIMP |
1369 CopyUTF16toUTF8(aFilter, filter); |
1369 CopyUTF16toUTF8(aFilter, filter); |
1370 CopyUTF16toUTF8(aTitle, name); |
1370 CopyUTF16toUTF8(aTitle, name); |
1371 |
1371 |
1372 mFilters.AppendElement(filter); |
1372 mFilters.AppendElement(filter); |
1373 mFilterNames.AppendElement(name); |
1373 mFilterNames.AppendElement(name); |
1374 @@ -341,16 +346,39 @@ nsresult nsFilePicker::Show(int16_t* aRe |
1374 @@ -352,16 +357,39 @@ nsresult nsFilePicker::Show(int16_t* aRe |
1375 return NS_OK; |
1375 return NS_OK; |
1376 } |
1376 } |
1377 |
1377 |
1378 NS_IMETHODIMP |
1378 NS_IMETHODIMP |
1379 nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { |
1379 nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { |
1409 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
1409 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
1410 |
1410 |
1411 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
1411 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
1412 |
1412 |
1413 const gchar* accept_button; |
1413 const gchar* accept_button; |
1414 @@ -570,16 +598,244 @@ void nsFilePicker::Done(void* file_choos |
1414 @@ -581,16 +609,244 @@ void nsFilePicker::Done(void* file_choos |
1415 mCallback->Done(result); |
1415 mCallback->Done(result); |
1416 mCallback = nullptr; |
1416 mCallback = nullptr; |
1417 } else { |
1417 } else { |
1418 mResult = result; |
1418 mResult = result; |
1419 } |
1419 } |