mozilla-kde.patch
changeset 766 e0b23b7851e9
parent 760 7c3ac3010cc6
child 779 354c672efefa
equal deleted inserted replaced
765:0955f22b3f4f 766:e0b23b7851e9
    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 @@ -1134,16 +1135,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    47 @@ -1167,16 +1168,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 @@ -1159,17 +1178,17 @@ static nsresult pref_LoadPrefsInDirList(
    82 @@ -1192,17 +1211,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 @@ -1263,26 +1282,38 @@ static nsresult pref_InitInitialObjects(
   101 @@ -1296,26 +1315,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)
   266        if (fileURL &&
   266        if (fileURL &&
   267            NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) &&
   267            NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) &&
   268 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
   269 --- a/toolkit/content/jar.mn
   269 --- a/toolkit/content/jar.mn
   270 +++ b/toolkit/content/jar.mn
   270 +++ b/toolkit/content/jar.mn
   271 @@ -55,29 +55,33 @@ toolkit.jar:
   271 @@ -54,29 +54,33 @@ toolkit.jar:
   272     content/global/viewZoomOverlay.js          (viewZoomOverlay.js)
   272     content/global/viewZoomOverlay.js          (viewZoomOverlay.js)
   273  *+ content/global/bindings/autocomplete.xml    (widgets/autocomplete.xml)
   273  *+ content/global/bindings/autocomplete.xml    (widgets/autocomplete.xml)
   274     content/global/bindings/browser.xml         (widgets/browser.xml)
   274     content/global/bindings/browser.xml         (widgets/browser.xml)
   275     content/global/bindings/button.xml          (widgets/button.xml)
   275     content/global/bindings/button.xml          (widgets/button.xml)
   276     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
   276     content/global/bindings/checkbox.xml        (widgets/checkbox.xml)
   304     content/global/bindings/scrollbox.xml       (widgets/scrollbox.xml)
   304     content/global/bindings/scrollbox.xml       (widgets/scrollbox.xml)
   305 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
   306 new file mode 100644
   306 new file mode 100644
   307 --- /dev/null
   307 --- /dev/null
   308 +++ b/toolkit/content/widgets/dialog-kde.xml
   308 +++ b/toolkit/content/widgets/dialog-kde.xml
   309 @@ -0,0 +1,449 @@
   309 @@ -0,0 +1,455 @@
   310 +<?xml version="1.0"?>
   310 +<?xml version="1.0"?>
   311 +<!-- 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
   312 +   - 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
   313 +   - 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/. -->
   314 +
   314 +
   338 +        <xul:spacer anonid="spacer" flex="1"/>
   338 +        <xul:spacer anonid="spacer" flex="1"/>
   339 +        <xul:button dlgtype="cancel" class="dialog-button"/>
   339 +        <xul:button dlgtype="cancel" class="dialog-button"/>
   340 +        <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
   340 +        <xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
   341 +#elif XP_UNIX
   341 +#elif XP_UNIX
   342 +                >
   342 +                >
   343 +	<xul:button dlgtype="help" class="dialog-button" hidden="true"/>
   343 +        <xul:button dlgtype="help" class="dialog-button" hidden="true"/>
   344 +	<xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
   344 +	<xul:button dlgtype="extra2" class="dialog-button" hidden="true"/>
   345 +	<xul:spacer anonid="spacer" flex="1" hidden="true"/>
   345 +	<xul:spacer anonid="spacer" flex="1"/>
   346 +	<xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
   346 +	<xul:button dlgtype="accept" class="dialog-button" xbl:inherits="disabled=buttondisabledaccept"/>
   347 +	<xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
   347 +	<xul:button dlgtype="extra1" class="dialog-button" hidden="true"/>
   348 +	<xul:button dlgtype="cancel" class="dialog-button"/>
   348 +	<xul:button dlgtype="cancel" class="dialog-button"/>
   349 +	<xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
   349 +	<xul:button dlgtype="disclosure" class="dialog-button" hidden="true"/>
   350 +#else
   350 +#else
   673 +        <![CDATA[
   673 +        <![CDATA[
   674 +          var button = this.getButton(aDlgType);
   674 +          var button = this.getButton(aDlgType);
   675 +          if (!button.disabled) {
   675 +          if (!button.disabled) {
   676 +            var noCancel = this._fireButtonEvent(aDlgType);
   676 +            var noCancel = this._fireButtonEvent(aDlgType);
   677 +            if (noCancel) {
   677 +            if (noCancel) {
   678 +              if (aDlgType == "accept" || aDlgType == "cancel")
   678 +              if (aDlgType == "accept" || aDlgType == "cancel") {
       
   679 +                var closingEvent = new CustomEvent("dialogclosing", {
       
   680 +                  bubbles: true,
       
   681 +                  detail: { button: aDlgType },
       
   682 +                });
       
   683 +                this.dispatchEvent(closingEvent);
   679 +                window.close();
   684 +                window.close();
       
   685 +              }
   680 +            }
   686 +            }
   681 +            return noCancel;
   687 +            return noCancel;
   682 +          }
   688 +          }
   683 +          return true;
   689 +          return true;
   684 +        ]]>
   690 +        ]]>
  2219  else:
  2225  else:
  2220      UNIFIED_SOURCES += [
  2226      UNIFIED_SOURCES += [
  2221          'nsNativeAppSupportDefault.cpp',
  2227          'nsNativeAppSupportDefault.cpp',
  2222      ]
  2228      ]
  2223  
  2229  
  2224  if CONFIG['MOZ_X11']:
  2230  if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
  2225 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
  2231 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp
  2226 new file mode 100644
  2232 new file mode 100644
  2227 --- /dev/null
  2233 --- /dev/null
  2228 +++ b/toolkit/xre/nsKDEUtils.cpp
  2234 +++ b/toolkit/xre/nsKDEUtils.cpp
  2229 @@ -0,0 +1,339 @@
  2235 @@ -0,0 +1,339 @@
  3090  
  3096  
  3091    // Now look up our extensions
  3097    // Now look up our extensions
  3092 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in
  3098 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in
  3093 --- a/widget/gtk/Makefile.in
  3099 --- a/widget/gtk/Makefile.in
  3094 +++ b/widget/gtk/Makefile.in
  3100 +++ b/widget/gtk/Makefile.in
  3095 @@ -3,11 +3,13 @@
  3101 @@ -3,14 +3,16 @@
  3096  # License, v. 2.0. If a copy of the MPL was not distributed with this
  3102  # License, v. 2.0. If a copy of the MPL was not distributed with this
  3097  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  3103  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  3098  
  3104  
  3099  include $(topsrcdir)/config/rules.mk
  3105  include $(topsrcdir)/config/rules.mk
  3100  
  3106  
  3104 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  3110 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
  3105 +
  3111 +
  3106  CFLAGS          += $(TK_CFLAGS)
  3112  CFLAGS          += $(TK_CFLAGS)
  3107  CXXFLAGS        += $(TK_CFLAGS)
  3113  CXXFLAGS        += $(TK_CFLAGS)
  3108  
  3114  
       
  3115  ifdef MOZ_ENABLE_DBUS
       
  3116  CXXFLAGS        += $(MOZ_DBUS_GLIB_CFLAGS)
       
  3117  endif
  3109 diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
  3118 diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
  3110 --- a/widget/gtk/nsFilePicker.cpp
  3119 --- a/widget/gtk/nsFilePicker.cpp
  3111 +++ b/widget/gtk/nsFilePicker.cpp
  3120 +++ b/widget/gtk/nsFilePicker.cpp
  3112 @@ -1,32 +1,34 @@
  3121 @@ -1,32 +1,34 @@
  3113  /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  3122  /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */