mozilla-kde.patch
changeset 718 6cb1ac7cd223
parent 716 cef565f1c325
child 738 f118b88b7d7f
child 741 f3cef88a34e9
equal deleted inserted replaced
716:cef565f1c325 718:6cb1ac7cd223
    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 @@ -1113,16 +1114,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    47 @@ -1119,16 +1120,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 @@ -1138,17 +1157,17 @@ static nsresult pref_LoadPrefsInDirList(
    82 @@ -1144,17 +1163,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 @@ -1242,28 +1261,40 @@ static nsresult pref_InitInitialObjects(
   101 @@ -1248,26 +1267,38 @@ 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)
   111  #if defined(VMS)
   111  #if defined(VMS)
   112      , "openvms.js"
   112      , "openvms.js"
   113  #elif defined(_AIX)
   113  #elif defined(_AIX)
   114      , "aix.js"
   114      , "aix.js"
   115  #endif
   115  #endif
   116  #elif defined(XP_OS2)
       
   117      "os2pref.js"
       
   118  #elif defined(XP_BEOS)
   116  #elif defined(XP_BEOS)
   119      "beos.js"
   117      "beos.js"
   120  #endif
   118  #endif
   121    };
   119    };
   122  
   120  
   182          self.base = base
   180          self.base = base
   183          self.flags = Flags(*flags)
   181          self.flags = Flags(*flags)
   184 diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in
   182 diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in
   185 --- a/toolkit/components/downloads/Makefile.in
   183 --- a/toolkit/components/downloads/Makefile.in
   186 +++ b/toolkit/components/downloads/Makefile.in
   184 +++ b/toolkit/components/downloads/Makefile.in
   187 @@ -4,9 +4,10 @@
   185 @@ -1,9 +1,9 @@
       
   186  #
       
   187  # This Source Code Form is subject to the terms of the Mozilla Public
       
   188  # License, v. 2.0. If a copy of the MPL was not distributed with this
   188  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
   189  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
   189  
   190  
   190  include $(topsrcdir)/config/rules.mk
   191  include $(topsrcdir)/config/rules.mk
   191  
   192  
   192  CXXFLAGS += $(TK_CFLAGS) -DGOOGLE_PROTOBUF_NO_RTTI
   193  CXXFLAGS += $(TK_CFLAGS)
   193  
   194 -
   194  LOCAL_INCLUDES += \
   195 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
   195    -I$(srcdir)/../protobuf \
       
   196 +  -I$(topsrcdir)/toolkit/xre \
       
   197    $(NULL)
       
   198 diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
   196 diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp
   199 --- a/toolkit/components/downloads/nsDownloadManager.cpp
   197 --- a/toolkit/components/downloads/nsDownloadManager.cpp
   200 +++ b/toolkit/components/downloads/nsDownloadManager.cpp
   198 +++ b/toolkit/components/downloads/nsDownloadManager.cpp
   201 @@ -41,16 +41,20 @@
   199 @@ -42,16 +42,20 @@
   202  #ifdef XP_WIN
   200  #ifdef XP_WIN
   203  #include <shlobj.h>
   201  #include <shlobj.h>
   204  #include "nsWindowsHelpers.h"
   202  #include "nsWindowsHelpers.h"
   205  #ifdef DOWNLOAD_SCANNER
   203  #ifdef DOWNLOAD_SCANNER
   206  #include "nsDownloadScanner.h"
   204  #include "nsDownloadScanner.h"
   217  
   215  
   218  #ifdef MOZ_WIDGET_ANDROID
   216  #ifdef MOZ_WIDGET_ANDROID
   219  #include "AndroidBridge.h"
   217  #include "AndroidBridge.h"
   220  using namespace mozilla::widget::android;
   218  using namespace mozilla::widget::android;
   221  #endif
   219  #endif
   222 @@ -2687,16 +2691,25 @@ nsDownload::SetState(DownloadState aStat
   220 @@ -2695,16 +2699,25 @@ nsDownload::SetState(DownloadState aStat
   223        nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
   221        nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
   224  
   222  
   225        // Master pref to control this function.
   223        // Master pref to control this function.
   226        bool showTaskbarAlert = true;
   224        bool showTaskbarAlert = true;
   227        if (pref)
   225        if (pref)
   243  
   241  
   244          int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
   242          int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
   245          int64_t goat = PR_Now() - mStartTime;
   243          int64_t goat = PR_Now() - mStartTime;
   246          showTaskbarAlert = goat > alertIntervalUSec;
   244          showTaskbarAlert = goat > alertIntervalUSec;
   247  
   245  
   248 @@ -2724,19 +2737,20 @@ nsDownload::SetState(DownloadState aStat
   246 @@ -2732,19 +2745,20 @@ nsDownload::SetState(DownloadState aStat
   249                // because if it is, they'll click open the download manager and
   247                // because if it is, they'll click open the download manager and
   250                // the items they downloaded will have been removed.
   248                // the items they downloaded will have been removed.
   251                alerts->ShowAlertNotification(
   249                alerts->ShowAlertNotification(
   252                    NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
   250                    NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
   253                    message, !removeWhenDone,
   251                    message, !removeWhenDone,
   268        if (fileURL &&
   266        if (fileURL &&
   269            NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) &&
   267            NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) &&
   270 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
   268 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn
   271 --- a/toolkit/content/jar.mn
   269 --- a/toolkit/content/jar.mn
   272 +++ b/toolkit/content/jar.mn
   270 +++ b/toolkit/content/jar.mn
   273 @@ -55,29 +55,33 @@ toolkit.jar:
   271 @@ -56,29 +56,33 @@ toolkit.jar:
   274     content/global/viewZoomOverlay.js          (viewZoomOverlay.js)
   272     content/global/viewZoomOverlay.js          (viewZoomOverlay.js)
   275  *+ content/global/bindings/autocomplete.xml    (widgets/autocomplete.xml)
   273  *+ content/global/bindings/autocomplete.xml    (widgets/autocomplete.xml)
   276     content/global/bindings/browser.xml         (widgets/browser.xml)
   274     content/global/bindings/browser.xml         (widgets/browser.xml)
   277     content/global/bindings/button.xml          (widgets/button.xml)
   275     content/global/bindings/button.xml          (widgets/button.xml)
   278     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
   276     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
   306     content/global/bindings/scrollbox.xml       (widgets/scrollbox.xml)
   304     content/global/bindings/scrollbox.xml       (widgets/scrollbox.xml)
   307 diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml
   305 diff --git a/toolkit/content/widgets/dialog-kde.xml b/toolkit/content/widgets/dialog-kde.xml
   308 new file mode 100644
   306 new file mode 100644
   309 --- /dev/null
   307 --- /dev/null
   310 +++ b/toolkit/content/widgets/dialog-kde.xml
   308 +++ b/toolkit/content/widgets/dialog-kde.xml
   311 @@ -0,0 +1,451 @@
   309 @@ -0,0 +1,449 @@
   312 +<?xml version="1.0"?>
   310 +<?xml version="1.0"?>
   313 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
   311 +<!-- This Source Code Form is subject to the terms of the Mozilla Public
   314 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
   312 +   - License, v. 2.0. If a copy of the MPL was not distributed with this
   315 +   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
   313 +   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
   316 +
   314 +
   726 +      </method>
   724 +      </method>
   727 +
   725 +
   728 +    </implementation>
   726 +    </implementation>
   729 +    
   727 +    
   730 +    <handlers>
   728 +    <handlers>
   731 +      <handler event="keypress" keycode="VK_ENTER"
       
   732 +               group="system" action="this._hitEnter(event);"/>
       
   733 +      <handler event="keypress" keycode="VK_RETURN"
   729 +      <handler event="keypress" keycode="VK_RETURN"
   734 +               group="system" action="this._hitEnter(event);"/>
   730 +               group="system" action="this._hitEnter(event);"/>
   735 +      <handler event="keypress" keycode="VK_ESCAPE" group="system">
   731 +      <handler event="keypress" keycode="VK_ESCAPE" group="system">
   736 +        if (!event.defaultPrevented)
   732 +        if (!event.defaultPrevented)
   737 +          this.cancelDialog();
   733 +          this.cancelDialog();
  2195 +}
  2191 +}
  2196 +
  2192 +
  2197 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
  2193 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
  2198 --- a/toolkit/xre/moz.build
  2194 --- a/toolkit/xre/moz.build
  2199 +++ b/toolkit/xre/moz.build
  2195 +++ b/toolkit/xre/moz.build
  2200 @@ -45,17 +45,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt
  2196 @@ -43,17 +43,19 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt
       
  2197      GENERATED_SOURCES += [
       
  2198          'moc_nsNativeAppSupportQt.cpp',
       
  2199      ]
       
  2200      SOURCES += [
  2201          'nsNativeAppSupportQt.cpp',
  2201          'nsNativeAppSupportQt.cpp',
  2202          'nsQAppInstance.cpp',
  2202          'nsQAppInstance.cpp',
  2203      ]
       
  2204  elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2':
       
  2205      SOURCES += [
       
  2206          'nsNativeAppSupportOS2.cpp',
       
  2207      ]
  2203      ]
  2208  elif CONFIG['MOZ_ENABLE_GTK']:
  2204  elif CONFIG['MOZ_ENABLE_GTK']:
  2209 +    EXPORTS += ['nsKDEUtils.h']
  2205 +    EXPORTS += ['nsKDEUtils.h']
  2210      UNIFIED_SOURCES += [
  2206      UNIFIED_SOURCES += [
  2211 +        'nsKDEUtils.cpp',
  2207 +        'nsKDEUtils.cpp',
  2615 +
  2611 +
  2616 +#endif // nsKDEUtils
  2612 +#endif // nsKDEUtils
  2617 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
  2613 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in
  2618 --- a/uriloader/exthandler/Makefile.in
  2614 --- a/uriloader/exthandler/Makefile.in
  2619 +++ b/uriloader/exthandler/Makefile.in
  2615 +++ b/uriloader/exthandler/Makefile.in
  2620 @@ -19,9 +19,10 @@ endif
  2616 @@ -6,9 +6,10 @@
  2621  ifdef MOZ_ENABLE_DBUS
  2617  ifdef MOZ_ENABLE_DBUS
  2622  OS_INCLUDES   += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
  2618  OS_INCLUDES   += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS)
  2623  endif
  2619  endif
  2624  
  2620  
  2625  include $(topsrcdir)/config/rules.mk
  2621  include $(topsrcdir)/config/rules.mk
  2629 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  2625 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  2630  endif
  2626  endif
  2631 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
  2627 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
  2632 --- a/uriloader/exthandler/moz.build
  2628 --- a/uriloader/exthandler/moz.build
  2633 +++ b/uriloader/exthandler/moz.build
  2629 +++ b/uriloader/exthandler/moz.build
  2634 @@ -81,17 +81,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
  2630 @@ -80,17 +80,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
  2635  else:
  2631  else:
  2636      # These files can't be built in unified mode because they force NSPR logging.
  2632      # These files can't be built in unified mode because they force NSPR logging.
  2637      SOURCES += [
  2633      SOURCES += [
  2638          osdir + '/nsOSHelperAppService.cpp',
  2634          osdir + '/nsOSHelperAppService.cpp',
  2639      ]
  2635      ]
  3438  
  3434  
  3439  #endif
  3435  #endif
  3440 diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in
  3436 diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in
  3441 --- a/xpcom/components/Makefile.in
  3437 --- a/xpcom/components/Makefile.in
  3442 +++ b/xpcom/components/Makefile.in
  3438 +++ b/xpcom/components/Makefile.in
  3443 @@ -14,9 +14,10 @@ LOCAL_INCLUDES	= \
  3439 @@ -2,9 +2,10 @@
  3444  	-I$(topsrcdir)/chrome/src \
  3440  # This Source Code Form is subject to the terms of the Mozilla Public
  3445  	-I$(topsrcdir)/modules/libjar \
  3441  # License, v. 2.0. If a copy of the MPL was not distributed with this
  3446  	$(NULL)
  3442  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  3447  
  3443  
  3448  include $(topsrcdir)/config/rules.mk
  3444  include $(topsrcdir)/config/rules.mk
  3449  
  3445  
  3450  ifdef MOZ_WIDGET_GTK
  3446  ifdef MOZ_WIDGET_GTK
  3451  CXXFLAGS        += $(TK_CFLAGS)
  3447  CXXFLAGS        += $(TK_CFLAGS)
  3581          stABI == eBad)
  3577          stABI == eBad)
  3582        continue;
  3578        continue;
  3583  
  3579  
  3584      if (directive->regfunc) {
  3580      if (directive->regfunc) {
  3585        if (GeckoProcessType_Default != XRE_GetProcessType())
  3581        if (GeckoProcessType_Default != XRE_GetProcessType())
  3586 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in
       
  3587 --- a/xpcom/io/Makefile.in
       
  3588 +++ b/xpcom/io/Makefile.in
       
  3589 @@ -1,8 +1,8 @@
       
  3590  # This Source Code Form is subject to the terms of the Mozilla Public
       
  3591  # License, v. 2.0. If a copy of the MPL was not distributed with this
       
  3592  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
       
  3593  
       
  3594  MOZILLA_INTERNAL_API = 1
       
  3595  include $(topsrcdir)/config/rules.mk
       
  3596  
       
  3597 -LOCAL_INCLUDES	+= -I..
       
  3598 +LOCAL_INCLUDES	+= -I.. -I$(topsrcdir)/toolkit/xre
       
  3599 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
  3582 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
  3600 --- a/xpcom/io/nsLocalFileUnix.cpp
  3583 --- a/xpcom/io/nsLocalFileUnix.cpp
  3601 +++ b/xpcom/io/nsLocalFileUnix.cpp
  3584 +++ b/xpcom/io/nsLocalFileUnix.cpp
  3602 @@ -43,16 +43,17 @@
  3585 @@ -43,16 +43,17 @@
  3603  #include "nsIDirectoryEnumerator.h"
  3586  #include "nsIDirectoryEnumerator.h"
  3615  #include <Carbon/Carbon.h>
  3598  #include <Carbon/Carbon.h>
  3616  #include "CocoaFileUtils.h"
  3599  #include "CocoaFileUtils.h"
  3617  #include "prmem.h"
  3600  #include "prmem.h"
  3618  #include "plbase64.h"
  3601  #include "plbase64.h"
  3619  
  3602  
  3620 @@ -1811,46 +1812,52 @@ nsLocalFile::SetPersistentDescriptor(con
  3603 @@ -1813,46 +1814,52 @@ nsLocalFile::SetPersistentDescriptor(con
  3621      return InitWithNativePath(aPersistentDescriptor);
  3604      return InitWithNativePath(aPersistentDescriptor);
  3622  #endif
  3605  #endif
  3623  }
  3606  }
  3624  
  3607  
  3625  NS_IMETHODIMP
  3608  NS_IMETHODIMP
  3682        nsresult rv = CocoaFileUtils::RevealFileInFinder(url);
  3665        nsresult rv = CocoaFileUtils::RevealFileInFinder(url);
  3683        ::CFRelease(url);
  3666        ::CFRelease(url);
  3684        return rv;
  3667        return rv;
  3685      }
  3668      }
  3686      return NS_ERROR_FAILURE;
  3669      return NS_ERROR_FAILURE;
  3687 @@ -1858,16 +1865,23 @@ nsLocalFile::Reveal()
  3670 @@ -1860,16 +1867,23 @@ nsLocalFile::Reveal()
  3688      return NS_ERROR_FAILURE;
  3671      return NS_ERROR_FAILURE;
  3689  #endif
  3672  #endif
  3690  }
  3673  }
  3691  
  3674  
  3692  NS_IMETHODIMP
  3675  NS_IMETHODIMP