mozilla-kde.patch
changeset 236 a4f5954df3a3
parent 229 298263f797be
child 244 e78e26a38f6d
equal deleted inserted replaced
232:156406e2b62d 236:a4f5954df3a3
  2943 +
  2943 +
  2944 +};
  2944 +};
  2945 diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2945 diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2946 --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2946 --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2947 +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2947 +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2948 @@ -50,28 +50,31 @@
  2948 @@ -50,30 +50,33 @@
  2949  #include <QString>
  2949  #include <QString>
  2950  #if (MOZ_ENABLE_CONTENTACTION)
  2950  #if (MOZ_ENABLE_CONTENTACTION)
  2951  #include <contentaction/contentaction.h>
  2951  #include <contentaction/contentaction.h>
  2952  #include "nsContentHandlerApp.h"
  2952  #include "nsContentHandlerApp.h"
  2953  #endif
  2953  #endif
  2955  
  2955  
  2956  #include "nsMIMEInfoUnix.h"
  2956  #include "nsMIMEInfoUnix.h"
  2957 -#include "nsGNOMERegistry.h"
  2957 -#include "nsGNOMERegistry.h"
  2958 +#include "nsCommonRegistry.h"
  2958 +#include "nsCommonRegistry.h"
  2959  #include "nsIGIOService.h"
  2959  #include "nsIGIOService.h"
       
  2960  #include "nsNetCID.h"
       
  2961  #include "nsIIOService.h"
  2960  #include "nsIGnomeVFSService.h"
  2962  #include "nsIGnomeVFSService.h"
  2961  #include "nsAutoPtr.h"
  2963  #include "nsAutoPtr.h"
  2962  #ifdef MOZ_ENABLE_DBUS
  2964  #ifdef MOZ_ENABLE_DBUS
  2963  #include "nsDBusHandlerApp.h"
  2965  #include "nsDBusHandlerApp.h"
  2964  #endif
  2966  #endif
  2977      HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nsnull);
  2979      HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nsnull);
  2978      if (action) {
  2980      if (action) {
  2979        nsCAutoString spec;
  2981        nsCAutoString spec;
  2980        aURI->GetAsciiSpec(spec);
  2982        aURI->GetAsciiSpec(spec);
  2981        if (hildon_uri_open(spec.get(), action, nsnull))
  2983        if (hildon_uri_open(spec.get(), action, nsnull))
  2982 @@ -93,22 +96,22 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI *
  2984 @@ -95,22 +98,22 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI *
  2983  
  2985  
  2984    return rv;
  2986    return rv;
  2985  }
  2987  }
  2986  
  2988  
  2987  NS_IMETHODIMP
  2989  NS_IMETHODIMP
  3002      *_retval = PR_TRUE;
  3004      *_retval = PR_TRUE;
  3003  
  3005  
  3004    if (*_retval)
  3006    if (*_retval)
  3005      return NS_OK;
  3007      return NS_OK;
  3006  
  3008  
  3007 @@ -151,32 +154,49 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
  3009 @@ -153,16 +156,33 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
  3008      ContentAction::Action::defaultActionForFile(uri, QString(mSchemeOrType.get()));
  3010      ContentAction::Action::defaultActionForFile(uri, QString(mSchemeOrType.get()));
  3009    if (action.isValid()) {
  3011    if (action.isValid()) {
  3010      action.trigger();
  3012      action.trigger();
  3011      return NS_OK;
  3013      return NS_OK;
  3012    }
  3014    }
  3029 +
  3031 +
  3030 +    return LaunchWithIProcess(mDefaultApplication, nativePath);
  3032 +    return LaunchWithIProcess(mDefaultApplication, nativePath);
  3031 +  }
  3033 +  }
  3032 +
  3034 +
  3033    nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
  3035    nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
  3034    nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
  3036    nsCAutoString uriSpec;
  3035    if (giovfs) {
  3037    if (giovfs) {
  3036      nsCOMPtr<nsIGIOMimeApp> app;
  3038      // nsGIOMimeApp->Launch wants a URI string instead of local file
  3037      if (NS_SUCCEEDED(giovfs->GetAppForMimeType(mSchemeOrType, getter_AddRefs(app))) && app)
  3039      nsresult rv;
  3038        return app->Launch(nativePath);
  3040      nsCOMPtr<nsIIOService> ioservice = do_GetService(NS_IOSERVICE_CONTRACTID, &rv);
  3039    } else if (gnomevfs) {
  3041      NS_ENSURE_SUCCESS(rv, rv);
       
  3042      nsCOMPtr<nsIURI> uri;
       
  3043 @@ -180,17 +200,17 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
  3040      /* Fallback to GnomeVFS */
  3044      /* Fallback to GnomeVFS */
  3041      nsCOMPtr<nsIGnomeVFSMimeApp> app;
  3045      nsCOMPtr<nsIGnomeVFSMimeApp> app;
  3042      if (NS_SUCCEEDED(gnomevfs->GetAppForMimeType(mSchemeOrType, getter_AddRefs(app))) && app)
  3046      if (NS_SUCCEEDED(gnomevfs->GetAppForMimeType(mSchemeOrType, getter_AddRefs(app))) && app)
  3043        return app->Launch(nativePath);
  3047        return app->Launch(nativePath);
  3044    }
  3048    }
  3051      nsCAutoString type;
  3055      nsCAutoString type;
  3052      mimeInfo->GetType(type);
  3056      mimeInfo->GetType(type);
  3053      if (giovfs) {
  3057      if (giovfs) {
  3054        nsCOMPtr<nsIGIOMimeApp> app;
  3058        nsCOMPtr<nsIGIOMimeApp> app;
  3055        if (NS_SUCCEEDED(giovfs->GetAppForMimeType(type, getter_AddRefs(app))) && app)
  3059        if (NS_SUCCEEDED(giovfs->GetAppForMimeType(type, getter_AddRefs(app))) && app)
  3056          return app->Launch(nativePath);
  3060          return app->Launch(uriSpec);
  3057      } else if (gnomevfs) {
  3061      } else if (gnomevfs) {
  3058 diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3062 diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3059 --- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3063 --- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3060 +++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3064 +++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3061 @@ -44,17 +44,17 @@
  3065 @@ -44,17 +44,17 @@