mozilla-kde.patch
changeset 541 830e50bbfc79
parent 538 be682f8c9361
child 546 2c9448fe783c
equal deleted inserted replaced
540:55fe9dc16b1f 541:830e50bbfc79
    43  #include "pldhash.h"
    43  #include "pldhash.h"
    44  
    44  
    45  #include "prefapi.h"
    45  #include "prefapi.h"
    46  #include "prefread.h"
    46  #include "prefread.h"
    47  #include "prefapi_private_data.h"
    47  #include "prefapi_private_data.h"
    48 @@ -907,16 +908,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    48 @@ -896,16 +897,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    49  
    49  
    50  static nsresult pref_LoadPrefsInDirList(const char *listId)
    50  static nsresult pref_LoadPrefsInDirList(const char *listId)
    51  {
    51  {
    52    nsresult rv;
    52    nsresult rv;
    53    nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
    53    nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
    78                getter_AddRefs(list));
    78                getter_AddRefs(list));
    79    if (!list)
    79    if (!list)
    80      return NS_OK;
    80      return NS_OK;
    81  
    81  
    82    bool hasMore;
    82    bool hasMore;
    83 @@ -932,17 +951,17 @@ static nsresult pref_LoadPrefsInDirList(
    83 @@ -921,17 +940,17 @@ static nsresult pref_LoadPrefsInDirList(
    84  
    84  
    85      nsCAutoString leaf;
    85      nsCAutoString leaf;
    86      path->GetNativeLeafName(leaf);
    86      path->GetNativeLeafName(leaf);
    87  
    87  
    88      // Do we care if a file provided by this process fails to load?
    88      // Do we care if a file provided by this process fails to load?
    89      if (Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi")))
    89      if (Substring(leaf, leaf.Length() - 4).Equals(NS_LITERAL_CSTRING(".xpi")))
    90        ReadExtensionPrefs(path);
    90        ReadExtensionPrefs(path);
    91      else
    91      else
    92 -      pref_LoadPrefsInDir(path, nsnull, 0);
    92 -      pref_LoadPrefsInDir(path, nullptr, 0);
    93 +      pref_LoadPrefsInDir(path, specialFiles, NS_ARRAY_LENGTH(specialFiles));
    93 +      pref_LoadPrefsInDir(path, specialFiles, NS_ARRAY_LENGTH(specialFiles));
    94    }
    94    }
    95    return NS_OK;
    95    return NS_OK;
    96  }
    96  }
    97  
    97  
    98  static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
    98  static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
    99  {
    99  {
   100    nsZipItemPtr<char> manifest(jarReader, name, true);
   100    nsZipItemPtr<char> manifest(jarReader, name, true);
   101    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
   101    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
   102 @@ -1036,28 +1055,40 @@ static nsresult pref_InitInitialObjects(
   102 @@ -1025,28 +1044,40 @@ static nsresult pref_InitInitialObjects(
   103    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
   103    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
   104    static const char* specialFiles[] = {
   104    static const char* specialFiles[] = {
   105  #if defined(XP_MACOSX)
   105  #if defined(XP_MACOSX)
   106      "macprefs.js"
   106      "macprefs.js"
   107  #elif defined(XP_WIN)
   107  #elif defined(XP_WIN)
   196 +          GetDisplayName( displayName );
   196 +          GetDisplayName( displayName );
   197 +          command.AppendElement( nsCAutoString( ToNewUTF8String( displayName )));
   197 +          command.AppendElement( nsCAutoString( ToNewUTF8String( displayName )));
   198 +          nsKDEUtils::command( command );
   198 +          nsKDEUtils::command( command );
   199 +        } else {
   199 +        } else {
   200 +        // begin non-KDE block
   200 +        // begin non-KDE block
   201          PRInt32 alertInterval = 2000;
   201          int32_t alertInterval = 2000;
   202          if (pref)
   202          if (pref)
   203            pref->GetIntPref(PREF_BDM_SHOWALERTINTERVAL, &alertInterval);
   203            pref->GetIntPref(PREF_BDM_SHOWALERTINTERVAL, &alertInterval);
   204  
   204  
   205          PRInt64 alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
   205          int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
   206          PRInt64 goat = PR_Now() - mStartTime;
   206          int64_t goat = PR_Now() - mStartTime;
   207          showTaskbarAlert = goat > alertIntervalUSec;
   207          showTaskbarAlert = goat > alertIntervalUSec;
   208  
   208  
   209 @@ -2266,19 +2279,20 @@ nsDownload::SetState(DownloadState aStat
   209 @@ -2266,19 +2279,20 @@ nsDownload::SetState(DownloadState aStat
   210                // If downloads are automatically removed per the user's
   210                // If downloads are automatically removed per the user's
   211                // retention policy, there's no reason to make the text clickable
   211                // retention policy, there's no reason to make the text clickable
  2066 +#    PrefWindow I   (June 4, 1999)
  2066 +#    PrefWindow I   (June 4, 1999)
  2067 +#
  2067 +#
  2068 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
  2068 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
  2069 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
  2069 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
  2070 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
  2070 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
  2071 @@ -12,16 +12,18 @@
  2071 @@ -13,16 +13,19 @@
  2072  #include "nsArrayUtils.h"
       
  2073  #include "prnetdb.h"
  2072  #include "prnetdb.h"
  2074  #include "prenv.h"
  2073  #include "prenv.h"
  2075  #include "nsPrintfCString.h"
  2074  #include "nsPrintfCString.h"
  2076  #include "nsNetUtil.h"
  2075  #include "nsNetUtil.h"
  2077  #include "nsISupportsPrimitives.h"
  2076  #include "nsISupportsPrimitives.h"
  2078  #include "nsIGSettingsService.h"
  2077  #include "nsIGSettingsService.h"
  2079  #include "nsInterfaceHashtable.h"
  2078  #include "nsInterfaceHashtable.h"
       
  2079  #include "mozilla/Attributes.h"
  2080 +#include "nsVoidArray.h"
  2080 +#include "nsVoidArray.h"
  2081 +#include "nsKDEUtils.h"
  2081 +#include "nsKDEUtils.h"
  2082  
  2082 +
  2083  class nsUnixSystemProxySettings : public nsISystemProxySettings {
  2083  
       
  2084  class nsUnixSystemProxySettings MOZ_FINAL : public nsISystemProxySettings {
  2084  public:
  2085  public:
  2085    NS_DECL_ISUPPORTS
  2086    NS_DECL_ISUPPORTS
  2086    NS_DECL_NSISYSTEMPROXYSETTINGS
  2087    NS_DECL_NSISYSTEMPROXYSETTINGS
  2087  
  2088  
  2088    nsUnixSystemProxySettings() {}
  2089    nsUnixSystemProxySettings() {}
  2089    nsresult Init();
  2090    nsresult Init();
  2090 @@ -33,16 +35,17 @@ private:
  2091 @@ -34,16 +37,17 @@ private:
  2091    nsCOMPtr<nsIGSettingsService> mGSettings;
  2092    nsCOMPtr<nsIGSettingsService> mGSettings;
  2092    nsCOMPtr<nsIGSettingsCollection> mProxySettings;
  2093    nsCOMPtr<nsIGSettingsCollection> mProxySettings;
  2093    nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> mSchemeProxySettings;
  2094    nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection> mSchemeProxySettings;
  2094    bool IsProxyMode(const char* aMode);
  2095    bool IsProxyMode(const char* aMode);
  2095    nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
  2096    nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType, nsACString& aResult);
  2096    nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
  2097    nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost, int32_t aPort, nsACString& aResult);
  2097    nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
  2098    nsresult GetProxyFromGSettings(const nsACString& aScheme, const nsACString& aHost, int32_t aPort, nsACString& aResult);
  2098    nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
  2099    nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType, nsACString& aResult);
  2099 +  nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
  2100 +  nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost, PRInt32 aPort, nsACString& aResult);
  2100  };
  2101  };
  2101  
  2102  
  2102  NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
  2103  NS_IMPL_ISUPPORTS1(nsUnixSystemProxySettings, nsISystemProxySettings)
  2103  
  2104  
  2104  nsresult
  2105  nsresult
  2105  nsUnixSystemProxySettings::Init()
  2106  nsUnixSystemProxySettings::Init()
  2106  {
  2107  {
  2107    // If this is a GNOME session, load gconf and try to use its preferences.
  2108    // If this is a GNOME session, load gconf and try to use its preferences.
  2108 @@ -495,16 +498,19 @@ nsUnixSystemProxySettings::GetProxyForUR
  2109 @@ -496,16 +500,19 @@ nsUnixSystemProxySettings::GetProxyForUR
  2109    nsCAutoString host;
  2110    nsCAutoString host;
  2110    rv = aURI->GetHost(host);
  2111    rv = aURI->GetHost(host);
  2111    NS_ENSURE_SUCCESS(rv, rv);
  2112    NS_ENSURE_SUCCESS(rv, rv);
  2112  
  2113  
  2113    PRInt32 port;
  2114    int32_t port;
  2114    rv = aURI->GetPort(&port);
  2115    rv = aURI->GetPort(&port);
  2115    NS_ENSURE_SUCCESS(rv, rv);
  2116    NS_ENSURE_SUCCESS(rv, rv);
  2116  
  2117  
  2117 +  if( nsKDEUtils::kdeSupport())
  2118 +  if( nsKDEUtils::kdeSupport())
  2118 +    return GetProxyFromKDE(scheme, host, port, aResult);
  2119 +    return GetProxyFromKDE(scheme, host, port, aResult);
  2123        return rv;
  2124        return rv;
  2124    }
  2125    }
  2125    if (mGConf)
  2126    if (mGConf)
  2126      return GetProxyFromGConf(scheme, host, port, aResult);
  2127      return GetProxyFromGConf(scheme, host, port, aResult);
  2127  
  2128  
  2128 @@ -530,8 +536,34 @@ static const mozilla::Module::ContractID
  2129 @@ -531,8 +538,34 @@ static const mozilla::Module::ContractID
  2129  
  2130  
  2130  static const mozilla::Module kUnixProxyModule = {
  2131  static const mozilla::Module kUnixProxyModule = {
  2131    mozilla::Module::kVersion,
  2132    mozilla::Module::kVersion,
  2132    kUnixProxyCIDs,
  2133    kUnixProxyCIDs,
  2133    kUnixProxyContracts
  2134    kUnixProxyContracts
  2934 +    nsTArray<nsCString> output;
  2935 +    nsTArray<nsCString> output;
  2935 +    if( nsKDEUtils::command( command, &output ) && output.Length() == 3 )
  2936 +    if( nsKDEUtils::command( command, &output ) && output.Length() == 3 )
  2936 +        {
  2937 +        {
  2937 +        nsCString mimetype = output[ 0 ];
  2938 +        nsCString mimetype = output[ 0 ];
  2938 +        nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix( mimetype );
  2939 +        nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix( mimetype );
  2939 +        NS_ENSURE_TRUE(mimeInfo, nsnull);
  2940 +        NS_ENSURE_TRUE(mimeInfo, nullptr);
  2940 +        nsCString description = output[ 1 ];
  2941 +        nsCString description = output[ 1 ];
  2941 +        mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description));
  2942 +        mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description));
  2942 +        nsCString handlerAppName = output[ 2 ];
  2943 +        nsCString handlerAppName = output[ 2 ];
  2943 +        mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName));
  2944 +        mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName));
  2944 +        mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault);
  2945 +        mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault);
  2945 +        nsMIMEInfoBase* retval;
  2946 +        nsMIMEInfoBase* retval;
  2946 +        NS_ADDREF((retval = mimeInfo));
  2947 +        NS_ADDREF((retval = mimeInfo));
  2947 +        return retval;
  2948 +        return retval;
  2948 +        }
  2949 +        }
  2949 +    return nsnull;
  2950 +    return nullptr;
  2950 +}
  2951 +}
  2951 diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/unix/nsKDERegistry.h
  2952 diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/unix/nsKDERegistry.h
  2952 new file mode 100644
  2953 new file mode 100644
  2953 --- /dev/null
  2954 --- /dev/null
  2954 +++ b/uriloader/exthandler/unix/nsKDERegistry.h
  2955 +++ b/uriloader/exthandler/unix/nsKDERegistry.h
  3047 -  nsresult rv = nsGNOMERegistry::LoadURL(aURI);
  3048 -  nsresult rv = nsGNOMERegistry::LoadURL(aURI);
  3048 +  nsresult rv = nsCommonRegistry::LoadURL(aURI);
  3049 +  nsresult rv = nsCommonRegistry::LoadURL(aURI);
  3049  
  3050  
  3050  #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS)
  3051  #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS)
  3051    if (NS_FAILED(rv)){
  3052    if (NS_FAILED(rv)){
  3052      HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nsnull);
  3053      HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nullptr);
  3053      if (action) {
  3054      if (action) {
  3054        nsCAutoString spec;
  3055        nsCAutoString spec;
  3055        aURI->GetAsciiSpec(spec);
  3056        aURI->GetAsciiSpec(spec);
  3056        if (hildon_uri_open(spec.get(), action, nsnull))
  3057        if (hildon_uri_open(spec.get(), action, nullptr))
  3057 @@ -61,22 +64,22 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI *
  3058 @@ -61,22 +64,22 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI *
  3058  
  3059  
  3059    return rv;
  3060    return rv;
  3060  }
  3061  }
  3061  
  3062  
  3205  
  3206  
  3206      rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt),
  3207      rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt),
  3207                                    majorType,
  3208                                    majorType,
  3208 @@ -1391,17 +1391,17 @@ nsOSHelperAppService::GetFromType(const 
  3209 @@ -1391,17 +1391,17 @@ nsOSHelperAppService::GetFromType(const 
  3209  #ifdef MOZ_WIDGET_GTK2
  3210  #ifdef MOZ_WIDGET_GTK2
  3210    nsMIMEInfoBase *gnomeInfo = nsnull;
  3211    nsMIMEInfoBase *gnomeInfo = nullptr;
  3211    if (handler.IsEmpty()) {
  3212    if (handler.IsEmpty()) {
  3212      // No useful data yet.  Check the GNOME registry.  Unfortunately, newer
  3213      // No useful data yet.  Check the GNOME registry.  Unfortunately, newer
  3213      // GNOME versions no longer have type-to-extension mappings, so we might
  3214      // GNOME versions no longer have type-to-extension mappings, so we might
  3214      // get back a MIMEInfo without any extensions set.  In that case we'll have
  3215      // get back a MIMEInfo without any extensions set.  In that case we'll have
  3215      // to look in our mime.types files for the extensions.    
  3216      // to look in our mime.types files for the extensions.    
  3279  #endif
  3280  #endif
  3280  
  3281  
  3281  using namespace mozilla;
  3282  using namespace mozilla;
  3282  
  3283  
  3283  #define MAX_PREVIEW_SIZE 180
  3284  #define MAX_PREVIEW_SIZE 180
  3284 @@ -252,17 +254,19 @@ nsFilePicker::AppendFilters(PRInt32 aFil
  3285 @@ -264,17 +266,19 @@ nsFilePicker::AppendFilters(int32_t aFil
  3285    return nsBaseFilePicker::AppendFilters(aFilterMask);
  3286    return nsBaseFilePicker::AppendFilters(aFilterMask);
  3286  }
  3287  }
  3287  
  3288  
  3288  NS_IMETHODIMP
  3289  NS_IMETHODIMP
  3289  nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter)
  3290  nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter)
  3300    CopyUTF16toUTF8(aFilter, filter);
  3301    CopyUTF16toUTF8(aFilter, filter);
  3301    CopyUTF16toUTF8(aTitle, name);
  3302    CopyUTF16toUTF8(aTitle, name);
  3302  
  3303  
  3303    mFilters.AppendElement(filter);
  3304    mFilters.AppendElement(filter);
  3304    mFilterNames.AppendElement(name);
  3305    mFilterNames.AppendElement(name);
  3305 @@ -357,16 +361,19 @@ nsFilePicker::GetFiles(nsISimpleEnumerat
  3306 @@ -369,16 +373,19 @@ nsFilePicker::GetFiles(nsISimpleEnumerat
  3306    return NS_ERROR_FAILURE;
  3307    return NS_ERROR_FAILURE;
  3307  }
  3308  }
  3308  
  3309  
  3309  NS_IMETHODIMP
  3310  NS_IMETHODIMP
  3310  nsFilePicker::Show(PRInt16 *aReturn)
  3311  nsFilePicker::Show(int16_t *aReturn)
  3311  {
  3312  {
  3312    NS_ENSURE_ARG_POINTER(aReturn);
  3313    NS_ENSURE_ARG_POINTER(aReturn);
  3313  
  3314  
  3314 +  if( nsKDEUtils::kdeSupport())
  3315 +  if( nsKDEUtils::kdeSupport())
  3315 +    return kdeFileDialog(aReturn);
  3316 +    return kdeFileDialog(aReturn);
  3316 +
  3317 +
  3317    nsXPIDLCString title;
  3318    nsresult rv = Open(nullptr);
  3318    title.Adopt(ToNewUTF8String(mTitle));
  3319    if (NS_FAILED(rv))
  3319  
  3320      return rv;
  3320    GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget);
  3321  
  3321  
  3322    while (mRunning) {
  3322    GtkFileChooserAction action = GetGtkFileChooserAction(mMode);
  3323      g_main_context_iteration(nullptr, TRUE);
  3323    const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE)
       
  3324                                 ? GTK_STOCK_SAVE : GTK_STOCK_OPEN;
       
  3325 @@ -505,8 +512,234 @@ nsFilePicker::Show(PRInt16 *aReturn)
       
  3326      *aReturn = nsIFilePicker::returnCancel;
       
  3327      break;
       
  3328    }
  3324    }
  3329  
  3325  
  3330    gtk_widget_destroy(file_chooser);
  3326 @@ -587,8 +594,235 @@ nsFilePicker::Done(GtkWidget* file_choos
  3331  
  3327    if (mCallback) {
  3332    return NS_OK;
  3328      mCallback->Done(result);
       
  3329      mCallback = nullptr;
       
  3330    } else {
       
  3331      mResult = result;
       
  3332    }
       
  3333    NS_RELEASE_THIS();
  3333  }
  3334  }
  3334 +
  3335 +
  3335 +nsCString nsFilePicker::kdeMakeFilter( int index )
  3336 +nsCString nsFilePicker::kdeMakeFilter( int index )
  3336 +    {
  3337 +    {
  3337 +    nsCString buf = mFilters[ index ];
  3338 +    nsCString buf = mFilters[ index ];
  3555 +        {
  3556 +        {
  3556 +        *aReturn = nsIFilePicker::returnCancel;
  3557 +        *aReturn = nsIFilePicker::returnCancel;
  3557 +        }
  3558 +        }
  3558 +    return NS_OK;
  3559 +    return NS_OK;
  3559 +    }
  3560 +    }
       
  3561 +
  3560 diff --git a/widget/gtk2/nsFilePicker.h b/widget/gtk2/nsFilePicker.h
  3562 diff --git a/widget/gtk2/nsFilePicker.h b/widget/gtk2/nsFilePicker.h
  3561 --- a/widget/gtk2/nsFilePicker.h
  3563 --- a/widget/gtk2/nsFilePicker.h
  3562 +++ b/widget/gtk2/nsFilePicker.h
  3564 +++ b/widget/gtk2/nsFilePicker.h
  3563 @@ -57,11 +57,17 @@ protected:
  3565 @@ -67,11 +67,17 @@ protected:
  3564    nsString  mDefault;
  3566    nsString  mDefault;
  3565    nsString  mDefaultExtension;
  3567    nsString  mDefaultExtension;
  3566  
  3568  
  3567    nsTArray<nsCString> mFilters;
  3569    nsTArray<nsCString> mFilters;
  3568    nsTArray<nsCString> mFilterNames;
  3570    nsTArray<nsCString> mFilterNames;
  3833        return rv;
  3835        return rv;
  3834      }
  3836      }
  3835      return NS_ERROR_FAILURE;
  3837      return NS_ERROR_FAILURE;
  3836 @@ -1823,16 +1831,23 @@ nsLocalFile::Launch()
  3838 @@ -1823,16 +1831,23 @@ nsLocalFile::Launch()
  3837  
  3839  
  3838      if (nsnull == connection)
  3840      if (nullptr == connection)
  3839        return NS_ERROR_FAILURE;
  3841        return NS_ERROR_FAILURE;
  3840  
  3842  
  3841      if (hildon_mime_open_file(connection, mPath.get()) != kHILDON_SUCCESS)
  3843      if (hildon_mime_open_file(connection, mPath.get()) != kHILDON_SUCCESS)
  3842        return NS_ERROR_FAILURE;
  3844        return NS_ERROR_FAILURE;
  3843      return NS_OK;
  3845      return NS_OK;