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 43647626f7204e312a4e38cac0414a461b06667f |
6 # Parent a22a4c4e41107a0809c33a83e9d14916738c5a82 |
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 |
155 self.base = base |
155 self.base = base |
156 self.flags = Flags(*flags) |
156 self.flags = Flags(*flags) |
157 diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build |
157 diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build |
158 --- a/toolkit/components/downloads/moz.build |
158 --- a/toolkit/components/downloads/moz.build |
159 +++ b/toolkit/components/downloads/moz.build |
159 +++ b/toolkit/components/downloads/moz.build |
160 @@ -46,10 +46,14 @@ XPCOM_MANIFESTS += [ |
160 @@ -45,10 +45,14 @@ XPCOM_MANIFESTS += [ |
161 |
161 |
162 if CONFIG['MOZ_PLACES']: |
162 if CONFIG['MOZ_PLACES']: |
163 EXTRA_JS_MODULES += [ |
163 EXTRA_JS_MODULES += [ |
164 'DownloadHistory.jsm', |
164 'DownloadHistory.jsm', |
165 ] |
165 ] |
300 |
300 |
301 NS_IMETHODIMP |
301 NS_IMETHODIMP |
302 nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { |
302 nsUnixSystemProxySettings::GetMainThreadOnly(bool* aMainThreadOnly) { |
303 // dbus prevents us from being threadsafe, but this routine should not block |
303 // dbus prevents us from being threadsafe, but this routine should not block |
304 // anyhow |
304 // anyhow |
305 @@ -384,21 +387,50 @@ nsresult nsUnixSystemProxySettings::GetP |
305 @@ -381,21 +384,50 @@ nsresult nsUnixSystemProxySettings::GetP |
306 return NS_OK; |
306 return NS_OK; |
307 } |
307 } |
308 |
308 |
309 nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, |
309 nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec, |
310 const nsACString& aScheme, |
310 const nsACString& aScheme, |
336 + { |
336 + { |
337 + url += ":"; |
337 + url += ":"; |
338 + url += nsPrintfCString("%d", aPort); |
338 + url += nsPrintfCString("%d", aPort); |
339 + } |
339 + } |
340 + nsTArray<nsCString> command; |
340 + nsTArray<nsCString> command; |
341 + command.AppendElement( NS_LITERAL_CSTRING( "GETPROXY" )); |
341 + command.AppendElement( "GETPROXY"_ns ); |
342 + command.AppendElement( url ); |
342 + command.AppendElement( url ); |
343 + nsTArray<nsCString> result; |
343 + nsTArray<nsCString> result; |
344 + if( !nsKDEUtils::command( command, &result ) || result.Length() != 1 ) |
344 + if( !nsKDEUtils::command( command, &result ) || result.Length() != 1 ) |
345 + return NS_ERROR_FAILURE; |
345 + return NS_ERROR_FAILURE; |
346 + aResult = result[0]; |
346 + aResult = result[0]; |
452 + } |
452 + } |
453 + |
453 + |
454 +static bool getKdeSupport() |
454 +static bool getKdeSupport() |
455 + { |
455 + { |
456 + nsTArray<nsCString> command; |
456 + nsTArray<nsCString> command; |
457 + command.AppendElement( NS_LITERAL_CSTRING( "CHECK" )); |
457 + command.AppendElement( "CHECK"_ns ); |
458 + command.AppendElement( NS_LITERAL_CSTRING( MAKE_STR( KMOZILLAHELPER_VERSION ))); |
458 + command.AppendElement( "KMOZILLAHELPER_VERSION"_ns ); |
459 + bool kde = nsKDEUtils::command( command ); |
459 + bool kde = nsKDEUtils::command( command ); |
460 +#ifdef DEBUG_KDE |
460 +#ifdef DEBUG_KDE |
461 + fprintf( stderr, "KDE RUNNING %d\n", kde ); |
461 + fprintf( stderr, "KDE RUNNING %d\n", kde ); |
462 +#endif |
462 +#endif |
463 + return kde; |
463 + return kde; |
989 + |
989 + |
990 +/* static */ bool |
990 +/* static */ bool |
991 +nsKDERegistry::HandlerExists(const char *aProtocolScheme) |
991 +nsKDERegistry::HandlerExists(const char *aProtocolScheme) |
992 +{ |
992 +{ |
993 + nsTArray<nsCString> command; |
993 + nsTArray<nsCString> command; |
994 + command.AppendElement( NS_LITERAL_CSTRING( "HANDLEREXISTS" )); |
994 + command.AppendElement( "HANDLEREXISTS"_ns ); |
995 + command.AppendElement( nsAutoCString( aProtocolScheme )); |
995 + command.AppendElement( nsAutoCString( aProtocolScheme )); |
996 + return nsKDEUtils::command( command ); |
996 + return nsKDEUtils::command( command ); |
997 +} |
997 +} |
998 + |
998 + |
999 +/* static */ nsresult |
999 +/* static */ nsresult |
1000 +nsKDERegistry::LoadURL(nsIURI *aURL) |
1000 +nsKDERegistry::LoadURL(nsIURI *aURL) |
1001 +{ |
1001 +{ |
1002 + nsTArray<nsCString> command; |
1002 + nsTArray<nsCString> command; |
1003 + command.AppendElement( NS_LITERAL_CSTRING( "OPEN" )); |
1003 + command.AppendElement( "OPEN"_ns ); |
1004 + nsCString url; |
1004 + nsCString url; |
1005 + aURL->GetSpec( url ); |
1005 + aURL->GetSpec( url ); |
1006 + command.AppendElement( url ); |
1006 + command.AppendElement( url ); |
1007 + bool rv = nsKDEUtils::command( command ); |
1007 + bool rv = nsKDEUtils::command( command ); |
1008 + if (!rv) |
1008 + if (!rv) |
1014 +/* static */ void |
1014 +/* static */ void |
1015 +nsKDERegistry::GetAppDescForScheme(const nsACString& aScheme, |
1015 +nsKDERegistry::GetAppDescForScheme(const nsACString& aScheme, |
1016 + nsAString& aDesc) |
1016 + nsAString& aDesc) |
1017 +{ |
1017 +{ |
1018 + nsTArray<nsCString> command; |
1018 + nsTArray<nsCString> command; |
1019 + command.AppendElement( NS_LITERAL_CSTRING( "GETAPPDESCFORSCHEME" )); |
1019 + command.AppendElement( "GETAPPDESCFORSCHEME"_ns ); |
1020 + command.AppendElement( aScheme ); |
1020 + command.AppendElement( aScheme ); |
1021 + nsTArray<nsCString> output; |
1021 + nsTArray<nsCString> output; |
1022 + if( nsKDEUtils::command( command, &output ) && output.Length() == 1 ) |
1022 + if( nsKDEUtils::command( command, &output ) && output.Length() == 1 ) |
1023 + CopyUTF8toUTF16( output[ 0 ], aDesc ); |
1023 + CopyUTF8toUTF16( output[ 0 ], aDesc ); |
1024 +} |
1024 +} |
1027 +/* static */ already_AddRefed<nsMIMEInfoBase> |
1027 +/* static */ already_AddRefed<nsMIMEInfoBase> |
1028 +nsKDERegistry::GetFromExtension(const nsACString& aFileExt) |
1028 +nsKDERegistry::GetFromExtension(const nsACString& aFileExt) |
1029 +{ |
1029 +{ |
1030 + NS_ASSERTION(aFileExt[0] != '.', "aFileExt shouldn't start with a dot"); |
1030 + NS_ASSERTION(aFileExt[0] != '.', "aFileExt shouldn't start with a dot"); |
1031 + nsTArray<nsCString> command; |
1031 + nsTArray<nsCString> command; |
1032 + command.AppendElement( NS_LITERAL_CSTRING( "GETFROMEXTENSION" )); |
1032 + command.AppendElement( "GETFROMEXTENSION"_ns ); |
1033 + command.AppendElement( aFileExt ); |
1033 + command.AppendElement( aFileExt ); |
1034 + return GetFromHelper( command ); |
1034 + return GetFromHelper( command ); |
1035 +} |
1035 +} |
1036 + |
1036 + |
1037 +/* static */ already_AddRefed<nsMIMEInfoBase> |
1037 +/* static */ already_AddRefed<nsMIMEInfoBase> |
1038 +nsKDERegistry::GetFromType(const nsACString& aMIMEType) |
1038 +nsKDERegistry::GetFromType(const nsACString& aMIMEType) |
1039 +{ |
1039 +{ |
1040 + nsTArray<nsCString> command; |
1040 + nsTArray<nsCString> command; |
1041 + command.AppendElement( NS_LITERAL_CSTRING( "GETFROMTYPE" )); |
1041 + command.AppendElement( "GETFROMTYPE"_ns ); |
1042 + command.AppendElement( aMIMEType ); |
1042 + command.AppendElement( aMIMEType ); |
1043 + return GetFromHelper( command ); |
1043 + return GetFromHelper( command ); |
1044 +} |
1044 +} |
1045 + |
1045 + |
1046 +/* static */ already_AddRefed<nsMIMEInfoBase> |
1046 +/* static */ already_AddRefed<nsMIMEInfoBase> |
1169 |
1169 |
1170 + if( nsKDEUtils::kdeSupport()) { |
1170 + if( nsKDEUtils::kdeSupport()) { |
1171 + bool supports; |
1171 + bool supports; |
1172 + if( NS_SUCCEEDED( GetHasDefaultHandler( &supports )) && supports ) { |
1172 + if( NS_SUCCEEDED( GetHasDefaultHandler( &supports )) && supports ) { |
1173 + nsTArray<nsCString> command; |
1173 + nsTArray<nsCString> command; |
1174 + command.AppendElement( NS_LITERAL_CSTRING( "OPEN" )); |
1174 + command.AppendElement( "OPEN"_ns ); |
1175 + command.AppendElement( nativePath ); |
1175 + command.AppendElement( nativePath ); |
1176 + command.AppendElement( NS_LITERAL_CSTRING( "MIMETYPE" )); |
1176 + command.AppendElement( "MIMETYPE"_ns ); |
1177 + command.AppendElement( mSchemeOrType ); |
1177 + command.AppendElement( mSchemeOrType ); |
1178 + if( nsKDEUtils::command( command )) |
1178 + if( nsKDEUtils::command( command )) |
1179 + return NS_OK; |
1179 + return NS_OK; |
1180 + } |
1180 + } |
1181 + if (!mDefaultApplication) |
1181 + if (!mDefaultApplication) |
1212 #include "nsReadableUtils.h" |
1212 #include "nsReadableUtils.h" |
1213 #include "nsUnicharUtils.h" |
1213 #include "nsUnicharUtils.h" |
1214 #include "nsIFileStreams.h" |
1214 #include "nsIFileStreams.h" |
1215 #include "nsILineInputStream.h" |
1215 #include "nsILineInputStream.h" |
1216 #include "nsIFile.h" |
1216 #include "nsIFile.h" |
1217 @@ -1022,17 +1022,17 @@ nsresult nsOSHelperAppService::GetHandle |
1217 @@ -1019,17 +1019,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 |
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 @@ -1139,17 +1139,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1255 @@ -1136,17 +1136,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 @@ -1251,17 +1251,17 @@ already_AddRefed<nsMIMEInfoBase> nsOSHel |
1274 @@ -1247,17 +1247,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); |
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 @@ -133,16 +133,17 @@ include('/ipc/chromium/chromium-config.m |
1296 @@ -133,16 +133,17 @@ include('/ipc/chromium/chromium-config.m |
1297 |
|
1298 FINAL_LIBRARY = 'xul' |
1297 FINAL_LIBRARY = 'xul' |
1299 |
1298 |
1300 LOCAL_INCLUDES += [ |
1299 LOCAL_INCLUDES += [ |
1301 '/layout/base', |
1300 '/layout/base', |
1302 '/layout/generic', |
1301 '/layout/generic', |
1303 '/layout/xul', |
1302 '/layout/xul', |
1304 '/other-licenses/atk-1.0', |
1303 '/other-licenses/atk-1.0', |
|
1304 '/third_party/cups/include', |
1305 + '/toolkit/xre', |
1305 + '/toolkit/xre', |
1306 '/widget', |
1306 '/widget', |
1307 '/widget/headless', |
1307 '/widget/headless', |
1308 ] |
1308 ] |
1309 |
1309 |
1532 + selected.AppendInt( mSelectedType ); |
1532 + selected.AppendInt( mSelectedType ); |
1533 + command.AppendElement( selected ); |
1533 + command.AppendElement( selected ); |
1534 + } |
1534 + } |
1535 + command.AppendElement( title ); |
1535 + command.AppendElement( title ); |
1536 + if( mMode == nsIFilePicker::modeOpenMultiple ) |
1536 + if( mMode == nsIFilePicker::modeOpenMultiple ) |
1537 + command.AppendElement( NS_LITERAL_CSTRING( "MULTIPLE" )); |
1537 + command.AppendElement( "MULTIPLE"_ns ); |
1538 + if( PRInt32 xid = windowToXid( mParentWidget )) |
1538 + if( PRInt32 xid = windowToXid( mParentWidget )) |
1539 + { |
1539 + { |
1540 + command.AppendElement( NS_LITERAL_CSTRING( "PARENT" )); |
1540 + command.AppendElement( "PARENT"_ns ); |
1541 + nsAutoCString parent; |
1541 + nsAutoCString parent; |
1542 + parent.AppendInt( xid ); |
1542 + parent.AppendInt( xid ); |
1543 + command.AppendElement( parent ); |
1543 + command.AppendElement( parent ); |
1544 + } |
1544 + } |
1545 + |
1545 + |
1623 + |
1623 + |
1624 + nsCString title; |
1624 + nsCString title; |
1625 + title.Adopt(ToNewUTF8String(mTitle)); |
1625 + title.Adopt(ToNewUTF8String(mTitle)); |
1626 + |
1626 + |
1627 + nsTArray<nsCString> command; |
1627 + nsTArray<nsCString> command; |
1628 + command.AppendElement( NS_LITERAL_CSTRING( "APPSDIALOG" )); |
1628 + command.AppendElement( "APPSDIALOG"_ns ); |
1629 + command.AppendElement( title ); |
1629 + command.AppendElement( title ); |
1630 + if( PRInt32 xid = windowToXid( mParentWidget )) |
1630 + if( PRInt32 xid = windowToXid( mParentWidget )) |
1631 + { |
1631 + { |
1632 + command.AppendElement( NS_LITERAL_CSTRING( "PARENT" )); |
1632 + command.AppendElement( "PARENT"_ns ); |
1633 + nsAutoCString parent; |
1633 + nsAutoCString parent; |
1634 + parent.AppendInt( xid ); |
1634 + parent.AppendInt( xid ); |
1635 + command.AppendElement( parent ); |
1635 + command.AppendElement( parent ); |
1636 + } |
1636 + } |
1637 + |
1637 + |
1701 struct ManifestDirective { |
1701 struct ManifestDirective { |
1702 const char* directive; |
1702 const char* directive; |
1703 int argc; |
1703 int argc; |
1704 |
1704 |
1705 bool ischrome; |
1705 bool ischrome; |
1706 @@ -394,16 +395,17 @@ void ParseManifest(NSLocationType aType, |
1706 @@ -393,16 +394,17 @@ void ParseManifest(NSLocationType aType, |
1707 NS_NAMED_LITERAL_STRING(kRemoteEnabled, "remoteenabled"); |
1707 constexpr auto kRemoteEnabled = u"remoteenabled"_ns; |
1708 NS_NAMED_LITERAL_STRING(kRemoteRequired, "remoterequired"); |
1708 constexpr auto kRemoteRequired = u"remoterequired"_ns; |
1709 NS_NAMED_LITERAL_STRING(kApplication, "application"); |
1709 constexpr auto kApplication = u"application"_ns; |
1710 NS_NAMED_LITERAL_STRING(kAppVersion, "appversion"); |
1710 constexpr auto kAppVersion = u"appversion"_ns; |
1711 NS_NAMED_LITERAL_STRING(kGeckoVersion, "platformversion"); |
1711 constexpr auto kGeckoVersion = u"platformversion"_ns; |
1712 NS_NAMED_LITERAL_STRING(kOs, "os"); |
1712 constexpr auto kOs = u"os"_ns; |
1713 NS_NAMED_LITERAL_STRING(kOsVersion, "osversion"); |
1713 constexpr auto kOsVersion = u"osversion"_ns; |
1714 NS_NAMED_LITERAL_STRING(kABI, "abi"); |
1714 constexpr auto kABI = u"abi"_ns; |
1715 + NS_NAMED_LITERAL_STRING(kDesktop, "desktop"); |
1715 + constexpr auto kDesktop = u"desktop"_ns; |
1716 NS_NAMED_LITERAL_STRING(kProcess, "process"); |
1716 constexpr auto kProcess = u"process"_ns; |
1717 #if defined(MOZ_WIDGET_ANDROID) |
1717 #if defined(MOZ_WIDGET_ANDROID) |
1718 NS_NAMED_LITERAL_STRING(kTablet, "tablet"); |
1718 constexpr auto kTablet = u"tablet"_ns; |
1719 #endif |
1719 #endif |
1720 |
1720 |
1721 NS_NAMED_LITERAL_STRING(kMain, "main"); |
1721 constexpr auto kMain = u"main"_ns; |
1722 NS_NAMED_LITERAL_STRING(kContent, "content"); |
1722 constexpr auto kContent = u"content"_ns; |
1723 |
1723 |
1724 @@ -449,39 +451,44 @@ void ParseManifest(NSLocationType aType, |
1724 @@ -448,39 +450,44 @@ void ParseManifest(NSLocationType aType, |
1725 CopyUTF8toUTF16(s, abi); |
1725 CopyUTF8toUTF16(s, abi); |
1726 abi.Insert(char16_t('_'), 0); |
1726 abi.Insert(char16_t('_'), 0); |
1727 abi.Insert(osTarget, 0); |
1727 abi.Insert(osTarget, 0); |
1728 } |
1728 } |
1729 } |
1729 } |
1737 OSVERSIONINFO info = {sizeof(OSVERSIONINFO)}; |
1737 OSVERSIONINFO info = {sizeof(OSVERSIONINFO)}; |
1738 if (GetVersionEx(&info)) { |
1738 if (GetVersionEx(&info)) { |
1739 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion, |
1739 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion, |
1740 info.dwMinorVersion); |
1740 info.dwMinorVersion); |
1741 } |
1741 } |
1742 + desktop = NS_LITERAL_STRING("win"); |
1742 + desktop = u"win"_ns; |
1743 # pragma warning(pop) |
1743 # pragma warning(pop) |
1744 #elif defined(MOZ_WIDGET_COCOA) |
1744 #elif defined(MOZ_WIDGET_COCOA) |
1745 SInt32 majorVersion = nsCocoaFeatures::macOSVersionMajor(); |
1745 SInt32 majorVersion = nsCocoaFeatures::macOSVersionMajor(); |
1746 SInt32 minorVersion = nsCocoaFeatures::macOSVersionMinor(); |
1746 SInt32 minorVersion = nsCocoaFeatures::macOSVersionMinor(); |
1747 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", majorVersion, minorVersion); |
1747 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", majorVersion, minorVersion); |
1748 + desktop = NS_LITERAL_STRING("macosx"); |
1748 + desktop = u"macosx"_ns); |
1749 #elif defined(MOZ_WIDGET_GTK) |
1749 #elif defined(MOZ_WIDGET_GTK) |
1750 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", gtk_major_version, |
1750 nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", gtk_major_version, |
1751 gtk_minor_version); |
1751 gtk_minor_version); |
1752 + desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); |
1752 + desktop = nsKDEUtils::kdeSession() ? u"kde"_ns : u"gnome"_ns; |
1753 #elif defined(MOZ_WIDGET_ANDROID) |
1753 #elif defined(MOZ_WIDGET_ANDROID) |
1754 bool isTablet = false; |
1754 bool isTablet = false; |
1755 if (mozilla::AndroidBridge::Bridge()) { |
1755 if (mozilla::AndroidBridge::Bridge()) { |
1756 mozilla::AndroidBridge::Bridge()->GetStaticStringField( |
1756 mozilla::AndroidBridge::Bridge()->GetStaticStringField( |
1757 "android/os/Build$VERSION", "RELEASE", osVersion); |
1757 "android/os/Build$VERSION", "RELEASE", osVersion); |
1758 isTablet = java::GeckoAppShell::IsTablet(); |
1758 isTablet = java::GeckoAppShell::IsTablet(); |
1759 } |
1759 } |
1760 + desktop = NS_LITERAL_STRING("android"); |
1760 + desktop = u"android"_ns; |
1761 #endif |
1761 #endif |
1762 |
1762 |
1763 if (XRE_IsContentProcess()) { |
1763 if (XRE_IsContentProcess()) { |
1764 process = kContent; |
1764 process = kContent; |
1765 } else { |
1765 } else { |
1766 process = kMain; |
1766 process = kMain; |
1767 } |
1767 } |
1768 |
1768 |
1769 @@ -568,25 +575,27 @@ void ParseManifest(NSLocationType aType, |
1769 @@ -567,25 +574,27 @@ void ParseManifest(NSLocationType aType, |
1770 TriState stOsVersion = eUnspecified; |
1770 TriState stOsVersion = eUnspecified; |
1771 TriState stOs = eUnspecified; |
1771 TriState stOs = eUnspecified; |
1772 TriState stABI = eUnspecified; |
1772 TriState stABI = eUnspecified; |
1773 TriState stProcess = eUnspecified; |
1773 TriState stProcess = eUnspecified; |
1774 #if defined(MOZ_WIDGET_ANDROID) |
1774 #if defined(MOZ_WIDGET_ANDROID) |
1792 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, |
1792 CheckVersionFlag(kGeckoVersion, wtoken, geckoVersion, |
1793 stGeckoVersion)) { |
1793 stGeckoVersion)) { |
1794 continue; |
1794 continue; |
1795 } |
1795 } |
1796 |
1796 |
1797 @@ -623,17 +632,17 @@ void ParseManifest(NSLocationType aType, |
1797 @@ -622,17 +631,17 @@ void ParseManifest(NSLocationType aType, |
1798 } |
1798 } |
1799 |
1799 |
1800 LogMessageWithContext( |
1800 LogMessageWithContext( |
1801 aFile, line, "Unrecognized chrome manifest modifier '%s'.", token); |
1801 aFile, line, "Unrecognized chrome manifest modifier '%s'.", token); |
1802 ok = false; |
1802 ok = false; |
1925 } |
1925 } |
1926 |
1926 |
1927 #ifdef MOZ_WIDGET_GTK |
1927 #ifdef MOZ_WIDGET_GTK |
1928 + if( nsKDEUtils::kdeSupport()) { |
1928 + if( nsKDEUtils::kdeSupport()) { |
1929 + nsTArray<nsCString> command; |
1929 + nsTArray<nsCString> command; |
1930 + command.AppendElement( NS_LITERAL_CSTRING("OPEN") ); |
1930 + command.AppendElement( "OPEN"_ns ); |
1931 + command.AppendElement( mPath ); |
1931 + command.AppendElement( mPath ); |
1932 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
1932 + return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
1933 + } |
1933 + } |
1934 nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
1934 nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID); |
1935 if (!giovfs) { |
1935 if (!giovfs) { |