mozilla-kde.patch
changeset 229 298263f797be
parent 210 f4f4388b26a8
child 236 a4f5954df3a3
equal deleted inserted replaced
228:9ba8fb8909c4 229:298263f797be
    87    }
    87    }
    88    return NS_OK;
    88    return NS_OK;
    89  }
    89  }
    90  
    90  
    91  //----------------------------------------------------------------------------------------
    91  //----------------------------------------------------------------------------------------
    92 @@ -826,28 +845,40 @@ static nsresult pref_InitDefaults()
    92 @@ -890,24 +909,36 @@ static nsresult pref_InitInitialObjects(
    93    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
    93    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
    94    static const char* specialFiles[] = {
    94    static const char* specialFiles[] = {
    95  #if defined(XP_MAC) || defined(XP_MACOSX)
    95  #if defined(XP_MAC) || defined(XP_MACOSX)
    96        "macprefs.js"
    96        "macprefs.js"
    97  #elif defined(XP_WIN)
    97  #elif defined(XP_WIN)
    98        "winpref.js"
    98        "winpref.js"
    99  #elif defined(XP_UNIX)
    99  #elif defined(XP_UNIX)
   100        "unix.js"
   100        "unix.js"
   101 +      , "" // placeholder for KDE  (empty is otherwise harmless)
   101 +      , "" // placeholder for KDE  (empty is otherwise harmless)
   102  #if defined(VMS)
   102  #if defined(_AIX)
   103        , "openvms.js"
       
   104  #elif defined(_AIX)
       
   105        , "aix.js"
   103        , "aix.js"
   106  #endif
   104  #endif
   107  #elif defined(XP_OS2)
   105  #elif defined(XP_OS2)
   108        "os2pref.js"
   106        "os2pref.js"
   109  #elif defined(XP_BEOS)
       
   110        "beos.js"
       
   111  #endif
   107  #endif
   112    };
   108    };
   113  
   109  
   114 +  if(nsKDEUtils::kdeSession()) { // TODO what if some setup actually requires the helper?
   110 +  if(nsKDEUtils::kdeSession()) { // TODO what if some setup actually requires the helper?
   115 +    for( int i = 0;
   111 +    for( int i = 0;
   116 +         i < NS_ARRAY_LENGTH(specialFiles);
   112 +        i < NS_ARRAY_LENGTH(specialFiles);
   117 +         ++i ) {
   113 +        ++i ) {
   118 +      if( *specialFiles[ i ] == '\0' ) {
   114 +      if( *specialFiles[ i ] == '\0' ) {
   119 +        specialFiles[ i ] = "kde.js";
   115 +        specialFiles[ i ] = "kde.js";
   120 +        break;
   116 +        break;
   121 +      }
   117 +      }
   122 +    }
   118 +    }
   125    rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles));
   121    rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles, NS_ARRAY_LENGTH(specialFiles));
   126    if (NS_FAILED(rv)) {
   122    if (NS_FAILED(rv)) {
   127      NS_WARNING("Error parsing application default preferences.");
   123      NS_WARNING("Error parsing application default preferences.");
   128    }
   124    }
   129  
   125  
   130    return NS_OK;
   126    rv = pref_LoadPrefsInDirList(NS_APP_PREFS_DEFAULTS_DIR_LIST);
   131  }
   127    NS_ENSURE_SUCCESS(rv, rv);
   132  
   128  
   133 diff --git a/toolkit/components/downloads/src/Makefile.in b/toolkit/components/downloads/src/Makefile.in
   129 diff --git a/toolkit/components/downloads/src/Makefile.in b/toolkit/components/downloads/src/Makefile.in
   134 --- a/toolkit/components/downloads/src/Makefile.in
   130 --- a/toolkit/components/downloads/src/Makefile.in
   135 +++ b/toolkit/components/downloads/src/Makefile.in
   131 +++ b/toolkit/components/downloads/src/Makefile.in
   136 @@ -71,8 +71,9 @@ EXTRA_COMPONENTS = \
   132 @@ -71,8 +71,9 @@ EXTRA_COMPONENTS = \
  2153  else
  2149  else
  2154  ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
  2150  ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
  2155  CPPSRCS += nsNativeAppSupportQt.cpp
  2151  CPPSRCS += nsNativeAppSupportQt.cpp
  2156  CPPSRCS += nsQAppInstance.cpp
  2152  CPPSRCS += nsQAppInstance.cpp
  2157  EXPORTS += nsQAppInstance.h
  2153  EXPORTS += nsQAppInstance.h
  2158  ifdef MOZ_ENABLE_MEEGOTOUCH
  2154  else
  2159  MOCSRCS += moc_MozMeegoAppService.cpp
  2155  CPPSRCS += nsNativeAppSupportDefault.cpp
  2160  CPPSRCS += moc_MozMeegoAppService.cpp
  2156  endif
  2161 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
  2157 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
  2162 new file mode 100644
  2158 new file mode 100644
  2163 --- /dev/null
  2159 --- /dev/null
  2164 +++ b/toolkit/xre/nsKDEUtils.cpp
  2160 +++ b/toolkit/xre/nsKDEUtils.cpp
  2165 @@ -0,0 +1,334 @@
  2161 @@ -0,0 +1,334 @@
  2947 +
  2943 +
  2948 +};
  2944 +};
  2949 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
  2950 --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2946 --- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2951 +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2947 +++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
  2952 @@ -48,28 +48,31 @@
  2948 @@ -50,28 +50,31 @@
  2953  #include <QDesktopServices>
       
  2954  #include <QUrl>
       
  2955  #include <QString>
  2949  #include <QString>
       
  2950  #if (MOZ_ENABLE_CONTENTACTION)
  2956  #include <contentaction/contentaction.h>
  2951  #include <contentaction/contentaction.h>
  2957  #include "nsContentHandlerApp.h"
  2952  #include "nsContentHandlerApp.h"
       
  2953  #endif
  2958  #endif
  2954  #endif
  2959  
  2955  
  2960  #include "nsMIMEInfoUnix.h"
  2956  #include "nsMIMEInfoUnix.h"
  2961 -#include "nsGNOMERegistry.h"
  2957 -#include "nsGNOMERegistry.h"
  2962 +#include "nsCommonRegistry.h"
  2958 +#include "nsCommonRegistry.h"
  2981      HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nsnull);
  2977      HildonURIAction *action = hildon_uri_get_default_action(mSchemeOrType.get(), nsnull);
  2982      if (action) {
  2978      if (action) {
  2983        nsCAutoString spec;
  2979        nsCAutoString spec;
  2984        aURI->GetAsciiSpec(spec);
  2980        aURI->GetAsciiSpec(spec);
  2985        if (hildon_uri_open(spec.get(), action, nsnull))
  2981        if (hildon_uri_open(spec.get(), action, nsnull))
  2986 @@ -91,22 +94,22 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI *
  2982 @@ -93,22 +96,22 @@ nsMIMEInfoUnix::LoadUriInternal(nsIURI *
  2987  
  2983  
  2988    return rv;
  2984    return rv;
  2989  }
  2985  }
  2990  
  2986  
  2991  NS_IMETHODIMP
  2987  NS_IMETHODIMP
  3006      *_retval = PR_TRUE;
  3002      *_retval = PR_TRUE;
  3007  
  3003  
  3008    if (*_retval)
  3004    if (*_retval)
  3009      return NS_OK;
  3005      return NS_OK;
  3010  
  3006  
  3011 @@ -149,32 +152,49 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
  3007 @@ -151,32 +154,49 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
  3012      ContentAction::Action::defaultActionForFile(uri, QString(mSchemeOrType.get()));
  3008      ContentAction::Action::defaultActionForFile(uri, QString(mSchemeOrType.get()));
  3013    if (action.isValid()) {
  3009    if (action.isValid()) {
  3014      action.trigger();
  3010      action.trigger();
  3015      return NS_OK;
  3011      return NS_OK;
  3016    }
  3012    }
  3061      } else if (gnomevfs) {
  3057      } else if (gnomevfs) {
  3062 diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3058 diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3063 --- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3059 --- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3064 +++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3060 +++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
  3065 @@ -44,17 +44,17 @@
  3061 @@ -44,17 +44,17 @@
  3066  #if (MOZ_PLATFORM_MAEMO == 6)
  3062  #if defined(MOZ_ENABLE_CONTENTACTION)
  3067  #include <contentaction/contentaction.h>
  3063  #include <contentaction/contentaction.h>
  3068  #include <QString>
  3064  #include <QString>
  3069  #endif
  3065  #endif
  3070  
  3066  
  3071  #include "nsOSHelperAppService.h"
  3067  #include "nsOSHelperAppService.h"
  3663  CFLAGS          += $(MOZ_DBUS_CFLAGS)
  3659  CFLAGS          += $(MOZ_DBUS_CFLAGS)
  3664  CXXFLAGS        += $(MOZ_DBUS_CFLAGS)
  3660  CXXFLAGS        += $(MOZ_DBUS_CFLAGS)
  3665  endif
  3661  endif
  3666  
  3662  
  3667  ifdef MOZ_PLATFORM_MAEMO
  3663  ifdef MOZ_PLATFORM_MAEMO
  3668  CFLAGS          += $(MOZ_PLATFORM_MAEMO_CFLAGS)
  3664  CFLAGS          += $(MOZ_PLATFORM_MAEMO_CFLAGS) $(MOZ_QT_CFLAGS)
  3669 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
  3665 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
  3670 --- a/xpcom/io/nsLocalFileUnix.cpp
  3666 --- a/xpcom/io/nsLocalFileUnix.cpp
  3671 +++ b/xpcom/io/nsLocalFileUnix.cpp
  3667 +++ b/xpcom/io/nsLocalFileUnix.cpp
  3672 @@ -91,16 +91,17 @@
  3668 @@ -93,16 +93,17 @@
  3673  #include "prproces.h"
  3669  #include "prproces.h"
  3674  #include "nsIDirectoryEnumerator.h"
  3670  #include "nsIDirectoryEnumerator.h"
  3675  #include "nsISimpleEnumerator.h"
  3671  #include "nsISimpleEnumerator.h"
  3676  #include "nsITimelineService.h"
  3672  #include "nsITimelineService.h"
  3677  
  3673  
  3685  #include <Carbon/Carbon.h>
  3681  #include <Carbon/Carbon.h>
  3686  #include "CocoaFileUtils.h"
  3682  #include "CocoaFileUtils.h"
  3687  #include "prmem.h"
  3683  #include "prmem.h"
  3688  #include "plbase64.h"
  3684  #include "plbase64.h"
  3689  
  3685  
  3690 @@ -1820,44 +1821,50 @@ nsLocalFile::Launch()
  3686 @@ -1822,44 +1823,50 @@ nsLocalFile::Launch()
  3691  
  3687  
  3692      return NS_OK;
  3688      return NS_OK;
  3693  }
  3689  }
  3694  #else
  3690  #else
  3695  NS_IMETHODIMP
  3691  NS_IMETHODIMP
  3750        nsresult rv = CocoaFileUtils::RevealFileInFinder(url);
  3746        nsresult rv = CocoaFileUtils::RevealFileInFinder(url);
  3751        ::CFRelease(url);
  3747        ::CFRelease(url);
  3752        return rv;
  3748        return rv;
  3753      }
  3749      }
  3754      return NS_ERROR_FAILURE;
  3750      return NS_ERROR_FAILURE;
  3755 @@ -1883,16 +1890,23 @@ nsLocalFile::Launch()
  3751 @@ -1885,16 +1892,23 @@ nsLocalFile::Launch()
  3756  
  3752  
  3757      if (nsnull == connection)
  3753      if (nsnull == connection)
  3758        return NS_ERROR_FAILURE;
  3754        return NS_ERROR_FAILURE;
  3759  
  3755  
  3760      if (hildon_mime_open_file(connection, mPath.get()) != kHILDON_SUCCESS)
  3756      if (hildon_mime_open_file(connection, mPath.get()) != kHILDON_SUCCESS)