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 @@ -56,14 +56,15 @@ endif |
10 @@ -49,14 +49,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) |
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 @@ -1095,28 +1114,40 @@ static nsresult pref_InitInitialObjects( |
101 @@ -1101,28 +1120,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) |
182 self.base = base |
182 self.base = base |
183 self.flags = Flags(*flags) |
183 self.flags = Flags(*flags) |
184 diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in |
184 diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in |
185 --- a/toolkit/components/downloads/Makefile.in |
185 --- a/toolkit/components/downloads/Makefile.in |
186 +++ b/toolkit/components/downloads/Makefile.in |
186 +++ b/toolkit/components/downloads/Makefile.in |
187 @@ -32,9 +32,11 @@ ifndef MOZ_SUITE |
187 @@ -23,9 +23,11 @@ ifndef MOZ_SUITE |
188 EXTRA_COMPONENTS = \ |
188 DISABLED_EXTRA_COMPONENTS = \ |
189 nsDownloadManagerUI.js \ |
189 nsDownloadManagerUI.js \ |
190 nsDownloadManagerUI.manifest \ |
190 nsDownloadManagerUI.manifest \ |
191 $(NULL) |
191 $(NULL) |
192 endif |
192 endif |
193 |
193 |
218 |
218 |
219 #ifdef MOZ_WIDGET_ANDROID |
219 #ifdef MOZ_WIDGET_ANDROID |
220 #include "AndroidBridge.h" |
220 #include "AndroidBridge.h" |
221 #endif |
221 #endif |
222 |
222 |
223 @@ -2603,16 +2607,25 @@ nsDownload::SetState(DownloadState aStat |
223 @@ -2609,16 +2613,25 @@ nsDownload::SetState(DownloadState aStat |
224 nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID)); |
224 nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID)); |
225 |
225 |
226 // Master pref to control this function. |
226 // Master pref to control this function. |
227 bool showTaskbarAlert = true; |
227 bool showTaskbarAlert = true; |
228 if (pref) |
228 if (pref) |
244 |
244 |
245 int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC; |
245 int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC; |
246 int64_t goat = PR_Now() - mStartTime; |
246 int64_t goat = PR_Now() - mStartTime; |
247 showTaskbarAlert = goat > alertIntervalUSec; |
247 showTaskbarAlert = goat > alertIntervalUSec; |
248 |
248 |
249 @@ -2639,19 +2652,20 @@ nsDownload::SetState(DownloadState aStat |
249 @@ -2645,19 +2658,20 @@ nsDownload::SetState(DownloadState aStat |
250 // retention policy, there's no reason to make the text clickable |
250 // retention policy, there's no reason to make the text clickable |
251 // because if it is, they'll click open the download manager and |
251 // because if it is, they'll click open the download manager and |
252 // the items they downloaded will have been removed. |
252 // the items they downloaded will have been removed. |
253 alerts->ShowAlertNotification( |
253 alerts->ShowAlertNotification( |
254 NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title, |
254 NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title, |
2198 + return NS_ERROR_FAILURE; |
2198 + return NS_ERROR_FAILURE; |
2199 + aResult = result[0]; |
2199 + aResult = result[0]; |
2200 + return NS_OK; |
2200 + return NS_OK; |
2201 +} |
2201 +} |
2202 + |
2202 + |
2203 diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in |
2203 diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build |
2204 --- a/toolkit/xre/Makefile.in |
2204 --- a/toolkit/xre/moz.build |
2205 +++ b/toolkit/xre/Makefile.in |
2205 +++ b/toolkit/xre/moz.build |
2206 @@ -60,17 +60,18 @@ DEFINES += -DWIN32_LEAN_AND_MEAN -DUNICO |
2206 @@ -38,18 +38,20 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt |
2207 else |
2207 'nsNativeAppSupportQt.cpp', |
2208 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa) |
2208 'nsQAppInstance.cpp', |
2209 CMMSRCS = nsNativeAppSupportCocoa.mm |
2209 ] |
2210 else |
2210 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'os2': |
2211 ifeq ($(MOZ_WIDGET_TOOLKIT),os2) |
2211 CPP_SOURCES += [ |
2212 CPPSRCS += nsNativeAppSupportOS2.cpp |
2212 'nsNativeAppSupportOS2.cpp', |
2213 else |
2213 ] |
2214 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) |
2214 elif CONFIG['MOZ_ENABLE_GTK']: |
2215 -CPPSRCS += nsNativeAppSupportUnix.cpp |
2215 + EXPORTS += ['nsKDEUtils.h'] |
2216 +CPPSRCS += nsNativeAppSupportUnix.cpp nsKDEUtils.cpp |
2216 CPP_SOURCES += [ |
2217 +EXPORTS += nsKDEUtils.h |
2217 'nsNativeAppSupportUnix.cpp', |
2218 else |
2218 + 'nsKDEUtils.cpp' |
2219 ifeq ($(MOZ_WIDGET_TOOLKIT),qt) |
2219 ] |
2220 MOCSRCS += moc_nsNativeAppSupportQt.cpp |
2220 else: |
2221 CPPSRCS += $(MOCSRCS) |
2221 CPP_SOURCES += [ |
2222 CPPSRCS += nsNativeAppSupportQt.cpp |
2222 'nsNativeAppSupportDefault.cpp', |
2223 CPPSRCS += nsQAppInstance.cpp |
2223 ] |
2224 else |
2224 |
2225 CPPSRCS += nsNativeAppSupportDefault.cpp |
2225 if CONFIG['MOZ_X11']: |
|
2226 CPP_SOURCES += [ |
2226 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp |
2227 diff --git a/toolkit/xre/nsKDEUtils.cpp b/toolkit/xre/nsKDEUtils.cpp |
2227 new file mode 100644 |
2228 new file mode 100644 |
2228 --- /dev/null |
2229 --- /dev/null |
2229 +++ b/toolkit/xre/nsKDEUtils.cpp |
2230 +++ b/toolkit/xre/nsKDEUtils.cpp |
2230 @@ -0,0 +1,339 @@ |
2231 @@ -0,0 +1,339 @@ |
2621 + |
2622 + |
2622 +#endif // nsKDEUtils |
2623 +#endif // nsKDEUtils |
2623 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in |
2624 diff --git a/uriloader/exthandler/Makefile.in b/uriloader/exthandler/Makefile.in |
2624 --- a/uriloader/exthandler/Makefile.in |
2625 --- a/uriloader/exthandler/Makefile.in |
2625 +++ b/uriloader/exthandler/Makefile.in |
2626 +++ b/uriloader/exthandler/Makefile.in |
2626 @@ -53,18 +53,19 @@ LOCAL_INCLUDES = -I$(srcdir) |
2627 @@ -86,9 +86,10 @@ EXTRA_COMPONENTS = \ |
2627 LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \ |
2628 # we don't want the shared lib, but we want to force the creation of a static lib. |
2628 -I$(topsrcdir)/dom/ipc \ |
2629 FORCE_STATIC_LIB = 1 |
2629 -I$(topsrcdir)/content/base/src \ |
2630 include $(topsrcdir)/config/config.mk |
2630 -I$(topsrcdir)/content/events/src \ |
2631 include $(topsrcdir)/ipc/chromium/chromium-config.mk |
2631 -I$(topsrcdir)/netwerk/base/src \ |
2632 include $(topsrcdir)/config/rules.mk |
2632 -I$(topsrcdir)/netwerk/protocol/http |
2633 |
2633 |
2634 ifneq (,$(filter qt gtk2 gtk3, $(MOZ_WIDGET_TOOLKIT))) |
2634 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) |
2635 CXXFLAGS += $(TK_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS) |
2635 -OSHELPER += nsGNOMERegistry.cpp |
|
2636 +OSHELPER += nsCommonRegistry.cpp nsGNOMERegistry.cpp nsKDERegistry.cpp |
|
2637 OSHELPER += nsMIMEInfoUnix.cpp |
|
2638 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
2636 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
2639 endif |
2637 endif |
2640 |
2638 diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build |
2641 ifeq ($(MOZ_WIDGET_TOOLKIT),android) |
2639 --- a/uriloader/exthandler/moz.build |
2642 OSHELPER += nsMIMEInfoAndroid.cpp |
2640 +++ b/uriloader/exthandler/moz.build |
2643 OSHELPER += nsAndroidHandlerApp.cpp |
2641 @@ -68,16 +68,18 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco |
2644 OSHELPER += nsExternalSharingAppService.cpp |
2642 pass |
2645 OSHELPER += nsExternalURLHandlerService.cpp |
2643 else: |
2646 endif |
2644 CPP_SOURCES += [ |
|
2645 'nsOSHelperAppService.cpp', |
|
2646 ] |
|
2647 |
|
2648 if CONFIG['MOZ_ENABLE_GTK']: |
|
2649 CPP_SOURCES += [ |
|
2650 + 'nsCommonRegistry.cpp', |
|
2651 + 'nsKDERegistry.cpp', |
|
2652 'nsGNOMERegistry.cpp', |
|
2653 'nsMIMEInfoUnix.cpp', |
|
2654 ] |
|
2655 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': |
|
2656 CPP_SOURCES += [ |
|
2657 'nsMIMEInfoAndroid.cpp', |
|
2658 'nsAndroidHandlerApp.cpp', |
|
2659 'nsExternalSharingAppService.cpp', |
2647 diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
2660 diff --git a/uriloader/exthandler/unix/nsCommonRegistry.cpp b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
2648 new file mode 100644 |
2661 new file mode 100644 |
2649 --- /dev/null |
2662 --- /dev/null |
2650 +++ b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
2663 +++ b/uriloader/exthandler/unix/nsCommonRegistry.cpp |
2651 @@ -0,0 +1,54 @@ |
2664 @@ -0,0 +1,54 @@ |
2733 +}; |
2746 +}; |
2734 diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/unix/nsKDERegistry.cpp |
2747 diff --git a/uriloader/exthandler/unix/nsKDERegistry.cpp b/uriloader/exthandler/unix/nsKDERegistry.cpp |
2735 new file mode 100644 |
2748 new file mode 100644 |
2736 --- /dev/null |
2749 --- /dev/null |
2737 +++ b/uriloader/exthandler/unix/nsKDERegistry.cpp |
2750 +++ b/uriloader/exthandler/unix/nsKDERegistry.cpp |
2738 @@ -0,0 +1,90 @@ |
2751 @@ -0,0 +1,88 @@ |
2739 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2752 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2740 +/* This Source Code Form is subject to the terms of the Mozilla Public |
2753 +/* This Source Code Form is subject to the terms of the Mozilla Public |
2741 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
2754 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
2742 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
2755 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
2743 + |
2756 + |
2818 + nsCString description = output[ 1 ]; |
2831 + nsCString description = output[ 1 ]; |
2819 + mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description)); |
2832 + mimeInfo->SetDescription(NS_ConvertUTF8toUTF16(description)); |
2820 + nsCString handlerAppName = output[ 2 ]; |
2833 + nsCString handlerAppName = output[ 2 ]; |
2821 + mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName)); |
2834 + mimeInfo->SetDefaultDescription(NS_ConvertUTF8toUTF16(handlerAppName)); |
2822 + mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault); |
2835 + mimeInfo->SetPreferredAction(nsIMIMEInfo::useSystemDefault); |
2823 + nsMIMEInfoBase* retval; |
2836 + return mimeInfo.forget(); |
2824 + NS_ADDREF((retval = mimeInfo)); |
|
2825 + return retval; |
|
2826 + } |
2837 + } |
2827 + return nullptr; |
2838 + return nullptr; |
2828 +} |
2839 +} |
2829 diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/unix/nsKDERegistry.h |
2840 diff --git a/uriloader/exthandler/unix/nsKDERegistry.h b/uriloader/exthandler/unix/nsKDERegistry.h |
2830 new file mode 100644 |
2841 new file mode 100644 |
2986 #include <QString> |
2997 #include <QString> |
2987 #endif |
2998 #endif |
2988 |
2999 |
2989 #include "nsOSHelperAppService.h" |
3000 #include "nsOSHelperAppService.h" |
2990 #include "nsMIMEInfoUnix.h" |
3001 #include "nsMIMEInfoUnix.h" |
2991 #ifdef MOZ_WIDGET_GTK2 |
3002 #ifdef MOZ_WIDGET_GTK |
2992 -#include "nsGNOMERegistry.h" |
3003 -#include "nsGNOMERegistry.h" |
2993 +#include "nsCommonRegistry.h" |
3004 +#include "nsCommonRegistry.h" |
2994 #endif |
3005 #endif |
2995 #include "nsISupports.h" |
3006 #include "nsISupports.h" |
2996 #include "nsString.h" |
3007 #include "nsString.h" |
3004 |
3015 |
3005 if (action.isValid()) |
3016 if (action.isValid()) |
3006 *aHandlerExists = true; |
3017 *aHandlerExists = true; |
3007 #endif |
3018 #endif |
3008 |
3019 |
3009 #ifdef MOZ_WIDGET_GTK2 |
3020 #ifdef MOZ_WIDGET_GTK |
3010 // Check the GConf registry for a protocol handler |
3021 // Check the GConf registry for a protocol handler |
3011 - *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme); |
3022 - *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme); |
3012 + *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme); |
3023 + *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme); |
3013 #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) |
3024 #if (MOZ_PLATFORM_MAEMO == 5) && defined (MOZ_ENABLE_GNOMEVFS) |
3014 *aHandlerExists = nsMIMEInfoUnix::HandlerExists(aProtocolScheme); |
3025 *aHandlerExists = nsMIMEInfoUnix::HandlerExists(aProtocolScheme); |
3018 return NS_OK; |
3029 return NS_OK; |
3019 } |
3030 } |
3020 |
3031 |
3021 NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) |
3032 NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) |
3022 { |
3033 { |
3023 #ifdef MOZ_WIDGET_GTK2 |
3034 #ifdef MOZ_WIDGET_GTK |
3024 - nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval); |
3035 - nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval); |
3025 + nsCommonRegistry::GetAppDescForScheme(aScheme, _retval); |
3036 + nsCommonRegistry::GetAppDescForScheme(aScheme, _retval); |
3026 return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK; |
3037 return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK; |
3027 #else |
3038 #else |
3028 return NS_ERROR_NOT_AVAILABLE; |
3039 return NS_ERROR_NOT_AVAILABLE; |
3035 mime_types_description, |
3046 mime_types_description, |
3036 true); |
3047 true); |
3037 |
3048 |
3038 if (NS_FAILED(rv) || majorType.IsEmpty()) { |
3049 if (NS_FAILED(rv) || majorType.IsEmpty()) { |
3039 |
3050 |
3040 #ifdef MOZ_WIDGET_GTK2 |
3051 #ifdef MOZ_WIDGET_GTK |
3041 LOG(("Looking in GNOME registry\n")); |
3052 LOG(("Looking in GNOME registry\n")); |
3042 nsRefPtr<nsMIMEInfoBase> gnomeInfo = |
3053 nsRefPtr<nsMIMEInfoBase> gnomeInfo = |
3043 - nsGNOMERegistry::GetFromExtension(aFileExt); |
3054 - nsGNOMERegistry::GetFromExtension(aFileExt); |
3044 + nsCommonRegistry::GetFromExtension(aFileExt); |
3055 + nsCommonRegistry::GetFromExtension(aFileExt); |
3045 if (gnomeInfo) { |
3056 if (gnomeInfo) { |
3049 #endif |
3060 #endif |
3050 |
3061 |
3051 rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), |
3062 rv = LookUpTypeAndDescription(NS_ConvertUTF8toUTF16(aFileExt), |
3052 majorType, |
3063 majorType, |
3053 @@ -1389,17 +1389,17 @@ nsOSHelperAppService::GetFromType(const |
3064 @@ -1389,17 +1389,17 @@ nsOSHelperAppService::GetFromType(const |
3054 #ifdef MOZ_WIDGET_GTK2 |
3065 #ifdef MOZ_WIDGET_GTK |
3055 nsRefPtr<nsMIMEInfoBase> gnomeInfo; |
3066 nsRefPtr<nsMIMEInfoBase> gnomeInfo; |
3056 if (handler.IsEmpty()) { |
3067 if (handler.IsEmpty()) { |
3057 // No useful data yet. Check the GNOME registry. Unfortunately, newer |
3068 // No useful data yet. Check the GNOME registry. Unfortunately, newer |
3058 // GNOME versions no longer have type-to-extension mappings, so we might |
3069 // GNOME versions no longer have type-to-extension mappings, so we might |
3059 // get back a MIMEInfo without any extensions set. In that case we'll have |
3070 // get back a MIMEInfo without any extensions set. In that case we'll have |
3070 |
3081 |
3071 // Now look up our extensions |
3082 // Now look up our extensions |
3072 diff --git a/widget/gtk2/Makefile.in b/widget/gtk2/Makefile.in |
3083 diff --git a/widget/gtk2/Makefile.in b/widget/gtk2/Makefile.in |
3073 --- a/widget/gtk2/Makefile.in |
3084 --- a/widget/gtk2/Makefile.in |
3074 +++ b/widget/gtk2/Makefile.in |
3085 +++ b/widget/gtk2/Makefile.in |
3075 @@ -96,11 +96,14 @@ DEFINES += -DCAIRO_GFX -DMOZ_APP_NAME=' |
3086 @@ -67,11 +67,14 @@ DEFINES += -DCAIRO_GFX -DMOZ_APP_NAME=' |
3076 |
3087 |
3077 INCLUDES += \ |
3088 INCLUDES += \ |
3078 -I$(srcdir)/../xpwidgets \ |
3089 -I$(srcdir)/../xpwidgets \ |
3079 -I$(srcdir)/../shared \ |
3090 -I$(srcdir)/../shared \ |
3080 -I$(topsrcdir)/layout/generic \ |
3091 -I$(topsrcdir)/layout/generic \ |
3143 CopyUTF16toUTF8(aFilter, filter); |
3154 CopyUTF16toUTF8(aFilter, filter); |
3144 CopyUTF16toUTF8(aTitle, name); |
3155 CopyUTF16toUTF8(aTitle, name); |
3145 |
3156 |
3146 mFilters.AppendElement(filter); |
3157 mFilters.AppendElement(filter); |
3147 mFilterNames.AppendElement(name); |
3158 mFilterNames.AppendElement(name); |
3148 @@ -360,16 +364,32 @@ nsFilePicker::Show(int16_t *aReturn) |
3159 @@ -366,16 +370,32 @@ nsFilePicker::Show(int16_t *aReturn) |
3149 |
3160 |
3150 NS_IMETHODIMP |
3161 NS_IMETHODIMP |
3151 nsFilePicker::Open(nsIFilePickerShownCallback *aCallback) |
3162 nsFilePicker::Open(nsIFilePickerShownCallback *aCallback) |
3152 { |
3163 { |
3153 // Can't show two dialogs concurrently with the same filepicker |
3164 // Can't show two dialogs concurrently with the same filepicker |
3176 GtkWindow *parent_widget = |
3187 GtkWindow *parent_widget = |
3177 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
3188 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
3178 |
3189 |
3179 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
3190 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
3180 const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) |
3191 const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) |
3181 @@ -561,8 +581,235 @@ nsFilePicker::Done(GtkWidget* file_choos |
3192 @@ -567,8 +587,235 @@ nsFilePicker::Done(GtkWidget* file_choos |
3182 if (mCallback) { |
3193 if (mCallback) { |
3183 mCallback->Done(result); |
3194 mCallback->Done(result); |
3184 mCallback = nullptr; |
3195 mCallback = nullptr; |
3185 } else { |
3196 } else { |
3186 mResult = result; |
3197 mResult = result; |
3436 |
3447 |
3437 #endif |
3448 #endif |
3438 diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in |
3449 diff --git a/xpcom/components/Makefile.in b/xpcom/components/Makefile.in |
3439 --- a/xpcom/components/Makefile.in |
3450 --- a/xpcom/components/Makefile.in |
3440 +++ b/xpcom/components/Makefile.in |
3451 +++ b/xpcom/components/Makefile.in |
3441 @@ -34,10 +34,11 @@ LOCAL_INCLUDES = \ |
3452 @@ -28,9 +28,10 @@ LOCAL_INCLUDES = \ |
3442 # we don't want the shared lib, but we want to force the creation of a static lib. |
|
3443 FORCE_STATIC_LIB = 1 |
3453 FORCE_STATIC_LIB = 1 |
3444 |
3454 |
3445 include $(topsrcdir)/config/rules.mk |
3455 include $(topsrcdir)/config/rules.mk |
3446 |
3456 |
3447 DEFINES += -D_IMPL_NS_COM |
3457 DEFINES += -D_IMPL_NS_COM |
3448 |
3458 |
3449 ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) |
3459 ifdef MOZ_WIDGET_GTK |
|
3460 CXXFLAGS += $(TK_CFLAGS) |
3450 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
3461 +LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre |
3451 CXXFLAGS += $(MOZ_GTK2_CFLAGS) |
|
3452 endif |
3462 endif |
3453 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp |
3463 diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp |
3454 --- a/xpcom/components/ManifestParser.cpp |
3464 --- a/xpcom/components/ManifestParser.cpp |
3455 +++ b/xpcom/components/ManifestParser.cpp |
3465 +++ b/xpcom/components/ManifestParser.cpp |
3456 @@ -30,16 +30,17 @@ |
3466 @@ -30,16 +30,17 @@ |
3514 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3524 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3515 majorVersion, |
3525 majorVersion, |
3516 minorVersion); |
3526 minorVersion); |
3517 } |
3527 } |
3518 + desktop = NS_LITERAL_STRING("macosx"); |
3528 + desktop = NS_LITERAL_STRING("macosx"); |
3519 #elif defined(MOZ_WIDGET_GTK2) |
3529 #elif defined(MOZ_WIDGET_GTK) |
3520 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3530 nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), |
3521 gtk_major_version, |
3531 gtk_major_version, |
3522 gtk_minor_version); |
3532 gtk_minor_version); |
3523 + desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); |
3533 + desktop = nsKDEUtils::kdeSession() ? NS_LITERAL_STRING("kde") : NS_LITERAL_STRING("gnome"); |
3524 #elif defined(MOZ_WIDGET_ANDROID) |
3534 #elif defined(MOZ_WIDGET_ANDROID) |
3582 if (directive->regfunc) { |
3592 if (directive->regfunc) { |
3583 if (GeckoProcessType_Default != XRE_GetProcessType()) |
3593 if (GeckoProcessType_Default != XRE_GetProcessType()) |
3584 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in |
3594 diff --git a/xpcom/io/Makefile.in b/xpcom/io/Makefile.in |
3585 --- a/xpcom/io/Makefile.in |
3595 --- a/xpcom/io/Makefile.in |
3586 +++ b/xpcom/io/Makefile.in |
3596 +++ b/xpcom/io/Makefile.in |
3587 @@ -77,17 +77,17 @@ include $(topsrcdir)/ipc/chromium/chromi |
3597 @@ -43,17 +43,17 @@ include $(topsrcdir)/ipc/chromium/chromi |
3588 DEFINES += -D_IMPL_NS_COM |
3598 DEFINES += -D_IMPL_NS_COM |
3589 |
3599 |
3590 ifeq ($(OS_ARCH),Linux) |
3600 ifeq ($(OS_ARCH),Linux) |
3591 ifneq (,$(findstring lib64,$(libdir))) |
3601 ifneq (,$(findstring lib64,$(libdir))) |
3592 DEFINES += -DHAVE_USR_LIB64_DIR |
3602 DEFINES += -DHAVE_USR_LIB64_DIR |
3688 nsresult rv = CocoaFileUtils::RevealFileInFinder(url); |
3698 nsresult rv = CocoaFileUtils::RevealFileInFinder(url); |
3689 ::CFRelease(url); |
3699 ::CFRelease(url); |
3690 return rv; |
3700 return rv; |
3691 } |
3701 } |
3692 return NS_ERROR_FAILURE; |
3702 return NS_ERROR_FAILURE; |
3693 @@ -1815,16 +1823,23 @@ nsLocalFile::Launch() |
3703 @@ -1816,16 +1824,23 @@ nsLocalFile::Launch() |
3694 |
3704 |
3695 if (nullptr == connection) |
3705 if (nullptr == connection) |
3696 return NS_ERROR_FAILURE; |
3706 return NS_ERROR_FAILURE; |
3697 |
3707 |
3698 if (hildon_mime_open_file(connection, mPath.get()) != kHILDON_SUCCESS) |
3708 if (hildon_mime_open_file(connection, mPath.get()) != kHILDON_SUCCESS) |