mozilla-kde.patch
changeset 612 3006d73ad2fa
parent 609 d2bfc69375aa
child 637 73640b76d6c3
equal deleted inserted replaced
611:bcb3d1af73f7 612:3006d73ad2fa
     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 @@ -45,14 +45,16 @@ GREPREF_FILES = $(topsrcdir)/netwerk/bas
    10 @@ -54,14 +54,15 @@ endif
    11  # Optimizer bug with GCC 3.2.2 on OS/2
    11  # Optimizer bug with GCC 3.2.2 on OS/2
    12  ifeq ($(OS_ARCH), OS2)
    12  ifeq ($(OS_ARCH), OS2)
    13  nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
    13  nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
    14  	$(REPORT_BUILD)
    14  	$(REPORT_BUILD)
    15  	@$(MAKE_DEPS_AUTO_CXX)
    15  	@$(MAKE_DEPS_AUTO_CXX)
    16  	$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:-O2=-O1) $(_VPATH_SRCS)
    16  	$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:-O2=-O1) $(_VPATH_SRCS)
    17  endif
    17  endif
    18  
    18  
    19 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
    19 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
    20 +
    20  
    21  
    21  greprefs.js: $(grepref_files)
    22  greprefs.js: $(GREPREF_FILES)
       
    23  	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ > $@
    22  	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(PREF_PPFLAGS) $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $^ > $@
    24  
    23  
    25  libs:: greprefs.js
    24  libs:: greprefs.js
    26  	$(INSTALL) $^ $(DIST)/bin/
    25  	$(INSTALL) $^ $(DIST)/bin/
    27 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
    37  #include "nsXPCOMCID.h"
    36  #include "nsXPCOMCID.h"
    38  #include "nsAutoPtr.h"
    37  #include "nsAutoPtr.h"
    39 +#include "nsKDEUtils.h"
    38 +#include "nsKDEUtils.h"
    40  
    39  
    41  #include "nsQuickSort.h"
    40  #include "nsQuickSort.h"
    42  #include "prmem.h"
       
    43  #include "pldhash.h"
    41  #include "pldhash.h"
    44  
    42  
    45  #include "prefapi.h"
    43  #include "prefapi.h"
    46  #include "prefread.h"
    44  #include "prefread.h"
    47  #include "prefapi_private_data.h"
    45  #include "prefapi_private_data.h"
    48 @@ -950,16 +951,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    46  
       
    47 @@ -946,16 +947,34 @@ pref_LoadPrefsInDir(nsIFile* aDir, char 
    49  
    48  
    50  static nsresult pref_LoadPrefsInDirList(const char *listId)
    49  static nsresult pref_LoadPrefsInDirList(const char *listId)
    51  {
    50  {
    52    nsresult rv;
    51    nsresult rv;
    53    nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
    52    nsCOMPtr<nsIProperties> dirSvc(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
    78                getter_AddRefs(list));
    77                getter_AddRefs(list));
    79    if (!list)
    78    if (!list)
    80      return NS_OK;
    79      return NS_OK;
    81  
    80  
    82    bool hasMore;
    81    bool hasMore;
    83 @@ -975,17 +994,17 @@ static nsresult pref_LoadPrefsInDirList(
    82 @@ -971,17 +990,17 @@ static nsresult pref_LoadPrefsInDirList(
    84  
    83  
    85      nsAutoCString leaf;
    84      nsAutoCString leaf;
    86      path->GetNativeLeafName(leaf);
    85      path->GetNativeLeafName(leaf);
    87  
    86  
    88      // 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?
    97  
    96  
    98  static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
    97  static nsresult pref_ReadPrefFromJar(nsZipArchive* jarReader, const char *name)
    99  {
    98  {
   100    nsZipItemPtr<char> manifest(jarReader, name, true);
    99    nsZipItemPtr<char> manifest(jarReader, name, true);
   101    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
   100    NS_ENSURE_TRUE(manifest.Buffer(), NS_ERROR_NOT_AVAILABLE);
   102 @@ -1079,28 +1098,40 @@ static nsresult pref_InitInitialObjects(
   101 @@ -1075,28 +1094,40 @@ static nsresult pref_InitInitialObjects(
   103    /* 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 */
   104    static const char* specialFiles[] = {
   103    static const char* specialFiles[] = {
   105  #if defined(XP_MACOSX)
   104  #if defined(XP_MACOSX)
   106      "macprefs.js"
   105      "macprefs.js"
   107  #elif defined(XP_WIN)
   106  #elif defined(XP_WIN)
   178  
   177  
   179  #ifdef MOZ_WIDGET_ANDROID
   178  #ifdef MOZ_WIDGET_ANDROID
   180  #include "AndroidBridge.h"
   179  #include "AndroidBridge.h"
   181  #endif
   180  #endif
   182  
   181  
   183 @@ -2740,16 +2744,25 @@ nsDownload::SetState(DownloadState aStat
   182 @@ -2739,16 +2743,25 @@ nsDownload::SetState(DownloadState aStat
   184        nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
   183        nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID));
   185  
   184  
   186        // Master pref to control this function.
   185        // Master pref to control this function.
   187        bool showTaskbarAlert = true;
   186        bool showTaskbarAlert = true;
   188        if (pref)
   187        if (pref)
   205          int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
   204          int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC;
   206          int64_t goat = PR_Now() - mStartTime;
   205          int64_t goat = PR_Now() - mStartTime;
   207          showTaskbarAlert = goat > alertIntervalUSec;
   206          showTaskbarAlert = goat > alertIntervalUSec;
   208  
   207  
   209 @@ -2775,19 +2788,20 @@ nsDownload::SetState(DownloadState aStat
   208 @@ -2775,19 +2788,20 @@ nsDownload::SetState(DownloadState aStat
   210                // If downloads are automatically removed per the user's
       
   211                // retention policy, there's no reason to make the text clickable
   209                // retention policy, there's no reason to make the text clickable
   212                // because if it is, they'll click open the download manager and
   210                // because if it is, they'll click open the download manager and
   213                // the items they downloaded will have been removed.
   211                // the items they downloaded will have been removed.
   214                alerts->ShowAlertNotification(
   212                alerts->ShowAlertNotification(
   215                    NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
   213                    NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title,
   216                    message, !removeWhenDone, EmptyString(), mDownloadManager,
   214                    message, !removeWhenDone,
   217                    EmptyString());
   215                    mPrivate ? NS_LITERAL_STRING("private") : NS_LITERAL_STRING("non-private"),
       
   216                    mDownloadManager, EmptyString());
   218 -            }
   217 -            }
   219 +          }
   218 +          }
   220          }
   219          }
   221        }
   220        }
   222 +      }
   221 +      }
  1364 +
  1363 +
  1365 +        var lastPane = null;
  1364 +        var lastPane = null;
  1366 +        if (this.lastSelected) {
  1365 +        if (this.lastSelected) {
  1367 +          lastPane = document.getElementById(this.lastSelected);
  1366 +          lastPane = document.getElementById(this.lastSelected);
  1368 +          if (!lastPane) {
  1367 +          if (!lastPane) {
  1369 +            this.lastSelected = null;
  1368 +            this.lastSelected = "";
  1370 +          }
  1369 +          }
  1371 +        }
  1370 +        }
  1372 +
  1371 +
  1373 +        var paneToLoad;
  1372 +        var paneToLoad;
  1374 +        if ("arguments" in window && window.arguments[0] && document.getElementById(window.arguments[0]) && document.getElementById(window.arguments[0]).nodeName == "prefpane") {
  1373 +        if ("arguments" in window && window.arguments[0] && document.getElementById(window.arguments[0]) && document.getElementById(window.arguments[0]).nodeName == "prefpane") {