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 @@ -35,14 +35,15 @@ endif |
10 @@ -33,14 +33,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) |
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 |
28 +++ b/modules/libpref/src/Preferences.cpp |
28 +++ b/modules/libpref/src/Preferences.cpp |
29 @@ -26,16 +26,17 @@ |
29 @@ -27,16 +27,17 @@ |
30 #include "nsIZipReader.h" |
30 #include "nsIZipReader.h" |
31 #include "nsPrefBranch.h" |
31 #include "nsPrefBranch.h" |
32 #include "nsXPIDLString.h" |
32 #include "nsXPIDLString.h" |
33 #include "nsCRT.h" |
33 #include "nsCRT.h" |
34 #include "nsCOMArray.h" |
34 #include "nsCOMArray.h" |
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 @@ -1227,28 +1246,40 @@ static nsresult pref_InitInitialObjects( |
101 @@ -1229,28 +1248,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) |
2135 |
2135 |
2136 NS_IMETHODIMP |
2136 NS_IMETHODIMP |
2137 nsUnixSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly) |
2137 nsUnixSystemProxySettings::GetMainThreadOnly(bool *aMainThreadOnly) |
2138 { |
2138 { |
2139 // dbus prevents us from being threadsafe, but this routine should not block anyhow |
2139 // dbus prevents us from being threadsafe, but this routine should not block anyhow |
2140 @@ -498,16 +501,19 @@ nsUnixSystemProxySettings::GetProxyFromG |
2140 @@ -504,16 +507,19 @@ nsUnixSystemProxySettings::GetProxyFromG |
2141 |
2141 |
2142 nsresult |
2142 nsresult |
2143 nsUnixSystemProxySettings::GetProxyForURI(const nsACString & aSpec, |
2143 nsUnixSystemProxySettings::GetProxyForURI(const nsACString & aSpec, |
2144 const nsACString & aScheme, |
2144 const nsACString & aScheme, |
2145 const nsACString & aHost, |
2145 const nsACString & aHost, |
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 @@ -44,18 +44,20 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt |
2198 @@ -43,18 +43,20 @@ 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 CPP_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 CPP_SOURCES += [ |
2208 SOURCES += [ |
2209 'nsNativeAppSupportUnix.cpp', |
2209 - 'nsNativeAppSupportUnix.cpp', |
2210 + 'nsKDEUtils.cpp' |
2210 + 'nsKDEUtils.cpp', |
|
2211 + 'nsNativeAppSupportUnix.cpp' |
2211 ] |
2212 ] |
2212 else: |
2213 else: |
2213 CPP_SOURCES += [ |
2214 SOURCES += [ |
2214 'nsNativeAppSupportDefault.cpp', |
2215 'nsNativeAppSupportDefault.cpp', |
2215 ] |
2216 ] |
2216 |
2217 |
2217 if CONFIG['MOZ_X11']: |
2218 if CONFIG['MOZ_X11']: |
2218 CPP_SOURCES += [ |
2219 SOURCES += [ |
2219 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp |
2220 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp |
2220 new file mode 100644 |
2221 new file mode 100644 |
2221 --- /dev/null |
2222 --- /dev/null |
2222 +++ b/toolkit/xre/nsKDEUtils.cpp |
2223 +++ b/toolkit/xre/nsKDEUtils.cpp |
2223 @@ -0,0 +1,339 @@ |
2224 @@ -0,0 +1,339 @@ |
2614 + |
2615 + |
2615 +#endif // nsKDEUtils |
2616 +#endif // nsKDEUtils |
2616 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in |
2617 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in |
2617 --- a/uriloader/exthandler/Makefile.in |
2618 --- a/uriloader/exthandler/Makefile.in |
2618 +++ b/uriloader/exthandler/Makefile.in |
2619 +++ b/uriloader/exthandler/Makefile.in |
2619 @@ -45,9 +45,10 @@ ifdef MOZ_ENABLE_DBUS |
2620 @@ -44,9 +44,10 @@ endif |
|
2621 ifdef MOZ_ENABLE_DBUS |
2620 LOCAL_INCLUDES += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) |
2622 LOCAL_INCLUDES += $(TK_CFLAGS) $(MOZ_DBUS_CFLAGS) |
2621 endif |
2623 endif |
2622 |
2624 |
2623 include $(topsrcdir)/config/rules.mk |
2625 include $(topsrcdir)/config/rules.mk |
2624 include $(topsrcdir)/ipc/chromium/chromium-config.mk |
|
2625 |
2626 |
2626 ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT))) |
2627 ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT))) |
2627 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS) |
2628 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS) |
2628 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
2629 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
2629 endif |
2630 endif |
2630 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build |
2631 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build |
2631 --- a/uriloader/exthandler/moz.build |
2632 --- a/uriloader/exthandler/moz.build |
2632 +++ b/uriloader/exthandler/moz.build |
2633 +++ b/uriloader/exthandler/moz.build |
2633 @@ -73,16 +73,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco |
2634 @@ -73,17 +73,19 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco |
2634 ] |
2635 ] |
2635 else: |
2636 else: |
2636 CPP_SOURCES += [ |
2637 SOURCES += [ |
2637 'nsOSHelperAppService.cpp', |
2638 osdir + '/nsOSHelperAppService.cpp', |
2638 ] |
2639 ] |
2639 |
2640 |
2640 if CONFIG['MOZ_ENABLE_GTK']: |
2641 if CONFIG['MOZ_ENABLE_GTK']: |
2641 CPP_SOURCES += [ |
2642 SOURCES += [ |
2642 + 'nsCommonRegistry.cpp', |
2643 + 'unix/nsCommonRegistry.cpp', |
2643 + 'nsKDERegistry.cpp', |
2644 'unix/nsGNOMERegistry.cpp', |
2644 'nsGNOMERegistry.cpp', |
2645 + 'unix/nsKDERegistry.cpp', |
2645 'nsMIMEInfoUnix.cpp', |
2646 'unix/nsMIMEInfoUnix.cpp', |
2646 ] |
2647 ] |
2647 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
2648 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
2648 CPP_SOURCES += [ |
2649 SOURCES += [ |
2649 'nsMIMEInfoAndroid.cpp', |
2650 'android/nsAndroidHandlerApp.cpp', |
2650 'nsAndroidHandlerApp.cpp', |
2651 'android/nsExternalSharingAppService.cpp', |
2651 'nsExternalSharingAppService.cpp', |
2652 'android/nsExternalURLHandlerService.cpp', |
|
2653 'android/nsMIMEInfoAndroid.cpp', |
2652 diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
2654 diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
2653 new file mode 100644 |
2655 new file mode 100644 |
2654 --- /dev/null |
2656 --- /dev/null |
2655 +++ b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
2657 +++ b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
2656 @@ -0,0 +1,54 @@ |
2658 @@ -0,0 +1,54 @@ |
3067 } |
3069 } |
3068 } |
3070 } |
3069 #endif |
3071 #endif |
3070 |
3072 |
3071 // Now look up our extensions |
3073 // Now look up our extensions |
3072 diff --git a/widget/gtk2/Makefile.in b/widget/gtk2/Makefile.in |
3074 diff --git a/widget/gtk/Makefile.in b/widget/gtk/Makefile.in |
3073 --- a/widget/gtk2/Makefile.in |
3075 --- a/widget/gtk/Makefile.in |
3074 +++ b/widget/gtk2/Makefile.in |
3076 +++ b/widget/gtk/Makefile.in |
3075 @@ -38,11 +38,14 @@ DEFINES += -DCAIRO_GFX -DMOZ_APP_NAME=' |
3077 @@ -26,11 +26,14 @@ DEFINES += -DCAIRO_GFX -DMOZ_APP_NAME=' |
3076 |
3078 |
3077 INCLUDES += \ |
3079 INCLUDES += \ |
3078 -I$(srcdir)/../xpwidgets \ |
3080 -I$(srcdir)/../xpwidgets \ |
3079 -I$(srcdir)/../shared \ |
3081 -I$(srcdir)/../shared \ |
3080 -I$(topsrcdir)/layout/generic \ |
3082 -I$(topsrcdir)/layout/generic \ |
3085 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
3087 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
3086 + |
3088 + |
3087 ifdef MOZ_X11 |
3089 ifdef MOZ_X11 |
3088 INCLUDES += -I$(srcdir)/../shared/x11 |
3090 INCLUDES += -I$(srcdir)/../shared/x11 |
3089 endif |
3091 endif |
3090 diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp |
3092 diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp |
3091 --- a/widget/gtk2/nsFilePicker.cpp |
3093 --- a/widget/gtk/nsFilePicker.cpp |
3092 +++ b/widget/gtk2/nsFilePicker.cpp |
3094 +++ b/widget/gtk/nsFilePicker.cpp |
3093 @@ -1,32 +1,34 @@ |
3095 @@ -1,32 +1,34 @@ |
3094 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
3096 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
3095 /* This Source Code Form is subject to the terms of the Mozilla Public |
3097 /* This Source Code Form is subject to the terms of the Mozilla Public |
3096 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3098 * 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/. */ |
3099 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
3144 CopyUTF16toUTF8(aFilter, filter); |
3146 CopyUTF16toUTF8(aFilter, filter); |
3145 CopyUTF16toUTF8(aTitle, name); |
3147 CopyUTF16toUTF8(aTitle, name); |
3146 |
3148 |
3147 mFilters.AppendElement(filter); |
3149 mFilters.AppendElement(filter); |
3148 mFilterNames.AppendElement(name); |
3150 mFilterNames.AppendElement(name); |
3149 @@ -349,16 +353,32 @@ nsFilePicker::Show(int16_t *aReturn) |
3151 @@ -350,16 +354,32 @@ nsFilePicker::Show(int16_t *aReturn) |
3150 |
3152 |
3151 NS_IMETHODIMP |
3153 NS_IMETHODIMP |
3152 nsFilePicker::Open(nsIFilePickerShownCallback *aCallback) |
3154 nsFilePicker::Open(nsIFilePickerShownCallback *aCallback) |
3153 { |
3155 { |
3154 // Can't show two dialogs concurrently with the same filepicker |
3156 // Can't show two dialogs concurrently with the same filepicker |
3177 GtkWindow *parent_widget = |
3179 GtkWindow *parent_widget = |
3178 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
3180 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
3179 |
3181 |
3180 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
3182 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
3181 const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) |
3183 const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) |
3182 @@ -537,8 +557,235 @@ nsFilePicker::Done(GtkWidget* file_choos |
3184 @@ -538,8 +558,235 @@ nsFilePicker::Done(GtkWidget* file_choos |
3183 if (mCallback) { |
3185 if (mCallback) { |
3184 mCallback->Done(result); |
3186 mCallback->Done(result); |
3185 mCallback = nullptr; |
3187 mCallback = nullptr; |
3186 } else { |
3188 } else { |
3187 mResult = result; |
3189 mResult = result; |
3413 + *aReturn = nsIFilePicker::returnCancel; |
3415 + *aReturn = nsIFilePicker::returnCancel; |
3414 + } |
3416 + } |
3415 + return NS_OK; |
3417 + return NS_OK; |
3416 + } |
3418 + } |
3417 + |
3419 + |
3418 diff --git a/widget/gtk2/nsFilePicker.h b/widget/gtk2/nsFilePicker.h |
3420 diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h |
3419 --- a/widget/gtk2/nsFilePicker.h |
3421 --- a/widget/gtk/nsFilePicker.h |
3420 +++ b/widget/gtk2/nsFilePicker.h |
3422 +++ b/widget/gtk/nsFilePicker.h |
3421 @@ -66,11 +66,17 @@ protected: |
3423 @@ -66,11 +66,17 @@ protected: |
3422 nsString mDefault; |
3424 nsString mDefault; |
3423 nsString mDefaultExtension; |
3425 nsString mDefaultExtension; |
3424 |
3426 |
3425 nsTArray<nsCString> mFilters; |
3427 nsTArray<nsCString> mFilters; |
3545 #endif |
3547 #endif |
3546 bool platform = false; |
3548 bool platform = false; |
3547 bool contentAccessible = false; |
3549 bool contentAccessible = false; |
3548 + TriState stDesktop = eUnspecified; |
3550 + TriState stDesktop = eUnspecified; |
3549 |
3551 |
3550 while (NULL != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) { |
3552 while (nullptr != (token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) && ok) { |
3551 ToLowerCase(token); |
3553 ToLowerCase(token); |
3552 NS_ConvertASCIItoUTF16 wtoken(token); |
3554 NS_ConvertASCIItoUTF16 wtoken(token); |
3553 |
3555 |
3554 if (CheckStringFlag(kApplication, wtoken, appID, stApp) || |
3556 if (CheckStringFlag(kApplication, wtoken, appID, stApp) || |
3555 CheckStringFlag(kOs, wtoken, osTarget, stOs) || |
3557 CheckStringFlag(kOs, wtoken, osTarget, stOs) || |
3582 if (directive->regfunc) { |
3584 if (directive->regfunc) { |
3583 if (GeckoProcessType_Default != XRE_GetProcessType()) |
3585 if (GeckoProcessType_Default != XRE_GetProcessType()) |
3584 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in |
3586 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in |
3585 --- a/xpcom/io/Makefile.in |
3587 --- a/xpcom/io/Makefile.in |
3586 +++ b/xpcom/io/Makefile.in |
3588 +++ b/xpcom/io/Makefile.in |
3587 @@ -7,9 +7,9 @@ include $(topsrcdir)/config/rules.mk |
3589 @@ -6,9 +6,9 @@ MOZILLA_INTERNAL_API = 1 |
3588 include $(topsrcdir)/ipc/chromium/chromium-config.mk |
3590 include $(topsrcdir)/config/rules.mk |
3589 |
3591 |
3590 ifeq ($(OS_ARCH),Linux) |
3592 ifeq ($(OS_ARCH),Linux) |
3591 ifneq (,$(findstring lib64,$(libdir))) |
3593 ifneq (,$(findstring lib64,$(libdir))) |
3592 DEFINES += -DHAVE_USR_LIB64_DIR |
3594 DEFINES += -DHAVE_USR_LIB64_DIR |
3593 endif |
3595 endif |
3596 -LOCAL_INCLUDES += -I.. |
3598 -LOCAL_INCLUDES += -I.. |
3597 +LOCAL_INCLUDES += -I.. -I$(topsrcdir)/toolkit/xre |
3599 +LOCAL_INCLUDES += -I.. -I$(topsrcdir)/toolkit/xre |
3598 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp |
3600 diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp |
3599 --- a/xpcom/io/nsLocalFileUnix.cpp |
3601 --- a/xpcom/io/nsLocalFileUnix.cpp |
3600 +++ b/xpcom/io/nsLocalFileUnix.cpp |
3602 +++ b/xpcom/io/nsLocalFileUnix.cpp |
3601 @@ -42,16 +42,17 @@ |
3603 @@ -43,16 +43,17 @@ |
3602 #include "prproces.h" |
|
3603 #include "nsIDirectoryEnumerator.h" |
3604 #include "nsIDirectoryEnumerator.h" |
3604 #include "nsISimpleEnumerator.h" |
3605 #include "nsISimpleEnumerator.h" |
3605 #include "private/pprio.h" |
3606 #include "private/pprio.h" |
|
3607 #include "prlink.h" |
3606 |
3608 |
3607 #ifdef MOZ_WIDGET_GTK |
3609 #ifdef MOZ_WIDGET_GTK |
3608 #include "nsIGIOService.h" |
3610 #include "nsIGIOService.h" |
3609 #include "nsIGnomeVFSService.h" |
3611 #include "nsIGnomeVFSService.h" |
3610 +#include "nsKDEUtils.h" |
3612 +#include "nsKDEUtils.h" |