141 nsRefPtr<nsZipArchive> appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP); |
141 nsRefPtr<nsZipArchive> appJarReader = mozilla::Omnijar::GetReader(mozilla::Omnijar::APP); |
142 // GetReader(mozilla::Omnijar::APP) returns null when $app == $gre, in which |
142 // GetReader(mozilla::Omnijar::APP) returns null when $app == $gre, in which |
143 diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in |
143 diff --git a/toolkit/components/downloads/Makefile.in b/toolkit/components/downloads/Makefile.in |
144 --- a/toolkit/components/downloads/Makefile.in |
144 --- a/toolkit/components/downloads/Makefile.in |
145 +++ b/toolkit/components/downloads/Makefile.in |
145 +++ b/toolkit/components/downloads/Makefile.in |
146 @@ -41,9 +41,12 @@ EXTRA_COMPONENTS = \ |
146 @@ -42,9 +42,12 @@ EXTRA_COMPONENTS = \ |
147 nsDownloadManagerUI.manifest \ |
147 nsDownloadManagerUI.manifest \ |
148 $(NULL) |
148 $(NULL) |
149 endif |
149 endif |
150 |
150 |
151 TEST_DIRS += test |
151 TEST_DIRS += test |
157 + |
157 + |
158 CXXFLAGS += $(TK_CFLAGS) |
158 CXXFLAGS += $(TK_CFLAGS) |
159 diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp |
159 diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp |
160 --- a/toolkit/components/downloads/nsDownloadManager.cpp |
160 --- a/toolkit/components/downloads/nsDownloadManager.cpp |
161 +++ b/toolkit/components/downloads/nsDownloadManager.cpp |
161 +++ b/toolkit/components/downloads/nsDownloadManager.cpp |
162 @@ -36,16 +36,20 @@ |
162 @@ -41,16 +41,20 @@ |
163 |
163 |
164 #ifdef XP_WIN |
164 #ifdef XP_WIN |
165 #include <shlobj.h> |
165 #include <shlobj.h> |
166 #ifdef DOWNLOAD_SCANNER |
166 #ifdef DOWNLOAD_SCANNER |
167 #include "nsDownloadScanner.h" |
167 #include "nsDownloadScanner.h" |
178 |
178 |
179 #ifdef MOZ_WIDGET_ANDROID |
179 #ifdef MOZ_WIDGET_ANDROID |
180 #include "AndroidBridge.h" |
180 #include "AndroidBridge.h" |
181 #endif |
181 #endif |
182 |
182 |
183 @@ -2253,16 +2257,25 @@ nsDownload::SetState(DownloadState aStat |
183 @@ -2740,16 +2744,25 @@ nsDownload::SetState(DownloadState aStat |
184 nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID)); |
184 nsCOMPtr<nsIPrefBranch> pref(do_GetService(NS_PREFSERVICE_CONTRACTID)); |
185 |
185 |
186 // Master pref to control this function. |
186 // Master pref to control this function. |
187 bool showTaskbarAlert = true; |
187 bool showTaskbarAlert = true; |
188 if (pref) |
188 if (pref) |
204 |
204 |
205 int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC; |
205 int64_t alertIntervalUSec = alertInterval * PR_USEC_PER_MSEC; |
206 int64_t goat = PR_Now() - mStartTime; |
206 int64_t goat = PR_Now() - mStartTime; |
207 showTaskbarAlert = goat > alertIntervalUSec; |
207 showTaskbarAlert = goat > alertIntervalUSec; |
208 |
208 |
209 @@ -2286,19 +2299,20 @@ nsDownload::SetState(DownloadState aStat |
209 @@ -2775,19 +2788,20 @@ nsDownload::SetState(DownloadState aStat |
210 // If downloads are automatically removed per the user's |
210 // If downloads are automatically removed per the user's |
211 // retention policy, there's no reason to make the text clickable |
211 // retention policy, there's no reason to make the text clickable |
212 // because if it is, they'll click open the download manager and |
212 // because if it is, they'll click open the download manager and |
213 // the items they downloaded will have been removed. |
213 // the items they downloaded will have been removed. |
214 alerts->ShowAlertNotification( |
214 alerts->ShowAlertNotification( |
229 if (fileURL && |
229 if (fileURL && |
230 NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) && |
230 NS_SUCCEEDED(fileURL->GetFile(getter_AddRefs(file))) && |
231 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn |
231 diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn |
232 --- a/toolkit/content/jar.mn |
232 --- a/toolkit/content/jar.mn |
233 +++ b/toolkit/content/jar.mn |
233 +++ b/toolkit/content/jar.mn |
234 @@ -46,29 +46,33 @@ toolkit.jar: |
234 @@ -49,29 +49,33 @@ toolkit.jar: |
235 content/global/viewZoomOverlay.js (viewZoomOverlay.js) |
235 content/global/viewZoomOverlay.js (viewZoomOverlay.js) |
236 *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) |
236 *+ content/global/bindings/autocomplete.xml (widgets/autocomplete.xml) |
237 content/global/bindings/browser.xml (widgets/browser.xml) |
237 content/global/bindings/browser.xml (widgets/browser.xml) |
238 content/global/bindings/button.xml (widgets/button.xml) |
238 content/global/bindings/button.xml (widgets/button.xml) |
239 content/global/bindings/checkbox.xml (widgets/checkbox.xml) |
239 content/global/bindings/checkbox.xml (widgets/checkbox.xml) |
3050 INCLUDES += -I$(srcdir)/../shared/x11 |
3050 INCLUDES += -I$(srcdir)/../shared/x11 |
3051 endif |
3051 endif |
3052 diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp |
3052 diff --git a/widget/gtk2/nsFilePicker.cpp b/widget/gtk2/nsFilePicker.cpp |
3053 --- a/widget/gtk2/nsFilePicker.cpp |
3053 --- a/widget/gtk2/nsFilePicker.cpp |
3054 +++ b/widget/gtk2/nsFilePicker.cpp |
3054 +++ b/widget/gtk2/nsFilePicker.cpp |
3055 @@ -1,16 +1,17 @@ |
3055 @@ -1,31 +1,33 @@ |
3056 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
3056 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
3057 /* This Source Code Form is subject to the terms of the Mozilla Public |
3057 /* This Source Code Form is subject to the terms of the Mozilla Public |
3058 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3058 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3059 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
3059 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
3060 |
3060 |
3068 #include "nsIWidget.h" |
3068 #include "nsIWidget.h" |
3069 #include "nsIFile.h" |
3069 #include "nsIFile.h" |
3070 #include "nsIStringBundle.h" |
3070 #include "nsIStringBundle.h" |
3071 |
3071 |
3072 #include "nsArrayEnumerator.h" |
3072 #include "nsArrayEnumerator.h" |
3073 @@ -19,16 +20,17 @@ |
3073 #include "nsMemory.h" |
|
3074 #include "nsEnumeratorUtils.h" |
3074 #include "nsNetUtil.h" |
3075 #include "nsNetUtil.h" |
3075 #include "nsReadableUtils.h" |
3076 #include "nsReadableUtils.h" |
3076 #include "mozcontainer.h" |
3077 #include "mozcontainer.h" |
3077 |
3078 |
3078 #include "prmem.h" |
|
3079 #include "prlink.h" |
|
3080 |
|
3081 #include "nsFilePicker.h" |
3079 #include "nsFilePicker.h" |
3082 +#include "nsKDEUtils.h" |
3080 +#include "nsKDEUtils.h" |
3083 |
3081 |
3084 #if (MOZ_PLATFORM_MAEMO == 5) |
3082 #if (MOZ_PLATFORM_MAEMO == 5) |
3085 #include <hildon-fm-2/hildon/hildon-file-chooser-dialog.h> |
3083 #include <hildon-fm-2/hildon/hildon-file-chooser-dialog.h> |
3086 #endif |
3084 #endif |
3087 |
3085 |
3088 using namespace mozilla; |
3086 using namespace mozilla; |
3089 |
3087 |
3090 #define MAX_PREVIEW_SIZE 180 |
3088 #define MAX_PREVIEW_SIZE 180 |
3091 @@ -264,17 +266,19 @@ nsFilePicker::AppendFilters(int32_t aFil |
3089 @@ -236,17 +238,19 @@ nsFilePicker::AppendFilters(int32_t aFil |
3092 return nsBaseFilePicker::AppendFilters(aFilterMask); |
3090 return nsBaseFilePicker::AppendFilters(aFilterMask); |
3093 } |
3091 } |
3094 |
3092 |
3095 NS_IMETHODIMP |
3093 NS_IMETHODIMP |
3096 nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter) |
3094 nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter) |
3107 CopyUTF16toUTF8(aFilter, filter); |
3105 CopyUTF16toUTF8(aFilter, filter); |
3108 CopyUTF16toUTF8(aTitle, name); |
3106 CopyUTF16toUTF8(aTitle, name); |
3109 |
3107 |
3110 mFilters.AppendElement(filter); |
3108 mFilters.AppendElement(filter); |
3111 mFilterNames.AppendElement(name); |
3109 mFilterNames.AppendElement(name); |
3112 @@ -388,16 +392,32 @@ nsFilePicker::Show(int16_t *aReturn) |
3110 @@ -360,16 +364,32 @@ nsFilePicker::Show(int16_t *aReturn) |
3113 |
3111 |
3114 NS_IMETHODIMP |
3112 NS_IMETHODIMP |
3115 nsFilePicker::Open(nsIFilePickerShownCallback *aCallback) |
3113 nsFilePicker::Open(nsIFilePickerShownCallback *aCallback) |
3116 { |
3114 { |
3117 // Can't show two dialogs concurrently with the same filepicker |
3115 // Can't show two dialogs concurrently with the same filepicker |
3135 + } |
3133 + } |
3136 + |
3134 + |
3137 nsXPIDLCString title; |
3135 nsXPIDLCString title; |
3138 title.Adopt(ToNewUTF8String(mTitle)); |
3136 title.Adopt(ToNewUTF8String(mTitle)); |
3139 |
3137 |
3140 GtkWindow *parent_widget = get_gtk_window_for_nsiwidget(mParentWidget); |
3138 GtkWindow *parent_widget = |
|
3139 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
3141 |
3140 |
3142 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
3141 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
3143 const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) |
3142 const gchar *accept_button = (action == GTK_FILE_CHOOSER_ACTION_SAVE) |
3144 ? GTK_STOCK_SAVE : GTK_STOCK_OPEN; |
3143 @@ -561,8 +581,235 @@ nsFilePicker::Done(GtkWidget* file_choos |
3145 @@ -588,8 +608,235 @@ nsFilePicker::Done(GtkWidget* file_choos |
|
3146 if (mCallback) { |
3144 if (mCallback) { |
3147 mCallback->Done(result); |
3145 mCallback->Done(result); |
3148 mCallback = nullptr; |
3146 mCallback = nullptr; |
3149 } else { |
3147 } else { |
3150 mResult = result; |
3148 mResult = result; |