2881 +#endif |
2881 +#endif |
2882 diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/unix/nsKDERegistry.cpp |
2882 diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/unix/nsKDERegistry.cpp |
2883 new file mode 100644 |
2883 new file mode 100644 |
2884 --- /dev/null |
2884 --- /dev/null |
2885 +++ b/uriloader/exthandler/unix/nsKDERegistry.cpp |
2885 +++ b/uriloader/exthandler/unix/nsKDERegistry.cpp |
2886 @@ -0,0 +1,88 @@ |
2886 @@ -0,0 +1,87 @@ |
2887 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2887 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2888 +/* This Source Code Form is subject to the terms of the Mozilla Public |
2888 +/* This Source Code Form is subject to the terms of the Mozilla Public |
2889 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
2889 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
2890 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
2890 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
2891 + |
2891 + |
2892 +#include "nsKDERegistry.h" |
2892 +#include "nsKDERegistry.h" |
2893 +#include "prlink.h" |
2893 +#include "prlink.h" |
2894 +#include "prmem.h" |
2894 +#include "prmem.h" |
2895 +#include "nsString.h" |
2895 +#include "nsString.h" |
2896 +#include "nsILocalFile.h" |
|
2897 +#include "nsMIMEInfoUnix.h" |
2896 +#include "nsMIMEInfoUnix.h" |
2898 +#include "nsAutoPtr.h" |
2897 +#include "nsAutoPtr.h" |
2899 +#include "nsKDEUtils.h" |
2898 +#include "nsKDEUtils.h" |
2900 + |
2899 + |
2901 +/* static */ bool |
2900 +/* static */ bool |
2987 +#include "nsIURI.h" |
2986 +#include "nsIURI.h" |
2988 +#include "nsCOMPtr.h" |
2987 +#include "nsCOMPtr.h" |
2989 +#include "nsTArray.h" |
2988 +#include "nsTArray.h" |
2990 + |
2989 + |
2991 +class nsMIMEInfoBase; |
2990 +class nsMIMEInfoBase; |
2992 +class nsAutoCString; |
2991 +//class nsAutoCString; |
2993 +class nsCString; |
2992 +//class nsCString; |
2994 + |
2993 + |
2995 +class nsKDERegistry |
2994 +class nsKDERegistry |
2996 +{ |
2995 +{ |
2997 + public: |
2996 + public: |
2998 + static bool HandlerExists(const char *aProtocolScheme); |
2997 + static bool HandlerExists(const char *aProtocolScheme); |
3352 + NS_ENSURE_ARG_POINTER(aReturn); |
3351 + NS_ENSURE_ARG_POINTER(aReturn); |
3353 + |
3352 + |
3354 + if( mMode == modeOpen && mFilters.Length() == 1 && mFilters[ 0 ].EqualsLiteral( "..apps" )) |
3353 + if( mMode == modeOpen && mFilters.Length() == 1 && mFilters[ 0 ].EqualsLiteral( "..apps" )) |
3355 + return kdeAppsDialog( aReturn ); |
3354 + return kdeAppsDialog( aReturn ); |
3356 + |
3355 + |
3357 + nsXPIDLCString title; |
3356 + nsCString title; |
3358 + title.Adopt(ToNewUTF8String(mTitle)); |
3357 + title.Adopt(ToNewUTF8String(mTitle)); |
3359 + |
3358 + |
3360 + const char* arg = NULL; |
3359 + const char* arg = NULL; |
3361 + if( mAllowURLs ) |
3360 + if( mAllowURLs ) |
3362 + { |
3361 + { |
3519 + |
3518 + |
3520 +NS_IMETHODIMP nsFilePicker::kdeAppsDialog(PRInt16 *aReturn) |
3519 +NS_IMETHODIMP nsFilePicker::kdeAppsDialog(PRInt16 *aReturn) |
3521 + { |
3520 + { |
3522 + NS_ENSURE_ARG_POINTER(aReturn); |
3521 + NS_ENSURE_ARG_POINTER(aReturn); |
3523 + |
3522 + |
3524 + nsXPIDLCString title; |
3523 + nsCString title; |
3525 + title.Adopt(ToNewUTF8String(mTitle)); |
3524 + title.Adopt(ToNewUTF8String(mTitle)); |
3526 + |
3525 + |
3527 + nsTArray<nsCString> command; |
3526 + nsTArray<nsCString> command; |
3528 + command.AppendElement( NS_LITERAL_CSTRING( "APPSDIALOG" )); |
3527 + command.AppendElement( NS_LITERAL_CSTRING( "APPSDIALOG" )); |
3529 + command.AppendElement( title ); |
3528 + command.AppendElement( title ); |