1 # HG changeset patch |
1 # HG changeset patch |
2 # User msirringhaus@suse.de |
2 # User msirringhaus@suse.de |
3 # Date 1559294891 -7200 |
3 # Date 1559294891 -7200 |
4 # Fri May 31 11:28:11 2019 +0200 |
4 # Fri May 31 11:28:11 2019 +0200 |
5 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 |
5 # Node ID c2aa7198fb925e7fde96abf65b6f68b9b755f112 |
6 # Parent b8fad36c438a0d20ffe73630e35c17addb4ee57d |
6 # Parent 36f9c3a81777563ef87663a210b1cd38fdd734d9 |
7 Description: Add KDE integration to Firefox (toolkit parts) |
7 Description: Add KDE integration to Firefox (toolkit parts) |
8 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
8 Author: Wolfgang Rosenauer <wolfgang@rosenauer.org> |
9 Author: Lubos Lunak <lunak@suse.com> |
9 Author: Lubos Lunak <lunak@suse.com> |
10 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
10 Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
11 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
11 https://bugzilla.novell.com/show_bug.cgi?id=170055 |
12 |
12 |
13 diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp |
13 diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp |
14 --- a/modules/libpref/Preferences.cpp |
14 --- a/modules/libpref/Preferences.cpp |
15 +++ b/modules/libpref/Preferences.cpp |
15 +++ b/modules/libpref/Preferences.cpp |
16 @@ -88,16 +88,17 @@ |
16 @@ -89,16 +89,17 @@ |
17 #include "PLDHashTable.h" |
17 #include "PLDHashTable.h" |
18 #include "plstr.h" |
18 #include "plstr.h" |
19 #include "prlink.h" |
19 #include "prlink.h" |
20 #include "xpcpublic.h" |
20 #include "xpcpublic.h" |
21 #include "js/RootingAPI.h" |
21 #include "js/RootingAPI.h" |
57 NS_WARNING("Error parsing application default preferences."); |
57 NS_WARNING("Error parsing application default preferences."); |
58 } |
58 } |
59 |
59 |
60 // Load jar:$app/omni.jar!/defaults/preferences/*.js |
60 // Load jar:$app/omni.jar!/defaults/preferences/*.js |
61 // or jar:$gre/omni.jar!/defaults/preferences/*.js. |
61 // or jar:$gre/omni.jar!/defaults/preferences/*.js. |
62 @@ -4897,17 +4909,17 @@ nsresult Preferences::InitInitialObjects |
62 @@ -4923,17 +4935,17 @@ nsresult Preferences::InitInitialObjects |
63 } |
63 } |
64 |
64 |
65 nsCOMPtr<nsIFile> path = do_QueryInterface(elem); |
65 nsCOMPtr<nsIFile> path = do_QueryInterface(elem); |
66 if (!path) { |
66 if (!path) { |
67 continue; |
67 continue; |
79 |
79 |
80 if (aIsStartup) { |
80 if (aIsStartup) { |
81 diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build |
81 diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build |
82 --- a/modules/libpref/moz.build |
82 --- a/modules/libpref/moz.build |
83 +++ b/modules/libpref/moz.build |
83 +++ b/modules/libpref/moz.build |
84 @@ -121,16 +121,20 @@ EXPORTS.mozilla += [ |
84 @@ -123,16 +123,20 @@ EXPORTS.mozilla += [ |
85 ] |
85 ] |
86 EXPORTS.mozilla += sorted(["!" + g for g in gen_h]) |
86 EXPORTS.mozilla += sorted(["!" + g for g in gen_h]) |
87 |
87 |
88 UNIFIED_SOURCES += [ |
88 UNIFIED_SOURCES += [ |
89 "Preferences.cpp", |
89 "Preferences.cpp", |
163 with Files("**"): |
163 with Files("**"): |
164 BUG_COMPONENT = ("Toolkit", "Downloads API") |
164 BUG_COMPONENT = ("Toolkit", "Downloads API") |
165 diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm |
165 diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm |
166 --- a/toolkit/mozapps/downloads/HelperAppDlg.jsm |
166 --- a/toolkit/mozapps/downloads/HelperAppDlg.jsm |
167 +++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm |
167 +++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm |
168 @@ -1265,36 +1265,66 @@ nsUnknownContentTypeDialog.prototype = { |
168 @@ -1239,36 +1239,66 @@ nsUnknownContentTypeDialog.prototype = { |
169 params.handlerApp && |
169 params.handlerApp && |
170 params.handlerApp.executable && |
170 params.handlerApp.executable && |
171 params.handlerApp.executable.isFile() |
171 params.handlerApp.executable.isFile() |
172 ) { |
172 ) { |
173 // Remember the file they chose to run. |
173 // Remember the file they chose to run. |
1281 |
1281 |
1282 #include "mozilla/Types.h" |
1282 #include "mozilla/Types.h" |
1283 #include "nsGtkUtils.h" |
1283 #include "nsGtkUtils.h" |
1284 #include "nsIFileURL.h" |
1284 #include "nsIFileURL.h" |
1285 #include "nsIGIOService.h" |
1285 #include "nsIGIOService.h" |
1286 @@ -22,16 +23,18 @@ |
1286 @@ -21,16 +22,18 @@ |
1287 #include "nsMemory.h" |
1287 #include "nsArrayEnumerator.h" |
1288 #include "nsEnumeratorUtils.h" |
1288 #include "nsEnumeratorUtils.h" |
1289 #include "nsNetUtil.h" |
1289 #include "nsNetUtil.h" |
1290 #include "nsReadableUtils.h" |
1290 #include "nsReadableUtils.h" |
1291 #include "MozContainer.h" |
1291 #include "MozContainer.h" |
1292 #include "WidgetUtilsGtk.h" |
1292 #include "WidgetUtilsGtk.h" |
1300 # include "mozilla/Logging.h" |
1300 # include "mozilla/Logging.h" |
1301 # include "nsTArray.h" |
1301 # include "nsTArray.h" |
1302 # include "Units.h" |
1302 # include "Units.h" |
1303 extern mozilla::LazyLogModule gWidgetLog; |
1303 extern mozilla::LazyLogModule gWidgetLog; |
1304 # define LOG(args) MOZ_LOG(gWidgetLog, mozilla::LogLevel::Debug, args) |
1304 # define LOG(args) MOZ_LOG(gWidgetLog, mozilla::LogLevel::Debug, args) |
1305 @@ -236,17 +239,19 @@ nsFilePicker::AppendFilters(int32_t aFil |
1305 @@ -235,17 +238,19 @@ nsFilePicker::AppendFilters(int32_t aFil |
1306 mAllowURLs = !!(aFilterMask & filterAllowURLs); |
1306 mAllowURLs = !!(aFilterMask & filterAllowURLs); |
1307 return nsBaseFilePicker::AppendFilters(aFilterMask); |
1307 return nsBaseFilePicker::AppendFilters(aFilterMask); |
1308 } |
1308 } |
1309 |
1309 |
1310 NS_IMETHODIMP |
1310 NS_IMETHODIMP |
1321 CopyUTF16toUTF8(aFilter, filter); |
1321 CopyUTF16toUTF8(aFilter, filter); |
1322 CopyUTF16toUTF8(aTitle, name); |
1322 CopyUTF16toUTF8(aTitle, name); |
1323 |
1323 |
1324 mFilters.AppendElement(filter); |
1324 mFilters.AppendElement(filter); |
1325 mFilterNames.AppendElement(name); |
1325 mFilterNames.AppendElement(name); |
1326 @@ -346,16 +351,39 @@ nsresult nsFilePicker::Show(int16_t* aRe |
1326 @@ -345,16 +350,39 @@ nsresult nsFilePicker::Show(int16_t* aRe |
1327 return NS_OK; |
1327 return NS_OK; |
1328 } |
1328 } |
1329 |
1329 |
1330 NS_IMETHODIMP |
1330 NS_IMETHODIMP |
1331 nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { |
1331 nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) { |
1361 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
1361 GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)); |
1362 |
1362 |
1363 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
1363 GtkFileChooserAction action = GetGtkFileChooserAction(mMode); |
1364 |
1364 |
1365 const gchar* accept_button; |
1365 const gchar* accept_button; |
1366 @@ -575,16 +603,244 @@ void nsFilePicker::Done(void* file_choos |
1366 @@ -574,16 +602,244 @@ void nsFilePicker::Done(void* file_choos |
1367 mCallback->Done(result); |
1367 mCallback->Done(result); |
1368 mCallback = nullptr; |
1368 mCallback = nullptr; |
1369 } else { |
1369 } else { |
1370 mResult = result; |
1370 mResult = result; |
1371 } |
1371 } |
1805 # include <Carbon/Carbon.h> |
1805 # include <Carbon/Carbon.h> |
1806 # include "CocoaFileUtils.h" |
1806 # include "CocoaFileUtils.h" |
1807 # include "prmem.h" |
1807 # include "prmem.h" |
1808 # include "plbase64.h" |
1808 # include "plbase64.h" |
1809 |
1809 |
1810 @@ -2083,20 +2084,29 @@ nsLocalFile::SetPersistentDescriptor(con |
1810 @@ -2088,20 +2089,29 @@ nsLocalFile::SetPersistentDescriptor(con |
1811 |
1811 |
1812 NS_IMETHODIMP |
1812 NS_IMETHODIMP |
1813 nsLocalFile::Reveal() { |
1813 nsLocalFile::Reveal() { |
1814 if (!FilePreferences::IsAllowedPath(mPath)) { |
1814 if (!FilePreferences::IsAllowedPath(mPath)) { |
1815 return NS_ERROR_FILE_ACCESS_DENIED; |
1815 return NS_ERROR_FILE_ACCESS_DENIED; |
1837 if (NS_SUCCEEDED(GetCFURL(&url))) { |
1837 if (NS_SUCCEEDED(GetCFURL(&url))) { |
1838 nsresult rv = CocoaFileUtils::RevealFileInFinder(url); |
1838 nsresult rv = CocoaFileUtils::RevealFileInFinder(url); |
1839 ::CFRelease(url); |
1839 ::CFRelease(url); |
1840 return rv; |
1840 return rv; |
1841 } |
1841 } |
1842 @@ -2108,16 +2118,23 @@ nsLocalFile::Reveal() { |
1842 @@ -2113,16 +2123,23 @@ nsLocalFile::Reveal() { |
1843 |
1843 |
1844 NS_IMETHODIMP |
1844 NS_IMETHODIMP |
1845 nsLocalFile::Launch() { |
1845 nsLocalFile::Launch() { |
1846 if (!FilePreferences::IsAllowedPath(mPath)) { |
1846 if (!FilePreferences::IsAllowedPath(mPath)) { |
1847 return NS_ERROR_FILE_ACCESS_DENIED; |
1847 return NS_ERROR_FILE_ACCESS_DENIED; |