mozilla-kde.patch
changeset 703 c4aab80e472f
parent 691 18c2dc922e51
child 716 cef565f1c325
equal deleted inserted replaced
700:52284fd63667 703:c4aab80e472f
     5      https://bugzilla.novell.com/show_bug.cgi?id=170055
     5      https://bugzilla.novell.com/show_bug.cgi?id=170055
     6 
     6 
     7 diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
     7 diff --git a/modules/libpref/src/Makefile.in b/modules/libpref/src/Makefile.in
     8 --- a/modules/libpref/src/Makefile.in
     8 --- a/modules/libpref/src/Makefile.in
     9 +++ b/modules/libpref/src/Makefile.in
     9 +++ b/modules/libpref/src/Makefile.in
    10 @@ -33,14 +33,15 @@ endif
    10 @@ -21,13 +21,15 @@ endif
    11  # Optimizer bug with GCC 3.2.2 on OS/2
    11  ifdef MOZ_SERVICES_HEALTHREPORT
    12  ifeq ($(OS_ARCH), OS2)
    12  ifneq (android,$(MOZ_WIDGET_TOOLKIT))
    13  nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
    13  grepref_files += $(topsrcdir)/services/healthreport/healthreport-prefs.js
    14  	$(REPORT_BUILD)
    14  else
    15  	@$(MAKE_DEPS_AUTO_CXX)
    15  grepref_files += $(topsrcdir)/mobile/android/chrome/content/healthreport-prefs.js
    16  	$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:-O2=-O1) $(_VPATH_SRCS)
       
    17  endif
    16  endif
       
    17  endif
    18  
    18  
    19 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
    19 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
    20  
    20 +
    21  greprefs.js: $(grepref_files)
    21  greprefs.js: $(grepref_files)
    22  	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ > $@
    22  	$(call py_action,preprocessor,$(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ -o $@)
    23  
    23  
    24  libs:: greprefs.js
    24  libs:: greprefs.js
    25  	$(INSTALL) $^ $(DIST)/bin/
    25  	$(INSTALL) $^ $(DIST)/bin/
    26 diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp
    26 diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp
    27 --- a/modules/libpref/src/Preferences.cpp
    27 --- a/modules/libpref/src/Preferences.cpp
    42  
    42  
    43  #include "prefapi.h"
    43  #include "prefapi.h"
    44  #include "prefread.h"
    44  #include "prefread.h"
    45  #include "prefapi_private_data.h"
    45  #include "prefapi_private_data.h"
    46  
    46  
    47 @@ -1100,16 +1101,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    47 @@ -1115,16 +1116,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    48  
    48  
    49  static nsresult pref_LoadPrefsInDirList(const char *listId)
    49  static nsresult pref_LoadPrefsInDirList(const char *listId)
    50  {
    50  {
    51    nsresult rv;
    51    nsresult rv;
    52    nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
    52    nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
    77                getter_AddRefs(list));
    77                getter_AddRefs(list));
    78    if (!list)
    78    if (!list)
    79      return NS_OK;
    79      return NS_OK;
    80  
    80  
    81    bool hasMore;
    81    bool hasMore;
    82 @@ -1125,17 +1144,17 @@ static nsresult pref_LoadPrefsInDirList(
    82 @@ -1140,17 +1159,17 @@ static nsresult pref_LoadPrefsInDirList(
    83  
    83  
    84      nsAutoCString leaf;
    84      nsAutoCString leaf;
    85      path->GetNativeLeafName(leaf);
    85      path->GetNativeLeafName(leaf);
    86  
    86  
    87      // Do we care if a file provided by this process fails to load?
    87      // Do we care if a file provided by this process fails to load?
    96  
    96  
    97  static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
    97  static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
    98  {
    98  {
    99    nsZipItemPtr<char> manifest(jarReader, name, true);
    99    nsZipItemPtr<char> manifest(jarReader, name, true);
   100    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
   100    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
   101 @@ -1229,28 +1248,40 @@ static nsresult pref_InitInitialObjects(
   101 @@ -1244,28 +1263,40 @@ static nsresult pref_InitInitialObjects(
   102    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
   102    /* these pref file names should not be used: we process them after all other application pref files for backwards compatibility */
   103    static const char* specialFiles[] = {
   103    static const char* specialFiles[] = {
   104  #if defined(XP_MACOSX)
   104  #if defined(XP_MACOSX)
   105      "macprefs.js"
   105      "macprefs.js"
   106  #elif defined(XP_WIN)
   106  #elif defined(XP_WIN)
   215  #include <CoreFoundation/CoreFoundation.h>
   215  #include <CoreFoundation/CoreFoundation.h>
   216  #endif
   216  #endif
   217  
   217  
   218  #ifdef MOZ_WIDGET_ANDROID
   218  #ifdef MOZ_WIDGET_ANDROID
   219  #include "AndroidBridge.h"
   219  #include "AndroidBridge.h"
       
   220  using namespace mozilla::widget::android;
   220  #endif
   221  #endif
   221  
   222 @@ -2687,16 +2691,25 @@ nsDownload::SetState(DownloadState aStat
   222 @@ -2686,16 +2690,25 @@ nsDownload::SetState(DownloadState aStat
       
   223        nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
   223        nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
   224  
   224  
   225        // Master pref to control this function.
   225        // Master pref to control this function.
   226        bool showTaskbarAlert = true;
   226        bool showTaskbarAlert = true;
   227        if (pref)
   227        if (pref)
   243  
   243  
   244          int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
   244          int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
   245          int64_t goat = PR_Now() - mStartTime;
   245          int64_t goat = PR_Now() - mStartTime;
   246          showTaskbarAlert = goat > alertIntervalUSec;
   246          showTaskbarAlert = goat > alertIntervalUSec;
   247  
   247  
   248 @@ -2722,19 +2735,20 @@ nsDownload::SetState(DownloadState aStat
   248 @@ -2724,19 +2737,20 @@ nsDownload::SetState(DownloadState aStat
   249                // retention policy, there's no reason to make the text clickable
       
   250                // because if it is, they'll click open the download manager and
   249                // because if it is, they'll click open the download manager and
   251                // the items they downloaded will have been removed.
   250                // the items they downloaded will have been removed.
   252                alerts->ShowAlertNotification(
   251                alerts->ShowAlertNotification(
   253                    NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
   252                    NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
   254                    message, !removeWhenDone,
   253                    message, !removeWhenDone,
   255                    mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"),
   254                    mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"),
   256                    mDownloadManager, EmptyString(), NS_LITERAL_STRING("auto"), EmptyString());
   255                    mDownloadManager, EmptyString(), NS_LITERAL_STRING("auto"),
       
   256                    EmptyString(), nullptr);
   257 -            }
   257 -            }
   258 +          }
   258 +          }
   259          }
   259          }
   260        }
   260        }
   261 +      }
   261 +      }
  2193 +}
  2193 +}
  2194 +
  2194 +
  2195 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
  2195 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
  2196 --- a/toolkit/xre/moz.build
  2196 --- a/toolkit/xre/moz.build
  2197 +++ b/toolkit/xre/moz.build
  2197 +++ b/toolkit/xre/moz.build
  2198 @@ -43,18 +43,20 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt
  2198 @@ -45,17 +45,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt
  2199          'nsNativeAppSupportQt.cpp',
  2199          'nsNativeAppSupportQt.cpp',
  2200          'nsQAppInstance.cpp',
  2200          'nsQAppInstance.cpp',
  2201      ]
  2201      ]
  2202  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
  2202  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
  2203      SOURCES += [
  2203      SOURCES += [
  2204          'nsNativeAppSupportOS2.cpp',
  2204          'nsNativeAppSupportOS2.cpp',
  2205      ]
  2205      ]
  2206  elif CONFIG['MOZ_ENABLE_GTK']:
  2206  elif CONFIG['MOZ_ENABLE_GTK']:
  2207 +    EXPORTS += ['nsKDEUtils.h']
  2207 +    EXPORTS += ['nsKDEUtils.h']
  2208      SOURCES += [
  2208      UNIFIED_SOURCES += [
  2209 -        'nsNativeAppSupportUnix.cpp',
       
  2210 +        'nsKDEUtils.cpp',
  2209 +        'nsKDEUtils.cpp',
  2211 +        'nsNativeAppSupportUnix.cpp'
  2210          'nsNativeAppSupportUnix.cpp',
  2212      ]
  2211      ]
  2213  else:
  2212  else:
  2214      SOURCES += [
  2213      UNIFIED_SOURCES += [
  2215          'nsNativeAppSupportDefault.cpp',
  2214          'nsNativeAppSupportDefault.cpp',
  2216      ]
  2215      ]
  2217  
  2216  
  2218  if CONFIG['MOZ_X11']:
  2217  if CONFIG['MOZ_X11']:
  2219      SOURCES += [
       
  2220 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
  2218 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
  2221 new file mode 100644
  2219 new file mode 100644
  2222 --- /dev/null
  2220 --- /dev/null
  2223 +++ b/toolkit/xre/nsKDEUtils.cpp
  2221 +++ b/toolkit/xre/nsKDEUtils.cpp
  2224 @@ -0,0 +1,339 @@
  2222 @@ -0,0 +1,339 @@
  2615 +
  2613 +
  2616 +#endif // nsKDEUtils
  2614 +#endif // nsKDEUtils
  2617 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
  2615 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
  2618 --- a/uriloader/exthandler/Makefile.in
  2616 --- a/uriloader/exthandler/Makefile.in
  2619 +++ b/uriloader/exthandler/Makefile.in
  2617 +++ b/uriloader/exthandler/Makefile.in
  2620 @@ -44,9 +44,10 @@ endif
  2618 @@ -19,9 +19,10 @@ endif
  2621  ifdef MOZ_ENABLE_DBUS
  2619  ifdef MOZ_ENABLE_DBUS
  2622  LOCAL_INCLUDES   += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
  2620  LOCAL_INCLUDES   += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
  2623  endif
  2621  endif
  2624  
  2622  
  2625  include $(topsrcdir)/config/rules.mk
  2623  include $(topsrcdir)/config/rules.mk
  2629 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  2627 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  2630  endif
  2628  endif
  2631 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
  2629 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
  2632 --- a/uriloader/exthandler/moz.build
  2630 --- a/uriloader/exthandler/moz.build
  2633 +++ b/uriloader/exthandler/moz.build
  2631 +++ b/uriloader/exthandler/moz.build
  2634 @@ -73,17 +73,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
  2632 @@ -81,17 +81,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
  2635      ]
       
  2636  else:
  2633  else:
       
  2634      # These files can't be built in unified mode because they force NSPR logging.
  2637      SOURCES += [
  2635      SOURCES += [
  2638          osdir + '/nsOSHelperAppService.cpp',
  2636          osdir + '/nsOSHelperAppService.cpp',
  2639      ]
  2637      ]
  2640  
  2638  
  2641  if CONFIG['MOZ_ENABLE_GTK']:
  2639  if CONFIG['MOZ_ENABLE_GTK']:
  2642      SOURCES += [
  2640      UNIFIED_SOURCES += [
  2643 +        'unix/nsCommonRegistry.cpp',
  2641 +        'unix/nsCommonRegistry.cpp',
  2644          'unix/nsGNOMERegistry.cpp',
  2642          'unix/nsGNOMERegistry.cpp',
  2645 +        'unix/nsKDERegistry.cpp',
  2643 +	'unix/nsKDERegistry.cpp',
  2646          'unix/nsMIMEInfoUnix.cpp',
  2644          'unix/nsMIMEInfoUnix.cpp',
  2647      ]
  2645      ]
  2648  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
  2646  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
  2649      SOURCES += [
  2647      UNIFIED_SOURCES += [
  2650          'android/nsAndroidHandlerApp.cpp',
  2648          'android/nsAndroidHandlerApp.cpp',
  2651          'android/nsExternalSharingAppService.cpp',
  2649          'android/nsExternalSharingAppService.cpp',
  2652          'android/nsExternalURLHandlerService.cpp',
  2650          'android/nsExternalURLHandlerService.cpp',
  2653          'android/nsMIMEInfoAndroid.cpp',
  2651          'android/nsMIMEInfoAndroid.cpp',
  2654 diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp
  2652 diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp
  3072  
  3070  
  3073    // Now look up our extensions
  3071    // Now look up our extensions
  3074 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in
  3072 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in
  3075 --- a/widget/gtk/Makefile.in
  3073 --- a/widget/gtk/Makefile.in
  3076 +++ b/widget/gtk/Makefile.in
  3074 +++ b/widget/gtk/Makefile.in
  3077 @@ -26,11 +26,14 @@ DEFINES		+= -DCAIRO_GFX -DMOZ_APP_NAME='
  3075 @@ -4,11 +4,13 @@
  3078  
  3076  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  3079  INCLUDES	+= \
  3077  
  3080  		-I$(srcdir)/../xpwidgets \
  3078  include $(topsrcdir)/config/rules.mk
  3081  		-I$(srcdir)/../shared \
  3079  
  3082  		-I$(topsrcdir)/layout/generic \
  3080  CFLAGS          += $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
  3083  		-I$(topsrcdir)/layout/xul/base/src \
  3081  CXXFLAGS        += $(MOZ_CAIRO_CFLAGS) $(MOZ_PIXMAN_CFLAGS) \
  3084  		-I$(topsrcdir)/other-licenses/atk-1.0 \
  3082  		               $(MOZ_STARTUP_NOTIFICATION_CFLAGS)
  3085  		$(NULL)
  3083  
  3086 +
       
  3087 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  3084 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  3088 +
  3085 +
  3089  ifdef MOZ_X11
  3086  CFLAGS          += $(TK_CFLAGS)
  3090  INCLUDES   	+= -I$(srcdir)/../shared/x11
  3087  CXXFLAGS        += $(TK_CFLAGS)
  3091  endif
  3088  
  3092 diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
  3089 diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
  3093 --- a/widget/gtk/nsFilePicker.cpp
  3090 --- a/widget/gtk/nsFilePicker.cpp
  3094 +++ b/widget/gtk/nsFilePicker.cpp
  3091 +++ b/widget/gtk/nsFilePicker.cpp
  3095 @@ -1,32 +1,34 @@
  3092 @@ -1,32 +1,34 @@
  3096  /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3093  /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3097  /* This Source Code Form is subject to the terms of the Mozilla Public
  3094  /* This Source Code Form is subject to the terms of the Mozilla Public
  3098   * License, v. 2.0. If a copy of the MPL was not distributed with this
  3095   * License, v. 2.0. If a copy of the MPL was not distributed with this
  3099   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  3096   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  3100  
  3097  
  3101  #include "mozilla/Util.h"
  3098  #include "mozilla/Types.h"
  3102  
  3099  
  3103  #include <gtk/gtk.h>
  3100  #include <gtk/gtk.h>
  3104 +#include <gdk/gdkx.h>
  3101 +#include <gdk/gdkx.h>
  3105  
  3102  
  3106  #include "nsGtkUtils.h"
  3103  #include "nsGtkUtils.h"
  3525 +  desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome");
  3522 +  desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome");
  3526  #elif defined(MOZ_WIDGET_ANDROID)
  3523  #elif defined(MOZ_WIDGET_ANDROID)
  3527    bool isTablet = false;
  3524    bool isTablet = false;
  3528    if (mozilla::AndroidBridge::Bridge()) {
  3525    if (mozilla::AndroidBridge::Bridge()) {
  3529      mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion);
  3526      mozilla::AndroidBridge::Bridge()->GetStaticStringField("android/os/Build$VERSION", "RELEASE", osVersion);
  3530      isTablet = mozilla::AndroidBridge::Bridge()->IsTablet();
  3527      isTablet = mozilla::widget::android::GeckoAppShell::IsTablet();
  3531    }
  3528    }
  3532 +  desktop = NS_LITERAL_STRING("android");
  3529 +  desktop = NS_LITERAL_STRING("android");
  3533  #endif
  3530  #endif
  3534  
  3531  
  3535    // Because contracts must be registered after CIDs, we save and process them
  3532    // Because contracts must be registered after CIDs, we save and process them
  3584      if (directive->regfunc) {
  3581      if (directive->regfunc) {
  3585        if (GeckoProcessType_Default != XRE_GetProcessType())
  3582        if (GeckoProcessType_Default != XRE_GetProcessType())
  3586 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in
  3583 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in
  3587 --- a/xpcom/io/Makefile.in
  3584 --- a/xpcom/io/Makefile.in
  3588 +++ b/xpcom/io/Makefile.in
  3585 +++ b/xpcom/io/Makefile.in
  3589 @@ -6,9 +6,9 @@ MOZILLA_INTERNAL_API = 1
  3586 @@ -1,8 +1,8 @@
       
  3587  # This Source Code Form is subject to the terms of the Mozilla Public
       
  3588  # License, v. 2.0. If a copy of the MPL was not distributed with this
       
  3589  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
       
  3590  
       
  3591  MOZILLA_INTERNAL_API = 1
  3590  include $(topsrcdir)/config/rules.mk
  3592  include $(topsrcdir)/config/rules.mk
  3591  
       
  3592  ifeq ($(OS_ARCH),Linux)
       
  3593  ifneq (,$(findstring lib64,$(libdir)))
       
  3594  DEFINES     += -DHAVE_USR_LIB64_DIR
       
  3595  endif
       
  3596  endif
       
  3597  
  3593  
  3598 -LOCAL_INCLUDES	+= -I..
  3594 -LOCAL_INCLUDES	+= -I..
  3599 +LOCAL_INCLUDES	+= -I.. -I$(topsrcdir)/toolkit/xre
  3595 +LOCAL_INCLUDES	+= -I.. -I$(topsrcdir)/toolkit/xre
  3600 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
  3596 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
  3601 --- a/xpcom/io/nsLocalFileUnix.cpp
  3597 --- a/xpcom/io/nsLocalFileUnix.cpp
  3616  #include <Carbon/Carbon.h>
  3612  #include <Carbon/Carbon.h>
  3617  #include "CocoaFileUtils.h"
  3613  #include "CocoaFileUtils.h"
  3618  #include "prmem.h"
  3614  #include "prmem.h"
  3619  #include "plbase64.h"
  3615  #include "plbase64.h"
  3620  
  3616  
  3621 @@ -1728,44 +1729,51 @@ nsLocalFile::SetPersistentDescriptor(con
  3617 @@ -1811,46 +1812,52 @@ nsLocalFile::SetPersistentDescriptor(con
  3622      return InitWithNativePath(aPersistentDescriptor);
  3618      return InitWithNativePath(aPersistentDescriptor);
  3623  #endif
  3619  #endif
  3624  }
  3620  }
  3625  
  3621  
  3626  NS_IMETHODIMP
  3622  NS_IMETHODIMP
  3635 +    nsAutoCString url;
  3631 +    nsAutoCString url;
  3636      bool isDirectory;
  3632      bool isDirectory;
  3637      if (NS_FAILED(IsDirectory(&isDirectory)))
  3633      if (NS_FAILED(IsDirectory(&isDirectory)))
  3638          return NS_ERROR_FAILURE;
  3634          return NS_ERROR_FAILURE;
  3639  
  3635  
       
  3636 +    nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
  3640      if (isDirectory) {
  3637      if (isDirectory) {
  3641 -        if (giovfs)
  3638 -        if (giovfs)
  3642 -            return giovfs->ShowURIForInput(mPath);
  3639 -            return giovfs->ShowURIForInput(mPath);
  3643 -        else 
  3640 -        else 
  3644 -            /* Fallback to GnomeVFS */
  3641 -            /* Fallback to GnomeVFS */
  3645 -            return gnomevfs->ShowURIForInput(mPath);
  3642 -            return gnomevfs->ShowURIForInput(mPath);
  3646 +        url = mPath;
  3643 +        url = mPath;
       
  3644      } else if (giovfs && NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) {
       
  3645          return NS_OK;
  3647      } else {
  3646      } else {
  3648          nsCOMPtr<nsIFile> parentDir;
  3647          nsCOMPtr<nsIFile> parentDir;
  3649          nsAutoCString dirPath;
  3648          nsAutoCString dirPath;
  3650          if (NS_FAILED(GetParent(getter_AddRefs(parentDir))))
  3649          if (NS_FAILED(GetParent(getter_AddRefs(parentDir))))
  3651              return NS_ERROR_FAILURE;
  3650              return NS_ERROR_FAILURE;
  3664 +      command.AppendElement( NS_LITERAL_CSTRING("REVEAL") );
  3663 +      command.AppendElement( NS_LITERAL_CSTRING("REVEAL") );
  3665 +      command.AppendElement( mPath );
  3664 +      command.AppendElement( mPath );
  3666 +      return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
  3665 +      return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
  3667 +    }
  3666 +    }
  3668 +
  3667 +
  3669 +    nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
       
  3670 +    nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
  3668 +    nsCOMPtr<nsIGnomeVFSService> gnomevfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
  3671 +    if (!giovfs && !gnomevfs)
  3669 +    if (!giovfs && !gnomevfs)
  3672 +      return NS_ERROR_FAILURE;
  3670 +      return NS_ERROR_FAILURE;
  3673 +
  3671 +
  3674 +    if (giovfs)
  3672 +    if (giovfs)
  3675 +      return giovfs->ShowURIForInput(url);
  3673 +      return giovfs->ShowURIForInput(url);
  3676 +    else
  3674 +    else
  3677 +      return gnomevfs->ShowURIForInput(url);
  3675 +      return gnomevfs->ShowURIForInput(url);
  3678 +
       
  3679  #elif defined(MOZ_WIDGET_COCOA)
  3676  #elif defined(MOZ_WIDGET_COCOA)
  3680      CFURLRef url;
  3677      CFURLRef url;
  3681      if (NS_SUCCEEDED(GetCFURL(&url))) {
  3678      if (NS_SUCCEEDED(GetCFURL(&url))) {
  3682        nsresult rv = CocoaFileUtils::RevealFileInFinder(url);
  3679        nsresult rv = CocoaFileUtils::RevealFileInFinder(url);
  3683        ::CFRelease(url);
  3680        ::CFRelease(url);
  3684        return rv;
  3681        return rv;
  3685      }
  3682      }
  3686      return NS_ERROR_FAILURE;
  3683      return NS_ERROR_FAILURE;
  3687 @@ -1773,16 +1781,23 @@ nsLocalFile::Reveal()
  3684 @@ -1858,16 +1865,23 @@ nsLocalFile::Reveal()
  3688      return NS_ERROR_FAILURE;
  3685      return NS_ERROR_FAILURE;
  3689  #endif
  3686  #endif
  3690  }
  3687  }
  3691  
  3688  
  3692  NS_IMETHODIMP
  3689  NS_IMETHODIMP