v96.0.2-1; experimental re-inclusion of kde + unity menubar integration patches
This commit is contained in:
parent
bdcbaeeeb8
commit
fc16f6ba32
4 changed files with 952 additions and 770 deletions
942
deb_patches/mozilla-kde_after_unity.patch
Normal file
942
deb_patches/mozilla-kde_after_unity.patch
Normal file
|
|
@ -0,0 +1,942 @@
|
|||
From 19d8aa8d36e560616b3ff08358ed9e4e285ded10 Mon Sep 17 00:00:00 2001
|
||||
From: evs-ch <evs-ch@users.noreply.github.com>
|
||||
Date: Fri, 21 Jan 2022 13:14:43 +0100
|
||||
Subject: [PATCH] kde patch if applied after unity patch
|
||||
|
||||
---
|
||||
modules/libpref/Preferences.cpp | 14 +-
|
||||
modules/libpref/moz.build | 4 +
|
||||
python/mozbuild/mozpack/chrome/flags.py | 1 +
|
||||
python/mozbuild/mozpack/chrome/manifest.py | 1 +
|
||||
toolkit/components/downloads/moz.build | 4 +
|
||||
toolkit/mozapps/downloads/HelperAppDlg.jsm | 70 +++--
|
||||
.../unixproxy/nsUnixSystemProxySettings.cpp | 32 +++
|
||||
toolkit/xre/moz.build | 2 +
|
||||
uriloader/exthandler/HandlerServiceParent.cpp | 6 +-
|
||||
uriloader/exthandler/moz.build | 3 +
|
||||
uriloader/exthandler/unix/nsMIMEInfoUnix.cpp | 30 +-
|
||||
.../exthandler/unix/nsOSHelperAppService.cpp | 10 +-
|
||||
widget/gtk/moz.build | 1 +
|
||||
widget/gtk/nsFilePicker.cpp | 258 +++++++++++++++++-
|
||||
widget/gtk/nsFilePicker.h | 6 +
|
||||
xpcom/components/ManifestParser.cpp | 11 +-
|
||||
xpcom/components/moz.build | 1 +
|
||||
xpcom/io/nsLocalFileUnix.cpp | 28 +-
|
||||
18 files changed, 440 insertions(+), 42 deletions(-)
|
||||
|
||||
diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp
|
||||
index 27b1f2312..51d093cf0 100644
|
||||
--- a/modules/libpref/Preferences.cpp
|
||||
+++ b/modules/libpref/Preferences.cpp
|
||||
@@ -89,6 +89,7 @@
|
||||
#ifdef MOZ_BACKGROUNDTASKS
|
||||
# include "mozilla/BackgroundTasks.h"
|
||||
#endif
|
||||
+#include "nsKDEUtils.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
# include <map>
|
||||
@@ -4640,6 +4641,17 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) {
|
||||
#endif
|
||||
};
|
||||
|
||||
+ if(nsKDEUtils::kdeSession()) { // TODO what if some setup actually requires the helper?
|
||||
+ for(int i = 0;
|
||||
+ i < MOZ_ARRAY_LENGTH(specialFiles);
|
||||
+ ++i ) {
|
||||
+ if( *specialFiles[ i ] == '\0' ) {
|
||||
+ specialFiles[ i ] = "kde.js";
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
rv = pref_LoadPrefsInDir(defaultPrefDir, specialFiles,
|
||||
ArrayLength(specialFiles));
|
||||
if (NS_FAILED(rv)) {
|
||||
@@ -4714,7 +4726,7 @@ nsresult Preferences::InitInitialObjects(bool aIsStartup) {
|
||||
}
|
||||
|
||||
// Do we care if a file provided by this process fails to load?
|
||||
- pref_LoadPrefsInDir(path, nullptr, 0);
|
||||
+ pref_LoadPrefsInDir(path, specialFiles, ArrayLength(specialFiles));
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/modules/libpref/moz.build b/modules/libpref/moz.build
|
||||
index 9d76b9085..467227ccc 100644
|
||||
--- a/modules/libpref/moz.build
|
||||
+++ b/modules/libpref/moz.build
|
||||
@@ -124,6 +124,10 @@ UNIFIED_SOURCES += [
|
||||
"SharedPrefMap.cpp",
|
||||
]
|
||||
|
||||
+LOCAL_INCLUDES += [
|
||||
+ '/toolkit/xre'
|
||||
+]
|
||||
+
|
||||
gen_all_tuple = tuple(gen_h + gen_cpp + gen_rs)
|
||||
|
||||
GeneratedFile(
|
||||
diff --git a/python/mozbuild/mozpack/chrome/flags.py b/python/mozbuild/mozpack/chrome/flags.py
|
||||
index 7d6d7e0c7..724c527b4 100644
|
||||
--- a/python/mozbuild/mozpack/chrome/flags.py
|
||||
+++ b/python/mozbuild/mozpack/chrome/flags.py
|
||||
@@ -234,6 +234,7 @@ class Flags(OrderedDict):
|
||||
"tablet": Flag,
|
||||
"process": StringFlag,
|
||||
"backgroundtask": StringFlag,
|
||||
+ "desktop": StringFlag,
|
||||
}
|
||||
RE = re.compile(r"([!<>=]+)")
|
||||
|
||||
diff --git a/python/mozbuild/mozpack/chrome/manifest.py b/python/mozbuild/mozpack/chrome/manifest.py
|
||||
index a733685f9..f64b17fb7 100644
|
||||
--- a/python/mozbuild/mozpack/chrome/manifest.py
|
||||
+++ b/python/mozbuild/mozpack/chrome/manifest.py
|
||||
@@ -44,6 +44,7 @@ class ManifestEntry(object):
|
||||
"process",
|
||||
"contentaccessible",
|
||||
"backgroundtask",
|
||||
+ "desktop",
|
||||
]
|
||||
|
||||
def __init__(self, base, *flags):
|
||||
diff --git a/toolkit/components/downloads/moz.build b/toolkit/components/downloads/moz.build
|
||||
index 19ae8dcb5..e206a816e 100644
|
||||
--- a/toolkit/components/downloads/moz.build
|
||||
+++ b/toolkit/components/downloads/moz.build
|
||||
@@ -50,5 +50,9 @@ if CONFIG["MOZ_PLACES"]:
|
||||
|
||||
FINAL_LIBRARY = "xul"
|
||||
|
||||
+LOCAL_INCLUDES += [
|
||||
+ '/toolkit/xre'
|
||||
+]
|
||||
+
|
||||
with Files("**"):
|
||||
BUG_COMPONENT = ("Toolkit", "Downloads API")
|
||||
diff --git a/toolkit/mozapps/downloads/HelperAppDlg.jsm b/toolkit/mozapps/downloads/HelperAppDlg.jsm
|
||||
index 9b0c901c2..f80be96d7 100644
|
||||
--- a/toolkit/mozapps/downloads/HelperAppDlg.jsm
|
||||
+++ b/toolkit/mozapps/downloads/HelperAppDlg.jsm
|
||||
@@ -1236,26 +1236,56 @@ nsUnknownContentTypeDialog.prototype = {
|
||||
this.chosenApp = params.handlerApp;
|
||||
}
|
||||
} else if ("@mozilla.org/applicationchooser;1" in Cc) {
|
||||
- var nsIApplicationChooser = Ci.nsIApplicationChooser;
|
||||
- var appChooser = Cc["@mozilla.org/applicationchooser;1"].createInstance(
|
||||
- nsIApplicationChooser
|
||||
- );
|
||||
- appChooser.init(
|
||||
- this.mDialog,
|
||||
- this.dialogElement("strings").getString("chooseAppFilePickerTitle")
|
||||
- );
|
||||
- var contentTypeDialogObj = this;
|
||||
- let appChooserCallback = function appChooserCallback_done(aResult) {
|
||||
- if (aResult) {
|
||||
- contentTypeDialogObj.chosenApp = aResult.QueryInterface(
|
||||
- Ci.nsILocalHandlerApp
|
||||
- );
|
||||
- }
|
||||
- contentTypeDialogObj.finishChooseApp();
|
||||
- };
|
||||
- appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback);
|
||||
- // The finishChooseApp is called from appChooserCallback
|
||||
- return;
|
||||
+ // handle the KDE case which is implemented in the filepicker
|
||||
+ // therefore falling back to Gtk2 like behaviour if KDE is running
|
||||
+ // FIXME this should be better handled in the nsIApplicationChooser
|
||||
+ // interface
|
||||
+ var env = Components.classes["@mozilla.org/process/environment;1"]
|
||||
+ .getService(Components.interfaces.nsIEnvironment);
|
||||
+ if (env.get('KDE_FULL_SESSION') == "true")
|
||||
+ {
|
||||
+ var nsIFilePicker = Ci.nsIFilePicker;
|
||||
+ var fp = Cc["@mozilla.org/filepicker;1"]
|
||||
+ .createInstance(nsIFilePicker);
|
||||
+ fp.init(this.mDialog,
|
||||
+ this.dialogElement("strings").getString("chooseAppFilePickerTitle"),
|
||||
+ nsIFilePicker.modeOpen);
|
||||
+
|
||||
+ fp.appendFilters(nsIFilePicker.filterApps);
|
||||
+
|
||||
+ fp.open(aResult => {
|
||||
+ if (aResult == nsIFilePicker.returnOK && fp.file) {
|
||||
+ // Remember the file they chose to run.
|
||||
+ var localHandlerApp =
|
||||
+ Cc["@mozilla.org/uriloader/local-handler-app;1"].
|
||||
+ createInstance(Ci.nsILocalHandlerApp);
|
||||
+ localHandlerApp.executable = fp.file;
|
||||
+ this.chosenApp = localHandlerApp;
|
||||
+ }
|
||||
+ this.finishChooseApp();
|
||||
+ });
|
||||
+ } else {
|
||||
+ var nsIApplicationChooser = Ci.nsIApplicationChooser;
|
||||
+ var appChooser = Cc["@mozilla.org/applicationchooser;1"].createInstance(
|
||||
+ nsIApplicationChooser
|
||||
+ );
|
||||
+ appChooser.init(
|
||||
+ this.mDialog,
|
||||
+ this.dialogElement("strings").getString("chooseAppFilePickerTitle")
|
||||
+ );
|
||||
+ var contentTypeDialogObj = this;
|
||||
+ let appChooserCallback = function appChooserCallback_done(aResult) {
|
||||
+ if (aResult) {
|
||||
+ contentTypeDialogObj.chosenApp = aResult.QueryInterface(
|
||||
+ Ci.nsILocalHandlerApp
|
||||
+ );
|
||||
+ }
|
||||
+ contentTypeDialogObj.finishChooseApp();
|
||||
+ };
|
||||
+ appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback);
|
||||
+ // The finishChooseApp is called from appChooserCallback
|
||||
+ return;
|
||||
+ }
|
||||
} else {
|
||||
var nsIFilePicker = Ci.nsIFilePicker;
|
||||
var fp = Cc["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
|
||||
diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
|
||||
index f8d088054..091ccf3d9 100644
|
||||
--- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
|
||||
+++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "nsInterfaceHashtable.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsIURI.h"
|
||||
+#include "nsKDEUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@@ -41,6 +42,8 @@ class nsUnixSystemProxySettings final : public nsISystemProxySettings {
|
||||
nsACString& aResult);
|
||||
nsresult SetProxyResultFromGSettings(const char* aKeyBase, const char* aType,
|
||||
nsACString& aResult);
|
||||
+ nsresult GetProxyFromKDE(const nsACString& aScheme, const nsACString& aHost,
|
||||
+ PRInt32 aPort, nsACString& aResult);
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsUnixSystemProxySettings, nsISystemProxySettings)
|
||||
@@ -382,6 +385,9 @@ nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec,
|
||||
const nsACString& aHost,
|
||||
const int32_t aPort,
|
||||
nsACString& aResult) {
|
||||
+ if (nsKDEUtils::kdeSupport())
|
||||
+ return GetProxyFromKDE(aScheme, aHost, aPort, aResult);
|
||||
+
|
||||
if (mProxySettings) {
|
||||
nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult);
|
||||
if (NS_SUCCEEDED(rv)) return rv;
|
||||
@@ -390,6 +396,32 @@ nsresult nsUnixSystemProxySettings::GetProxyForURI(const nsACString& aSpec,
|
||||
return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult);
|
||||
}
|
||||
|
||||
+nsresult
|
||||
+nsUnixSystemProxySettings::GetProxyFromKDE(const nsACString& aScheme,
|
||||
+ const nsACString& aHost,
|
||||
+ PRInt32 aPort,
|
||||
+ nsACString& aResult)
|
||||
+{
|
||||
+ nsAutoCString url;
|
||||
+ url = aScheme;
|
||||
+ url += "://";
|
||||
+ url += aHost;
|
||||
+ if( aPort >= 0 )
|
||||
+ {
|
||||
+ url += ":";
|
||||
+ url += nsPrintfCString("%d", aPort);
|
||||
+ }
|
||||
+ nsTArray<nsCString> command;
|
||||
+ command.AppendElement( "GETPROXY"_ns );
|
||||
+ command.AppendElement( url );
|
||||
+ nsTArray<nsCString> result;
|
||||
+ if( !nsKDEUtils::command( command, &result ) || result.Length() != 1 )
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+ aResult = result[0];
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
+
|
||||
NS_IMPL_COMPONENT_FACTORY(nsUnixSystemProxySettings) {
|
||||
auto result = MakeRefPtr<nsUnixSystemProxySettings>();
|
||||
result->Init();
|
||||
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
|
||||
index e39d75d60..cd287739b 100644
|
||||
--- a/toolkit/xre/moz.build
|
||||
+++ b/toolkit/xre/moz.build
|
||||
@@ -97,7 +97,9 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
|
||||
"UIKitDirProvider.mm",
|
||||
]
|
||||
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
+ EXPORTS += ['nsKDEUtils.h']
|
||||
UNIFIED_SOURCES += [
|
||||
+ "nsKDEUtils.cpp",
|
||||
"nsNativeAppSupportUnix.cpp",
|
||||
]
|
||||
CXXFLAGS += CONFIG["MOZ_X11_SM_CFLAGS"]
|
||||
diff --git a/uriloader/exthandler/HandlerServiceParent.cpp b/uriloader/exthandler/HandlerServiceParent.cpp
|
||||
index 0796c7428..4f21c058f 100644
|
||||
--- a/uriloader/exthandler/HandlerServiceParent.cpp
|
||||
+++ b/uriloader/exthandler/HandlerServiceParent.cpp
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "ContentHandlerService.h"
|
||||
#include "nsStringEnumerator.h"
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
-# include "unix/nsGNOMERegistry.h"
|
||||
+# include "unix/nsCommonRegistry.h"
|
||||
#endif
|
||||
|
||||
using mozilla::dom::ContentHandlerService;
|
||||
@@ -304,7 +304,7 @@ mozilla::ipc::IPCResult HandlerServiceParent::RecvExistsForProtocolOS(
|
||||
}
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
// Check the GNOME registry for a protocol handler
|
||||
- *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme.get());
|
||||
+ *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme.get());
|
||||
#else
|
||||
*aHandlerExists = false;
|
||||
#endif
|
||||
@@ -333,7 +333,7 @@ mozilla::ipc::IPCResult HandlerServiceParent::RecvExistsForProtocol(
|
||||
}
|
||||
rv = protoSvc->ExternalProtocolHandlerExists(aProtocolScheme.get(),
|
||||
aHandlerExists);
|
||||
-
|
||||
+##
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
*aHandlerExists = false;
|
||||
}
|
||||
diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build
|
||||
index 8bac7bcfa..dab98e1aa 100644
|
||||
--- a/uriloader/exthandler/moz.build
|
||||
+++ b/uriloader/exthandler/moz.build
|
||||
@@ -83,7 +83,9 @@ else:
|
||||
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
UNIFIED_SOURCES += [
|
||||
+ "unix/nsCommonRegistry.cpp",
|
||||
"unix/nsGNOMERegistry.cpp",
|
||||
+ "unix/nsKDERegistry.cpp",
|
||||
"unix/nsMIMEInfoUnix.cpp",
|
||||
]
|
||||
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
|
||||
@@ -131,6 +133,7 @@ LOCAL_INCLUDES += [
|
||||
"/dom/ipc",
|
||||
"/netwerk/base",
|
||||
"/netwerk/protocol/http",
|
||||
+ "/toolkit/xre",
|
||||
]
|
||||
|
||||
if CONFIG["MOZ_ENABLE_DBUS"]:
|
||||
diff --git a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
|
||||
index 7cbefcce3..84083348c 100644
|
||||
--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
|
||||
+++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
|
||||
@@ -5,16 +5,19 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsMIMEInfoUnix.h"
|
||||
-#include "nsGNOMERegistry.h"
|
||||
+#include "nsCommonRegistry.h"
|
||||
#include "nsIGIOService.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsIIOService.h"
|
||||
#ifdef MOZ_ENABLE_DBUS
|
||||
# include "nsDBusHandlerApp.h"
|
||||
#endif
|
||||
+#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
+#include "nsKDEUtils.h"
|
||||
+#endif
|
||||
|
||||
nsresult nsMIMEInfoUnix::LoadUriInternal(nsIURI* aURI) {
|
||||
- return nsGNOMERegistry::LoadURL(aURI);
|
||||
+ return nsCommonRegistry::LoadURL(aURI);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -27,15 +30,15 @@ nsMIMEInfoUnix::GetHasDefaultHandler(bool* _retval) {
|
||||
*_retval = false;
|
||||
|
||||
if (mClass == eProtocolInfo) {
|
||||
- *_retval = nsGNOMERegistry::HandlerExists(mSchemeOrType.get());
|
||||
+ *_retval = nsCommonRegistry::HandlerExists(mSchemeOrType.get());
|
||||
} else {
|
||||
RefPtr<nsMIMEInfoBase> mimeInfo =
|
||||
- nsGNOMERegistry::GetFromType(mSchemeOrType);
|
||||
+ nsCommonRegistry::GetFromType(mSchemeOrType);
|
||||
if (!mimeInfo) {
|
||||
nsAutoCString ext;
|
||||
nsresult rv = GetPrimaryExtension(ext);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
- mimeInfo = nsGNOMERegistry::GetFromExtension(ext);
|
||||
+ mimeInfo = nsCommonRegistry::GetFromExtension(ext);
|
||||
}
|
||||
}
|
||||
if (mimeInfo) *_retval = true;
|
||||
@@ -55,6 +58,23 @@ nsresult nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile) {
|
||||
nsAutoCString nativePath;
|
||||
aFile->GetNativePath(nativePath);
|
||||
|
||||
+ if( nsKDEUtils::kdeSupport()) {
|
||||
+ bool supports;
|
||||
+ if( NS_SUCCEEDED( GetHasDefaultHandler( &supports )) && supports ) {
|
||||
+ nsTArray<nsCString> command;
|
||||
+ command.AppendElement( "OPEN"_ns );
|
||||
+ command.AppendElement( nativePath );
|
||||
+ command.AppendElement( "MIMETYPE"_ns );
|
||||
+ command.AppendElement( mSchemeOrType );
|
||||
+ if( nsKDEUtils::command( command ))
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+ if (!mDefaultApplication)
|
||||
+ return NS_ERROR_FILE_NOT_FOUND;
|
||||
+
|
||||
+ return LaunchWithIProcess(mDefaultApplication, nativePath);
|
||||
+ }
|
||||
+
|
||||
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
|
||||
if (!giovfs) {
|
||||
return NS_ERROR_FAILURE;
|
||||
diff --git a/uriloader/exthandler/unix/nsOSHelperAppService.cpp b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
|
||||
index b9e7aed3c..367ad9ee2 100644
|
||||
--- a/uriloader/exthandler/unix/nsOSHelperAppService.cpp
|
||||
+++ b/uriloader/exthandler/unix/nsOSHelperAppService.cpp
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "nsOSHelperAppService.h"
|
||||
#include "nsMIMEInfoUnix.h"
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
-# include "nsGNOMERegistry.h"
|
||||
+# include "nsCommonRegistry.h"
|
||||
# ifdef MOZ_BUILD_APP_IS_BROWSER
|
||||
# include "nsIToolkitShellService.h"
|
||||
# include "nsIGNOMEShellService.h"
|
||||
@@ -1030,7 +1030,7 @@ nsresult nsOSHelperAppService::OSProtocolHandlerExists(
|
||||
if (!XRE_IsContentProcess()) {
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
// Check the GNOME registry for a protocol handler
|
||||
- *aHandlerExists = nsGNOMERegistry::HandlerExists(aProtocolScheme);
|
||||
+ *aHandlerExists = nsCommonRegistry::HandlerExists(aProtocolScheme);
|
||||
#else
|
||||
*aHandlerExists = false;
|
||||
#endif
|
||||
@@ -1050,7 +1050,7 @@ nsresult nsOSHelperAppService::OSProtocolHandlerExists(
|
||||
NS_IMETHODIMP nsOSHelperAppService::GetApplicationDescription(
|
||||
const nsACString& aScheme, nsAString& _retval) {
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
- nsGNOMERegistry::GetAppDescForScheme(aScheme, _retval);
|
||||
+ nsCommonRegistry::GetAppDescForScheme(aScheme, _retval);
|
||||
return _retval.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK;
|
||||
#else
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
@@ -1153,7 +1153,7 @@ already_AddRefed<nsMIMEInfoBase> nsOSHelperAppService::GetFromExtension(
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
LOG(("Looking in GNOME registry\n"));
|
||||
RefPtr<nsMIMEInfoBase> gnomeInfo =
|
||||
- nsGNOMERegistry::GetFromExtension(aFileExt);
|
||||
+ nsCommonRegistry::GetFromExtension(aFileExt);
|
||||
if (gnomeInfo) {
|
||||
LOG(("Got MIMEInfo from GNOME registry\n"));
|
||||
return gnomeInfo.forget();
|
||||
@@ -1266,7 +1266,7 @@ already_AddRefed<nsMIMEInfoBase> nsOSHelperAppService::GetFromType(
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
if (handler.IsEmpty()) {
|
||||
- RefPtr<nsMIMEInfoBase> gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType);
|
||||
+ RefPtr<nsMIMEInfoBase> gnomeInfo = nsCommonRegistry::GetFromType(aMIMEType);
|
||||
if (gnomeInfo) {
|
||||
LOG(
|
||||
("Got MIMEInfo from GNOME registry without extensions; setting them "
|
||||
diff --git a/widget/gtk/moz.build b/widget/gtk/moz.build
|
||||
index 78c852e98..2bc734e95 100644
|
||||
--- a/widget/gtk/moz.build
|
||||
+++ b/widget/gtk/moz.build
|
||||
@@ -152,6 +152,7 @@ LOCAL_INCLUDES += [
|
||||
"/layout/xul",
|
||||
"/other-licenses/atk-1.0",
|
||||
"/third_party/cups/include",
|
||||
+ "/toolkit/xre",
|
||||
"/widget",
|
||||
"/widget/headless",
|
||||
]
|
||||
diff --git a/widget/gtk/nsFilePicker.cpp b/widget/gtk/nsFilePicker.cpp
|
||||
index fd032d0be..ca37f4fc3 100644
|
||||
--- a/widget/gtk/nsFilePicker.cpp
|
||||
+++ b/widget/gtk/nsFilePicker.cpp
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <gtk/gtk.h>
|
||||
+#include <gdk/gdkx.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
@@ -27,6 +28,8 @@
|
||||
#include "WidgetUtilsGtk.h"
|
||||
|
||||
#include "nsFilePicker.h"
|
||||
+#include "nsKDEUtils.h"
|
||||
+#include "nsURLHelper.h"
|
||||
|
||||
#undef LOG
|
||||
#ifdef MOZ_LOGGING
|
||||
@@ -247,7 +250,9 @@ NS_IMETHODIMP
|
||||
nsFilePicker::AppendFilter(const nsAString& aTitle, const nsAString& aFilter) {
|
||||
if (aFilter.EqualsLiteral("..apps")) {
|
||||
// No platform specific thing we can do here, really....
|
||||
- return NS_OK;
|
||||
+ // Unless it's KDE.
|
||||
+ if( mMode != modeOpen || !nsKDEUtils::kdeSupport())
|
||||
+ return NS_OK;
|
||||
}
|
||||
|
||||
nsAutoCString filter, name;
|
||||
@@ -357,6 +362,29 @@ nsFilePicker::Open(nsIFilePickerShownCallback* aCallback) {
|
||||
// Can't show two dialogs concurrently with the same filepicker
|
||||
if (mRunning) return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
+ // KDE file picker is not handled via callback
|
||||
+ if( nsKDEUtils::kdeSupport()) {
|
||||
+ mCallback = aCallback;
|
||||
+ mRunning = true;
|
||||
+ NS_ADDREF_THIS();
|
||||
+ g_idle_add([](gpointer data) -> gboolean {
|
||||
+ nsFilePicker* queuedPicker = (nsFilePicker*) data;
|
||||
+ int16_t result;
|
||||
+ queuedPicker->kdeFileDialog(&result);
|
||||
+ if (queuedPicker->mCallback) {
|
||||
+ queuedPicker->mCallback->Done(result);
|
||||
+ queuedPicker->mCallback = nullptr;
|
||||
+ } else {
|
||||
+ queuedPicker->mResult = result;
|
||||
+ }
|
||||
+ queuedPicker->mRunning = false;
|
||||
+ NS_RELEASE(queuedPicker);
|
||||
+ return G_SOURCE_REMOVE;
|
||||
+ }, this);
|
||||
+
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
NS_ConvertUTF16toUTF8 title(mTitle);
|
||||
|
||||
GtkWindow* parent_widget =
|
||||
@@ -586,6 +614,234 @@ void nsFilePicker::Done(void* file_chooser, gint response) {
|
||||
NS_RELEASE_THIS();
|
||||
}
|
||||
|
||||
+nsCString nsFilePicker::kdeMakeFilter( int index )
|
||||
+ {
|
||||
+ nsCString buf = mFilters[ index ];
|
||||
+ for( PRUint32 i = 0;
|
||||
+ i < buf.Length();
|
||||
+ ++i )
|
||||
+ if( buf[ i ] == ';' ) // KDE separates just using spaces
|
||||
+ buf.SetCharAt( ' ', i );
|
||||
+ if (!mFilterNames[index].IsEmpty())
|
||||
+ {
|
||||
+ buf += "|";
|
||||
+ buf += mFilterNames[index].get();
|
||||
+ }
|
||||
+ return buf;
|
||||
+ }
|
||||
+
|
||||
+static PRInt32 windowToXid( nsIWidget* widget )
|
||||
+ {
|
||||
+ GtkWindow *parent_widget = GTK_WINDOW(widget->GetNativeData(NS_NATIVE_SHELLWIDGET));
|
||||
+ GdkWindow* gdk_window = gtk_widget_get_window( gtk_widget_get_toplevel( GTK_WIDGET( parent_widget )));
|
||||
+ return GDK_WINDOW_XID( gdk_window );
|
||||
+ }
|
||||
+
|
||||
+NS_IMETHODIMP nsFilePicker::kdeFileDialog(PRInt16 *aReturn)
|
||||
+ {
|
||||
+ NS_ENSURE_ARG_POINTER(aReturn);
|
||||
+
|
||||
+ if( mMode == modeOpen && mFilters.Length() == 1 && mFilters[ 0 ].EqualsLiteral( "..apps" ))
|
||||
+ return kdeAppsDialog( aReturn );
|
||||
+
|
||||
+ nsCString title;
|
||||
+ title.Adopt(ToNewUTF8String(mTitle));
|
||||
+
|
||||
+ const char* arg = NULL;
|
||||
+ if( mAllowURLs )
|
||||
+ {
|
||||
+ switch( mMode )
|
||||
+ {
|
||||
+ case nsIFilePicker::modeOpen:
|
||||
+ case nsIFilePicker::modeOpenMultiple:
|
||||
+ arg = "GETOPENURL";
|
||||
+ break;
|
||||
+ case nsIFilePicker::modeSave:
|
||||
+ arg = "GETSAVEURL";
|
||||
+ break;
|
||||
+ case nsIFilePicker::modeGetFolder:
|
||||
+ arg = "GETDIRECTORYURL";
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ switch( mMode )
|
||||
+ {
|
||||
+ case nsIFilePicker::modeOpen:
|
||||
+ case nsIFilePicker::modeOpenMultiple:
|
||||
+ arg = "GETOPENFILENAME";
|
||||
+ break;
|
||||
+ case nsIFilePicker::modeSave:
|
||||
+ arg = "GETSAVEFILENAME";
|
||||
+ break;
|
||||
+ case nsIFilePicker::modeGetFolder:
|
||||
+ arg = "GETDIRECTORYFILENAME";
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ nsAutoCString directory;
|
||||
+ if (mDisplayDirectory) {
|
||||
+ mDisplayDirectory->GetNativePath(directory);
|
||||
+ } else if (mPrevDisplayDirectory) {
|
||||
+ mPrevDisplayDirectory->GetNativePath(directory);
|
||||
+ }
|
||||
+
|
||||
+ nsAutoCString startdir;
|
||||
+ if (!directory.IsEmpty()) {
|
||||
+ startdir = directory;
|
||||
+ }
|
||||
+ if (mMode == nsIFilePicker::modeSave) {
|
||||
+ if( !startdir.IsEmpty())
|
||||
+ {
|
||||
+ startdir += "/";
|
||||
+ startdir += ToNewUTF8String(mDefault);
|
||||
+ }
|
||||
+ else
|
||||
+ startdir = ToNewUTF8String(mDefault);
|
||||
+ }
|
||||
+
|
||||
+ nsAutoCString filters;
|
||||
+ PRInt32 count = mFilters.Length();
|
||||
+ if( count == 0 ) //just in case
|
||||
+ filters = "*";
|
||||
+ else
|
||||
+ {
|
||||
+ filters = kdeMakeFilter( 0 );
|
||||
+ for (PRInt32 i = 1; i < count; ++i)
|
||||
+ {
|
||||
+ filters += "\n";
|
||||
+ filters += kdeMakeFilter( i );
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ nsTArray<nsCString> command;
|
||||
+ command.AppendElement( nsAutoCString( arg ));
|
||||
+ command.AppendElement( startdir );
|
||||
+ if( mMode != nsIFilePicker::modeGetFolder )
|
||||
+ {
|
||||
+ command.AppendElement( filters );
|
||||
+ nsAutoCString selected;
|
||||
+ selected.AppendInt( mSelectedType );
|
||||
+ command.AppendElement( selected );
|
||||
+ }
|
||||
+ command.AppendElement( title );
|
||||
+ if( mMode == nsIFilePicker::modeOpenMultiple )
|
||||
+ command.AppendElement( "MULTIPLE"_ns );
|
||||
+ if( PRInt32 xid = windowToXid( mParentWidget ))
|
||||
+ {
|
||||
+ command.AppendElement( "PARENT"_ns );
|
||||
+ nsAutoCString parent;
|
||||
+ parent.AppendInt( xid );
|
||||
+ command.AppendElement( parent );
|
||||
+ }
|
||||
+
|
||||
+ nsTArray<nsCString> output;
|
||||
+ if( nsKDEUtils::commandBlockUi( command, GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)), &output ))
|
||||
+ {
|
||||
+ *aReturn = nsIFilePicker::returnOK;
|
||||
+ mFiles.Clear();
|
||||
+ if( mMode != nsIFilePicker::modeGetFolder )
|
||||
+ {
|
||||
+ mSelectedType = atoi( output[ 0 ].get());
|
||||
+ output.RemoveElementAt( 0 );
|
||||
+ }
|
||||
+ if (mMode == nsIFilePicker::modeOpenMultiple)
|
||||
+ {
|
||||
+ mFileURL.Truncate();
|
||||
+ PRUint32 count = output.Length();
|
||||
+ for( PRUint32 i = 0;
|
||||
+ i < count;
|
||||
+ ++i )
|
||||
+ {
|
||||
+ nsCOMPtr<nsIFile> localfile;
|
||||
+ nsresult rv = NS_NewNativeLocalFile( output[ i ],
|
||||
+ PR_FALSE,
|
||||
+ getter_AddRefs(localfile));
|
||||
+ if (NS_SUCCEEDED(rv))
|
||||
+ mFiles.AppendObject(localfile);
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if( output.Length() == 0 )
|
||||
+ mFileURL = nsCString();
|
||||
+ else if( mAllowURLs )
|
||||
+ mFileURL = output[ 0 ];
|
||||
+ else // GetFile() actually requires it to be url even for local files :-/
|
||||
+ {
|
||||
+ nsCOMPtr<nsIFile> localfile;
|
||||
+ nsresult rv = NS_NewNativeLocalFile( output[ 0 ],
|
||||
+ PR_FALSE,
|
||||
+ getter_AddRefs(localfile));
|
||||
+ if (NS_SUCCEEDED(rv))
|
||||
+ rv = net_GetURLSpecFromActualFile(localfile, mFileURL);
|
||||
+ }
|
||||
+ }
|
||||
+ // Remember last used directory.
|
||||
+ nsCOMPtr<nsIFile> file;
|
||||
+ GetFile(getter_AddRefs(file));
|
||||
+ if (file) {
|
||||
+ nsCOMPtr<nsIFile> dir;
|
||||
+ file->GetParent(getter_AddRefs(dir));
|
||||
+ nsCOMPtr<nsIFile> localDir(do_QueryInterface(dir));
|
||||
+ if (localDir) {
|
||||
+ localDir.swap(mPrevDisplayDirectory);
|
||||
+ }
|
||||
+ }
|
||||
+ if (mMode == nsIFilePicker::modeSave)
|
||||
+ {
|
||||
+ nsCOMPtr<nsIFile> file;
|
||||
+ GetFile(getter_AddRefs(file));
|
||||
+ if (file)
|
||||
+ {
|
||||
+ bool exists = false;
|
||||
+ file->Exists(&exists);
|
||||
+ if (exists) // TODO do overwrite check in the helper app
|
||||
+ *aReturn = nsIFilePicker::returnReplace;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ *aReturn = nsIFilePicker::returnCancel;
|
||||
+ }
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+NS_IMETHODIMP nsFilePicker::kdeAppsDialog(PRInt16 *aReturn)
|
||||
+ {
|
||||
+ NS_ENSURE_ARG_POINTER(aReturn);
|
||||
+
|
||||
+ nsCString title;
|
||||
+ title.Adopt(ToNewUTF8String(mTitle));
|
||||
+
|
||||
+ nsTArray<nsCString> command;
|
||||
+ command.AppendElement( "APPSDIALOG"_ns );
|
||||
+ command.AppendElement( title );
|
||||
+ if( PRInt32 xid = windowToXid( mParentWidget ))
|
||||
+ {
|
||||
+ command.AppendElement( "PARENT"_ns );
|
||||
+ nsAutoCString parent;
|
||||
+ parent.AppendInt( xid );
|
||||
+ command.AppendElement( parent );
|
||||
+ }
|
||||
+
|
||||
+ nsTArray<nsCString> output;
|
||||
+ if( nsKDEUtils::commandBlockUi( command, GTK_WINDOW(mParentWidget->GetNativeData(NS_NATIVE_SHELLWIDGET)), &output ))
|
||||
+ {
|
||||
+ *aReturn = nsIFilePicker::returnOK;
|
||||
+ mFileURL = output.Length() > 0 ? output[ 0 ] : nsCString();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ *aReturn = nsIFilePicker::returnCancel;
|
||||
+ }
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
+
|
||||
// All below functions available as of GTK 3.20+
|
||||
void* nsFilePicker::GtkFileChooserNew(const gchar* title, GtkWindow* parent,
|
||||
GtkFileChooserAction action,
|
||||
diff --git a/widget/gtk/nsFilePicker.h b/widget/gtk/nsFilePicker.h
|
||||
index 9b3110aa0..be9d559c7 100644
|
||||
--- a/widget/gtk/nsFilePicker.h
|
||||
+++ b/widget/gtk/nsFilePicker.h
|
||||
@@ -72,6 +72,12 @@ class nsFilePicker : public nsBaseFilePicker {
|
||||
private:
|
||||
static nsIFile* mPrevDisplayDirectory;
|
||||
|
||||
+ bool kdeRunning();
|
||||
+ bool getKdeRunning();
|
||||
+ NS_IMETHODIMP kdeFileDialog(PRInt16 *aReturn);
|
||||
+ NS_IMETHODIMP kdeAppsDialog(PRInt16 *aReturn);
|
||||
+ nsCString kdeMakeFilter( int index );
|
||||
+
|
||||
void* GtkFileChooserNew(const gchar* title, GtkWindow* parent,
|
||||
GtkFileChooserAction action,
|
||||
const gchar* accept_label);
|
||||
diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp
|
||||
index f3d0055f2..d13543ab5 100644
|
||||
--- a/xpcom/components/ManifestParser.cpp
|
||||
+++ b/xpcom/components/ManifestParser.cpp
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsIXULAppInfo.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
+#include "nsKDEUtils.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@@ -402,6 +403,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf,
|
||||
constexpr auto kOs = u"os"_ns;
|
||||
constexpr auto kOsVersion = u"osversion"_ns;
|
||||
constexpr auto kABI = u"abi"_ns;
|
||||
+ constexpr auto kDesktop = u"desktop"_ns;
|
||||
constexpr auto kProcess = u"process"_ns;
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
constexpr auto kTablet = u"tablet"_ns;
|
||||
@@ -461,6 +463,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf,
|
||||
}
|
||||
|
||||
nsAutoString osVersion;
|
||||
+ nsAutoString desktop;
|
||||
#if defined(XP_WIN)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4996) // VC12+ deprecates GetVersionEx
|
||||
@@ -469,14 +472,17 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf,
|
||||
nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", info.dwMajorVersion,
|
||||
info.dwMinorVersion);
|
||||
}
|
||||
+ desktop = u"win"_ns;
|
||||
# pragma warning(pop)
|
||||
#elif defined(MOZ_WIDGET_COCOA)
|
||||
SInt32 majorVersion = nsCocoaFeatures::macOSVersionMajor();
|
||||
SInt32 minorVersion = nsCocoaFeatures::macOSVersionMinor();
|
||||
nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", majorVersion, minorVersion);
|
||||
+ desktop = u"macosx"_ns);
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
nsTextFormatter::ssprintf(osVersion, u"%ld.%ld", gtk_major_version,
|
||||
gtk_minor_version);
|
||||
+ desktop = nsKDEUtils::kdeSession() ? u"kde"_ns : u"gnome"_ns;
|
||||
#elif defined(MOZ_WIDGET_ANDROID)
|
||||
bool isTablet = false;
|
||||
if (mozilla::AndroidBridge::Bridge()) {
|
||||
@@ -484,6 +490,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf,
|
||||
"android/os/Build$VERSION", "RELEASE", osVersion);
|
||||
isTablet = java::GeckoAppShell::IsTablet();
|
||||
}
|
||||
+ desktop = u"android"_ns;
|
||||
#endif
|
||||
|
||||
if (XRE_IsContentProcess()) {
|
||||
@@ -588,6 +595,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf,
|
||||
: eUnspecified;
|
||||
#endif
|
||||
int flags = 0;
|
||||
+ TriState stDesktop = eUnspecified;
|
||||
|
||||
while ((token = nsCRT::strtok(whitespace, kWhitespace, &whitespace)) &&
|
||||
ok) {
|
||||
@@ -597,6 +605,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf,
|
||||
if (CheckStringFlag(kApplication, wtoken, appID, stApp) ||
|
||||
CheckOsFlag(kOs, wtoken, osTarget, stOs) ||
|
||||
CheckStringFlag(kABI, wtoken, abi, stABI) ||
|
||||
+ CheckStringFlag(kDesktop, wtoken, desktop, stDesktop) ||
|
||||
CheckStringFlag(kProcess, wtoken, process, stProcess) ||
|
||||
CheckVersionFlag(kOsVersion, wtoken, osVersion, stOsVersion) ||
|
||||
CheckVersionFlag(kAppVersion, wtoken, appVersion, stAppVersion) ||
|
||||
@@ -655,7 +664,7 @@ void ParseManifest(NSLocationType aType, FileLocation& aFile, char* aBuf,
|
||||
}
|
||||
|
||||
if (!ok || stApp == eBad || stAppVersion == eBad ||
|
||||
- stGeckoVersion == eBad || stOs == eBad || stOsVersion == eBad ||
|
||||
+ stGeckoVersion == eBad || stOs == eBad || stOsVersion == eBad || stDesktop == eBad ||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
stTablet == eBad ||
|
||||
#endif
|
||||
diff --git a/xpcom/components/moz.build b/xpcom/components/moz.build
|
||||
index 655e2a607..128a4093a 100644
|
||||
--- a/xpcom/components/moz.build
|
||||
+++ b/xpcom/components/moz.build
|
||||
@@ -71,6 +71,7 @@ LOCAL_INCLUDES += [
|
||||
"/js/xpconnect/loader",
|
||||
"/layout/build",
|
||||
"/modules/libjar",
|
||||
+ "/toolkit/xre",
|
||||
]
|
||||
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp
|
||||
index 37b11fd2c..92a65ac1c 100644
|
||||
--- a/xpcom/io/nsLocalFileUnix.cpp
|
||||
+++ b/xpcom/io/nsLocalFileUnix.cpp
|
||||
@@ -58,6 +58,7 @@
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
# include "nsIGIOService.h"
|
||||
+# include "nsKDEUtils.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_COCOA
|
||||
@@ -2030,18 +2031,16 @@ nsLocalFile::Reveal() {
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
- nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
|
||||
- if (!giovfs) {
|
||||
- return NS_ERROR_FAILURE;
|
||||
- }
|
||||
+ nsAutoCString url;
|
||||
|
||||
bool isDirectory;
|
||||
if (NS_FAILED(IsDirectory(&isDirectory))) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
+ nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
|
||||
if (isDirectory) {
|
||||
- return giovfs->ShowURIForInput(mPath);
|
||||
+ url = mPath;
|
||||
}
|
||||
if (NS_SUCCEEDED(giovfs->OrgFreedesktopFileManager1ShowItems(mPath))) {
|
||||
return NS_OK;
|
||||
@@ -2055,7 +2054,7 @@ nsLocalFile::Reveal() {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
- return giovfs->ShowURIForInput(dirPath);
|
||||
+ url = dirPath;
|
||||
#elif defined(MOZ_WIDGET_COCOA)
|
||||
CFURLRef url;
|
||||
if (NS_SUCCEEDED(GetCFURL(&url))) {
|
||||
@@ -2067,6 +2066,17 @@ nsLocalFile::Reveal() {
|
||||
#else
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
+ if(nsKDEUtils::kdeSupport()) {
|
||||
+ nsTArray<nsCString> command;
|
||||
+ command.AppendElement( "REVEAL"_ns );
|
||||
+ command.AppendElement( mPath );
|
||||
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ if (!giovfs)
|
||||
+ return NS_ERROR_FAILURE;
|
||||
+
|
||||
+ return giovfs->ShowURIForInput(url);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -2076,6 +2086,12 @@ nsLocalFile::Launch() {
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
+ if( nsKDEUtils::kdeSupport()) {
|
||||
+ nsTArray<nsCString> command;
|
||||
+ command.AppendElement( "OPEN"_ns );
|
||||
+ command.AppendElement( mPath );
|
||||
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE;
|
||||
+ }
|
||||
nsCOMPtr<nsIGIOService> giovfs = do_GetService(NS_GIOSERVICE_CONTRACTID);
|
||||
if (!giovfs) {
|
||||
return NS_ERROR_FAILURE;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
|
@ -1,764 +0,0 @@
|
|||
diff --git a/browser/components/preferences/jar.mn b/browser/components/preferences/jar.mn
|
||||
index 4f3babe..97c7ec2 100644
|
||||
--- a/browser/components/preferences/jar.mn
|
||||
+++ b/browser/components/preferences/jar.mn
|
||||
@@ -11,6 +11,7 @@ browser.jar:
|
||||
content/browser/preferences/home.js
|
||||
content/browser/preferences/search.js
|
||||
content/browser/preferences/privacy.js
|
||||
+ content/browser/preferences/librewolf.js
|
||||
content/browser/preferences/containers.js
|
||||
content/browser/preferences/sync.js
|
||||
content/browser/preferences/experimental.js
|
||||
diff --git a/browser/components/preferences/librewolf.inc.xhtml b/browser/components/preferences/librewolf.inc.xhtml
|
||||
new file mode 100644
|
||||
index 0000000..b627417
|
||||
--- /dev/null
|
||||
+++ b/browser/components/preferences/librewolf.inc.xhtml
|
||||
@@ -0,0 +1,206 @@
|
||||
+# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
+# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
+
|
||||
+<script src="chrome://browser/content/preferences/librewolf.js"/>
|
||||
+
|
||||
+<html:template id="template-paneLibrewolf">
|
||||
+
|
||||
+<hbox class="subcategory" hidden="true" data-category="paneLibrewolf">
|
||||
+ <html:h1 data-l10n-id="librewolf-header"/>
|
||||
+</hbox>
|
||||
+
|
||||
+<groupbox hidden="true" data-category="paneLibrewolf">
|
||||
+ <html:h2 data-l10n-id="librewolf-general-heading"/>
|
||||
+
|
||||
+ <!-- TEMPLATE FOR A NEW PREFERENCE
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-LABEL-checkbox" data-l10n-id="librewolf-LABEL-checkbox" preference="PREF" flex="1" />
|
||||
+ <html:label for="librewolf-LABEL-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-LABEL-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-LABEL-description" />
|
||||
+ <html:div> <image src="chrome://browser/skin/warning.svg" /> <label data-l10n-id="librewolf-LABEL-warning1" class="librewolf-warning" /> </html:div>
|
||||
+ <checkbox preference="PREF" label="PREF" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+ -->
|
||||
+
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-extension-update-checkbox" data-l10n-id="librewolf-extension-update-checkbox" preference="extensions.update.autoUpdateDefault" flex="1" />
|
||||
+ <html:label for="librewolf-extension-update-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-extension-update-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-extension-update-description" />
|
||||
+ <html:div> <image src="chrome://browser/skin/warning.svg" /> <label data-l10n-id="librewolf-extension-update-warning1" class="librewolf-warning" /> </html:div>
|
||||
+ <checkbox preference="extensions.update.autoUpdateDefault" label="extensions.update.autoUpdateDefault" />
|
||||
+ <checkbox preference="extensions.update.enabled" label="extensions.update.enabled" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-autocopy-checkbox" data-l10n-id="librewolf-autocopy-checkbox" preference="clipboard.autocopy" flex="1" />
|
||||
+ <html:label for="librewolf-autocopy-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-autocopy-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-autocopy-description" />
|
||||
+ <checkbox preference="clipboard.autocopy" label="clipboard.autocopy" />
|
||||
+ <checkbox preference="middlemouse.paste" label="middlemouse.paste" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-styling-checkbox" data-l10n-id="librewolf-styling-checkbox" preference="toolkit.legacyUserProfileCustomizations.stylesheets" flex="1" />
|
||||
+ <html:label for="librewolf-styling-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-styling-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-styling-description" />
|
||||
+ <html:div> <image src="chrome://browser/skin/warning.svg" /> <label data-l10n-id="librewolf-styling-warning1" class="librewolf-warning" /> </html:div>
|
||||
+ <checkbox preference="toolkit.legacyUserProfileCustomizations.stylesheets" label="toolkit.legacyUserProfileCustomizations.stylesheets" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+</groupbox>
|
||||
+
|
||||
+<groupbox hidden="true" data-category="paneLibrewolf">
|
||||
+ <html:h2 data-l10n-id="librewolf-network-heading" />
|
||||
+
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-ipv6-checkbox" data-l10n-id="librewolf-ipv6-checkbox" preference="network.dns.disableIPv6" flex="1" />
|
||||
+ <html:label for="librewolf-ipv6-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-ipv6-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-ipv6-description" />
|
||||
+ <html:div> <image src="chrome://browser/skin/warning.svg" /> <label data-l10n-id="librewolf-ipv6-warning1" class="librewolf-warning" /> </html:div>
|
||||
+ <checkbox preference="network.dns.disableIPv6" label="network.dns.disableIPv6" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+</groupbox>
|
||||
+
|
||||
+<groupbox hidden="true" data-category="paneLibrewolf">
|
||||
+ <html:h2 data-l10n-id="librewolf-broken-heading" />
|
||||
+
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-rfp-checkbox" data-l10n-id="librewolf-rfp-checkbox" preference="privacy.resistFingerprinting" flex="1" />
|
||||
+ <html:label for="librewolf-rfp-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-rfp-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-rfp-description" />
|
||||
+ <html:div> <image src="chrome://browser/skin/warning.svg" /> <label data-l10n-id="librewolf-rfp-warning1" class="librewolf-warning" /> </html:div>
|
||||
+ <checkbox preference="privacy.resistFingerprinting" label="privacy.resistFingerprinting" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+ <vbox class="indent">
|
||||
+
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-letterboxing-checkbox" data-l10n-id="librewolf-letterboxing-checkbox" preference="privacy.resistFingerprinting.letterboxing" flex="1" />
|
||||
+ <html:label for="librewolf-letterboxing-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-letterboxing-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-letterboxing-description" />
|
||||
+ <checkbox preference="privacy.resistFingerprinting.letterboxing" label="privacy.resistFingerprinting.letterboxing" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-auto-decline-canvas-checkbox" data-l10n-id="librewolf-auto-decline-canvas-checkbox" preference="privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" flex="1" />
|
||||
+ <html:label for="librewolf-auto-decline-canvas-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-auto-decline-canvas-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-auto-decline-canvas-description" />
|
||||
+ <html:div> <label data-l10n-id="librewolf-auto-decline-canvas-warning1" class="librewolf-warning" /> </html:div>
|
||||
+ <checkbox preference="privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" label="privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+ </vbox>
|
||||
+
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-webgl-checkbox" data-l10n-id="librewolf-webgl-checkbox" preference="webgl.disabled" flex="1" />
|
||||
+ <html:label for="librewolf-webgl-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-webgl-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-webgl-description" />
|
||||
+ <html:div> <image src="chrome://browser/skin/warning.svg" /> <label data-l10n-id="librewolf-webgl-warning1" class="librewolf-warning" /> </html:div>
|
||||
+ <checkbox preference="webgl.disabled" label="webgl.disabled" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+</groupbox>
|
||||
+
|
||||
+<groupbox hidden="true" data-category="paneLibrewolf">
|
||||
+ <html:h2 data-l10n-id="librewolf-security-heading" />
|
||||
+
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-goog-safe-checkbox" data-l10n-id="librewolf-goog-safe-checkbox" preference="browser.safebrowsing.malware.enabled" flex="1" />
|
||||
+ <html:label for="librewolf-goog-safe-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-goog-safe-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-goog-safe-description" />
|
||||
+ <html:div> <image src="chrome://browser/skin/warning.svg" /> <label data-l10n-id="librewolf-goog-safe-warning1" class="librewolf-warning" /> </html:div>
|
||||
+ <checkbox preference="browser.safebrowsing.malware.enabled" label="browser.safebrowsing.malware.enabled" />
|
||||
+ <checkbox preference="browser.safebrowsing.phishing.enabled" label="browser.safebrowsing.phishing.enabled" />
|
||||
+ <checkbox preference="browser.safebrowsing.blockedURIs.enabled" label="browser.safebrowsing.blockedURIs.enabled" />
|
||||
+ <checkbox preference="browser.safebrowsing.provider.google4.gethashURL" label="browser.safebrowsing.provider.google4.gethashURL" id="librewolf-goog-safe-hash4"/>
|
||||
+ <checkbox preference="browser.safebrowsing.provider.google4.updateURL" label="browser.safebrowsing.provider.google4.updateURL" id="librewolf-goog-safe-up4"/>
|
||||
+ <checkbox preference="browser.safebrowsing.provider.google.gethashURL" label="browser.safebrowsing.provider.google.gethashURL" id="librewolf-goog-safe-hash"/>
|
||||
+ <checkbox preference="browser.safebrowsing.provider.google.updateURL" label="browser.safebrowsing.provider.google.updateURL" id="librewolf-goog-safe-up"/>
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+ <vbox class="indent">
|
||||
+ <hbox>
|
||||
+ <checkbox id="librewolf-goog-safe-download-checkbox" data-l10n-id="librewolf-goog-safe-download-checkbox" preference="browser.safebrowsing.downloads.enabled" flex="1" />
|
||||
+ <html:label for="librewolf-goog-safe-download-collapse" class="sidebar-footer-link" pack="end"> <image class="sidebar-footer-icon help-icon"/> </html:label>
|
||||
+ </hbox>
|
||||
+ <vbox class="librewolf-collapse indent">
|
||||
+ <html:input type="checkbox" id="librewolf-goog-safe-download-collapse" />
|
||||
+ <vbox class="librewolf-collapsed tracking-protection-ui content-blocking-category">
|
||||
+ <label data-l10n-id="librewolf-goog-safe-download-description" />
|
||||
+ <html:div> <image src="chrome://browser/skin/warning.svg" /> <label data-l10n-id="librewolf-goog-safe-download-warning1" class="librewolf-warning" /> </html:div>
|
||||
+ <checkbox preference="browser.safebrowsing.downloads.enabled" label="browser.safebrowsing.downloads.enabled" />
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+ </vbox>
|
||||
+
|
||||
+</groupbox>
|
||||
+
|
||||
+<hbox class="subcategory" hidden="true" data-category="paneLibrewolf">
|
||||
+ <html:h1 data-l10n-id="librewolf-footer"/>
|
||||
+</hbox>
|
||||
+
|
||||
+<groupbox data-category="paneLibrewolf" hidden="true">
|
||||
+ <hbox>
|
||||
+ <label id="librewolf-config-link-wrapper" class="sidebar-footer-link" is="text-link" flex="1">
|
||||
+ <image class="sidebar-footer-icon" src="chrome://browser/skin/ion.svg" /> <!-- TODO not the typical way a picture is defined I think, and also we should copy the svg file in case they change it -->
|
||||
+ <label id="librewolf-config-link" data-l10n-id="librewolf-config-link"></label>
|
||||
+ </label>
|
||||
+ <hbox pack="end">
|
||||
+ <button id="librewolf-open-profile-button" class="accessory-button" is="highlightable-button" data-l10n-id="librewolf-open-profile"/>
|
||||
+ </hbox>
|
||||
+ </hbox>
|
||||
+</groupbox>
|
||||
+
|
||||
+</html:template>
|
||||
diff --git a/browser/components/preferences/librewolf.js b/browser/components/preferences/librewolf.js
|
||||
new file mode 100644
|
||||
index 0000000..c460b8c
|
||||
--- /dev/null
|
||||
+++ b/browser/components/preferences/librewolf.js
|
||||
@@ -0,0 +1,234 @@
|
||||
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
+
|
||||
+/* import-globals-from extensionControlled.js */
|
||||
+/* import-globals-from preferences.js */
|
||||
+
|
||||
+var { AppConstants } = ChromeUtils.import( "resource://gre/modules/AppConstants.jsm");
|
||||
+XPCOMUtils.defineLazyGetter(this, "L10n", () => {
|
||||
+ return new Localization([
|
||||
+ "branding/brand.ftl",
|
||||
+ "browser/preferences/preferences.ftl",
|
||||
+ ]);
|
||||
+});
|
||||
+
|
||||
+Preferences.addAll([
|
||||
+ // IPv6
|
||||
+ { id: "network.dns.disableIPv6", type: "bool" },
|
||||
+ // WebGL
|
||||
+ { id: "webgl.disabled", type: "bool" },
|
||||
+ // RFP
|
||||
+ { id: "privacy.resistFingerprinting", type: "bool" },
|
||||
+ // Automatically Update Extensions
|
||||
+ { id: "extensions.update.enabled", type: "bool" },
|
||||
+ { id: "extensions.update.autoUpdateDefault", type: "bool" },
|
||||
+ // Clipboard autocopy/paste
|
||||
+ { id: "clipboard.autocopy", type: "bool" },
|
||||
+ { id: "middlemouse.paste", type: "bool" },
|
||||
+ // Harden
|
||||
+ { id: "privacy.resistFingerprinting.letterboxing", type: "bool" },
|
||||
+ // Google Safe Browsing
|
||||
+ //{ id: "browser.safebrowsing.malware.enabled", type: "bool" }, // Already loaded
|
||||
+ //{ id: "browser.safebrowsing.phishing.enabled", type: "bool" },
|
||||
+ { id: "browser.safebrowsing.blockedURIs.enabled", type: "bool" },
|
||||
+ { id: "browser.safebrowsing.provider.google4.gethashURL", type: "string" },
|
||||
+ { id: "browser.safebrowsing.provider.google4.updateURL", type: "string" },
|
||||
+ { id: "browser.safebrowsing.provider.google.gethashURL", type: "string" },
|
||||
+ { id: "browser.safebrowsing.provider.google.updateURL", type: "string" },
|
||||
+ /**** Prefs that require changing a lockPref ****/
|
||||
+ // Google safe browsing check downloads
|
||||
+ //{ id: "browser.safebrowsing.downloads.enabled", type: "bool" }, //Also already added
|
||||
+ { id: "toolkit.legacyUserProfileCustomizations.stylesheets", type: "bool" },
|
||||
+ // Canvas UI when blocked
|
||||
+ { id: "privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts", type: "bool" },
|
||||
+]);
|
||||
+
|
||||
+var gLibrewolfPane = {
|
||||
+ _pane: null,
|
||||
+
|
||||
+ // called when the document is first parsed
|
||||
+ init() {
|
||||
+ this._pane = document.getElementById("paneLibrewolf");
|
||||
+
|
||||
+ // Set all event listeners on checkboxes
|
||||
+ setBoolSyncListeners(
|
||||
+ "librewolf-extension-update-checkbox",
|
||||
+ ["extensions.update.autoUpdateDefault", "extensions.update.enabled"],
|
||||
+ [true, true ],
|
||||
+ );
|
||||
+ setBoolSyncListeners(
|
||||
+ "librewolf-ipv6-checkbox",
|
||||
+ ["network.dns.disableIPv6"],
|
||||
+ [false, ],
|
||||
+ );
|
||||
+ setBoolSyncListeners(
|
||||
+ "librewolf-autocopy-checkbox",
|
||||
+ ["clipboard.autocopy", "middlemouse.paste"],
|
||||
+ [true, true ],
|
||||
+ );
|
||||
+ setBoolSyncListeners(
|
||||
+ "librewolf-styling-checkbox",
|
||||
+ ["toolkit.legacyUserProfileCustomizations.stylesheets"],
|
||||
+ [true, ],
|
||||
+ );
|
||||
+
|
||||
+ setBoolSyncListeners(
|
||||
+ "librewolf-webgl-checkbox",
|
||||
+ ["webgl.disabled"],
|
||||
+ [false ],
|
||||
+ );
|
||||
+ setBoolSyncListeners(
|
||||
+ "librewolf-rfp-checkbox",
|
||||
+ ["privacy.resistFingerprinting"],
|
||||
+ [true ],
|
||||
+ );
|
||||
+ setBoolSyncListeners(
|
||||
+ "librewolf-auto-decline-canvas-checkbox",
|
||||
+ ["privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts"],
|
||||
+ [true ],
|
||||
+ );
|
||||
+
|
||||
+ setBoolSyncListeners(
|
||||
+ "librewolf-letterboxing-checkbox",
|
||||
+ ["privacy.resistFingerprinting.letterboxing"],
|
||||
+ [true ],
|
||||
+ );
|
||||
+
|
||||
+ setSyncListeners(
|
||||
+ "librewolf-goog-safe-checkbox",
|
||||
+ [
|
||||
+ "browser.safebrowsing.malware.enabled",
|
||||
+ "browser.safebrowsing.phishing.enabled",
|
||||
+ "browser.safebrowsing.blockedURIs.enabled",
|
||||
+ "browser.safebrowsing.provider.google4.gethashURL",
|
||||
+ "browser.safebrowsing.provider.google4.updateURL",
|
||||
+ "browser.safebrowsing.provider.google.gethashURL",
|
||||
+ "browser.safebrowsing.provider.google.updateURL",
|
||||
+ ],
|
||||
+ [
|
||||
+ true,
|
||||
+ true,
|
||||
+ true,
|
||||
+ "https://safebrowsing.googleapis.com/v4/fullHashes:find?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST",
|
||||
+ "https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$ct=application/x-protobuf&key=%GOOGLE_SAFEBROWSING_API_KEY%&$httpMethod=POST",
|
||||
+ "https://safebrowsing.google.com/safebrowsing/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2",
|
||||
+ "https://safebrowsing.google.com/safebrowsing/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2&key=%GOOGLE_SAFEBROWSING_API_KEY%",
|
||||
+ ],
|
||||
+ [
|
||||
+ false,
|
||||
+ false,
|
||||
+ false,
|
||||
+ "",
|
||||
+ "",
|
||||
+ "",
|
||||
+ "",
|
||||
+ ]
|
||||
+ );
|
||||
+
|
||||
+ // Set event listener on open profile directory button
|
||||
+ setEventListener("librewolf-open-profile-button", "command", openProfileDirectory);
|
||||
+ // Set event listener on open about:config button
|
||||
+ setEventListener("librewolf-config-link", "click", openAboutConfig);
|
||||
+
|
||||
+ // Notify observers that the UI is now ready
|
||||
+ Services.obs.notifyObservers(window, "librewolf-pane-loaded");
|
||||
+ },
|
||||
+};
|
||||
+
|
||||
+function openProfileDirectory() {
|
||||
+ // Get the profile directory.
|
||||
+ let currProfD = Services.dirsvc.get("ProfD", Ci.nsIFile);
|
||||
+ let profileDir = currProfD.path;
|
||||
+
|
||||
+ // Show the profile directory.
|
||||
+ let nsLocalFile = Components.Constructor(
|
||||
+ "@mozilla.org/file/local;1",
|
||||
+ "nsIFile",
|
||||
+ "initWithPath"
|
||||
+ );
|
||||
+ new nsLocalFile(profileDir).reveal();
|
||||
+}
|
||||
+
|
||||
+function openAboutConfig() {
|
||||
+ window.open("about:config", "_blank");
|
||||
+}
|
||||
+
|
||||
+function setBoolSyncListeners(checkboxid, opts, vals) {
|
||||
+ setSyncFromPrefListener(checkboxid, () => readGenericBoolPrefs(opts, vals));
|
||||
+ setSyncToPrefListener(checkboxid, () => writeGenericBoolPrefs(opts, vals, document.getElementById(checkboxid).checked));
|
||||
+ for (let i = 1; i < opts.length; i++) {
|
||||
+ Preferences.get(opts[i]).on("change", () => makeMasterCheckboxesReactive(checkboxid, () => readGenericBoolPrefs(opts, vals)));
|
||||
+ }
|
||||
+}
|
||||
+function setSyncListeners(checkboxid, opts, onVals, offVals) {
|
||||
+ setSyncFromPrefListener(checkboxid, () => readGenericPrefs(opts, onVals, offVals));
|
||||
+ setSyncToPrefListener(checkboxid, () => writeGenericPrefs(opts, onVals, offVals, document.getElementById(checkboxid).checked));
|
||||
+ for (let i = 1; i < opts.length; i++) {
|
||||
+ Preferences.get(opts[i]).on("change", () => makeMasterCheckboxesReactive(checkboxid, () => readGenericPrefs(opts, onVals, offVals)));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+function makeMasterCheckboxesReactive(checkboxid, func) {
|
||||
+ let shouldBeChecked = func();
|
||||
+ document.getElementById(checkboxid).checked = shouldBeChecked;
|
||||
+}
|
||||
+
|
||||
+// Wrapper function in case something more is required (as I suspected in the first iteration of this)
|
||||
+function getPref(pref) {
|
||||
+ let retval = Preferences.get(pref);
|
||||
+/* if (retval === undefined) {
|
||||
+ return defaultValue;
|
||||
+ } */
|
||||
+ return retval._value;
|
||||
+}
|
||||
+// Returns true if all the preferences in prefs are equal to onVals, false otherwise TODO may need a third array for their default values because mozilla is dumb, after testing though pretty sure this was misinformation being spread by comments in default FF code that has long since been fixed
|
||||
+function readGenericBoolPrefs(prefs, onVals) {
|
||||
+ for (let i = 0; i < prefs.length; i++) {
|
||||
+ if (getPref(prefs[i]) != onVals[i]) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ return true;
|
||||
+}
|
||||
+function writeGenericBoolPrefs(opts, vals, changeToOn) {
|
||||
+ valsCopy = [...vals];
|
||||
+ if (!changeToOn) {
|
||||
+ for (let i = 0; i < vals.length; i++) {
|
||||
+ valsCopy[i] = !vals[i];
|
||||
+ }
|
||||
+ }
|
||||
+ // Start at 1 because returning sets the last one
|
||||
+ for (let i = 1; i < vals.length; i++) {
|
||||
+ Services.prefs.setBoolPref(opts[i], valsCopy[i]);
|
||||
+ }
|
||||
+ return valsCopy[0];
|
||||
+}
|
||||
+
|
||||
+// Returns true if all the preferences in prefs are equal to onVals, false otherwise... currently the same as for Bool as offVals is ignored
|
||||
+function readGenericPrefs(prefs, onVals, offVals) {
|
||||
+ for (let i = 0; i < prefs.length; i ++) {
|
||||
+ let temp = getPref(prefs[i]);
|
||||
+ if (getPref(prefs[i]) != onVals[i]) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ return true;
|
||||
+}
|
||||
+function writeGenericPrefs(opts, onVals, offVals, changeToOn) {
|
||||
+ let writeArr = (changeToOn) ? onVals : offVals;
|
||||
+ for (let i = 1; i < opts.length; i++) {
|
||||
+ let type = typeof(writeArr[i]);
|
||||
+ if (type == "number") {
|
||||
+ Services.prefs.setIntPref(opts[i], writeArr[i]);
|
||||
+ } else if (type == "boolean") {
|
||||
+ Services.prefs.setBoolPref(opts[i], writeArr[i]);
|
||||
+ } else if (type == "string") {
|
||||
+ Services.prefs.setCharPref(opts[i], writeArr[i]);
|
||||
+ } else {
|
||||
+ console.log("BADNESS 10000");
|
||||
+ }
|
||||
+ }
|
||||
+ return writeArr[0];
|
||||
+}
|
||||
+
|
||||
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
|
||||
index 91e9e46..763ab49 100644
|
||||
--- a/browser/components/preferences/preferences.js
|
||||
+++ b/browser/components/preferences/preferences.js
|
||||
@@ -8,6 +8,7 @@
|
||||
/* import-globals-from search.js */
|
||||
/* import-globals-from containers.js */
|
||||
/* import-globals-from privacy.js */
|
||||
+/* import-globals-from librewolf.js */
|
||||
/* import-globals-from sync.js */
|
||||
/* import-globals-from experimental.js */
|
||||
/* import-globals-from findInPage.js */
|
||||
@@ -117,6 +118,7 @@ function init_all() {
|
||||
register_module("paneHome", gHomePane);
|
||||
register_module("paneSearch", gSearchPane);
|
||||
register_module("panePrivacy", gPrivacyPane);
|
||||
+ register_module("paneLibrewolf", gLibrewolfPane);
|
||||
register_module("paneContainers", gContainersPane);
|
||||
if (Services.prefs.getBoolPref("browser.preferences.experimental")) {
|
||||
// Set hidden based on previous load's hidden value.
|
||||
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
|
||||
index aab4a9e..907a631 100644
|
||||
--- a/browser/components/preferences/preferences.xhtml
|
||||
+++ b/browser/components/preferences/preferences.xhtml
|
||||
@@ -12,6 +12,7 @@
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/search.css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/containers.css"?>
|
||||
<?xml-stylesheet href="chrome://browser/skin/preferences/privacy.css"?>
|
||||
+<?xml-stylesheet href="chrome://browser/skin/preferences/librewolf.css"?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
@@ -128,6 +129,17 @@
|
||||
<label class="category-name" flex="1" data-l10n-id="pane-privacy-title"></label>
|
||||
</richlistitem>
|
||||
|
||||
+ <richlistitem id="category-librewolf"
|
||||
+ class="category"
|
||||
+ value="paneLibrewolf"
|
||||
+ helpTopic="prefs-librewolf"
|
||||
+ data-l10n-id="category-librewolf"
|
||||
+ data-l10n-attrs="tooltiptext"
|
||||
+ align="center">
|
||||
+ <image class="category-icon"/>
|
||||
+ <label class="category-name" flex="1" data-l10n-id="pane-librewolf-title"></label>
|
||||
+ </richlistitem>
|
||||
+
|
||||
<richlistitem id="category-sync"
|
||||
class="category"
|
||||
hidden="true"
|
||||
@@ -201,6 +213,7 @@
|
||||
#include home.inc.xhtml
|
||||
#include search.inc.xhtml
|
||||
#include privacy.inc.xhtml
|
||||
+#include librewolf.inc.xhtml
|
||||
#include containers.inc.xhtml
|
||||
#include sync.inc.xhtml
|
||||
#include experimental.inc.xhtml
|
||||
diff --git a/browser/locales/en-US/browser/preferences/preferences.ftl b/browser/locales/en-US/browser/preferences/preferences.ftl
|
||||
index d276f7a..39f3660 100644
|
||||
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
|
||||
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
|
||||
@@ -1347,3 +1347,78 @@ choose-download-folder-title = Choose Download Folder:
|
||||
# $service-name (String) - Name of a cloud storage provider like Dropbox, Google Drive, etc...
|
||||
save-files-to-cloud-storage =
|
||||
.label = Save files to { $service-name }
|
||||
+
|
||||
+## LibreWolf preferences
|
||||
+
|
||||
+# Sidebar
|
||||
+pane-librewolf-title = LibreWolf
|
||||
+category-librewolf =
|
||||
+ .tooltiptext = about:config changes, logically grouped and easily accessible
|
||||
+
|
||||
+# Main content
|
||||
+librewolf-header = Librewolf Preferences
|
||||
+librewolf-warning-title = Heads up!
|
||||
+librewolf-warning-description = We carefully choose default settings to focus on privacy and security. When changing these settings, read the descriptions to understand the implications of those changes.
|
||||
+
|
||||
+# Page Layout
|
||||
+librewolf-general-heading = Browser Behavior
|
||||
+librewolf-extension-update-checkbox =
|
||||
+ .label = Update add-ons automatically
|
||||
+librewolf-autocopy-checkbox =
|
||||
+ .label = Enable middle click paste
|
||||
+librewolf-styling-checkbox =
|
||||
+ .label = Allow userChrome.css customization
|
||||
+
|
||||
+librewolf-network-heading = Networking
|
||||
+librewolf-ipv6-checkbox =
|
||||
+ .label = Enable IPv6
|
||||
+
|
||||
+librewolf-broken-heading = Fingerprinting
|
||||
+librewolf-webgl-checkbox =
|
||||
+ .label = Enable WebGL
|
||||
+librewolf-rfp-checkbox =
|
||||
+ .label = Enable ResistFingerprinting
|
||||
+librewolf-auto-decline-canvas-checkbox =
|
||||
+ .label = Silently block canvas access requests
|
||||
+librewolf-letterboxing-checkbox =
|
||||
+ .label = Enable letterboxing
|
||||
+
|
||||
+librewolf-security-heading = Security
|
||||
+librewolf-goog-safe-checkbox =
|
||||
+ .label = Enable Google Safe Browsing
|
||||
+librewolf-goog-safe-download-checkbox =
|
||||
+ .label = Scan downloads
|
||||
+
|
||||
+# In-depth descriptions
|
||||
+librewolf-extension-update-description = Keep extensions up to date without manual intervention. A good choice for your security.
|
||||
+librewolf-extension-update-warning1 = If you don't review the code of your extensions before every update, you should enable this option.
|
||||
+
|
||||
+librewolf-ipv6-description = Allow { -brand-short-name } to connect using IPv6.
|
||||
+librewolf-ipv6-warning1 = Before you change this, make sure your OS uses the IPv6 privacy extension.
|
||||
+
|
||||
+librewolf-autocopy-description = Select some text to copy it, then paste it with a middle-mouse click.
|
||||
+
|
||||
+librewolf-styling-description = Enable this if you want to customize the UI with a manually loaded theme.
|
||||
+librewolf-styling-warning1 = Make sure you trust the provider of the theme.
|
||||
+
|
||||
+librewolf-webgl-description = WebGL is a strong fingerprinting vector.
|
||||
+librewolf-webgl-warning1 = If you need to enable it, consider using an extension like Canvas Blocker.
|
||||
+
|
||||
+librewolf-rfp-description = ResistFingerprinting is the best in class anti-fingerprinting tool.
|
||||
+librewolf-rfp-warning1 = If you need to disable it, consider using an extension like Canvas Blocker.
|
||||
+
|
||||
+librewolf-auto-decline-canvas-description = Automatically deny canvas access to websites, without prompting the user.
|
||||
+librewolf-auto-decline-canvas-warning1 = It is still possible to allow canvas access from the urlbar.
|
||||
+
|
||||
+librewolf-letterboxing-description = Letterboxing applies margins around your windows, in order to return a limited set of rounded resolutions.
|
||||
+
|
||||
+librewolf-goog-safe-description = If you are worried about malware and phishing, consider enabling it.
|
||||
+librewolf-goog-safe-warning1 = Disabled over censorship concerns but recommended for less advanced users. All the checks happen locally.
|
||||
+
|
||||
+librewolf-goog-safe-download-description = Allow Safe Browsing to scan your downloads to identify suspicious files.
|
||||
+librewolf-goog-safe-download-warning1 = All the checks happen locally.
|
||||
+
|
||||
+# Footer
|
||||
+librewolf-footer = Useful links
|
||||
+librewolf-config-link = All advanced settings (about:config)
|
||||
+librewolf-open-profile = Open user profile directory
|
||||
diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn
|
||||
index cf1ebf0..336118c 100644
|
||||
--- a/browser/themes/shared/jar.inc.mn
|
||||
+++ b/browser/themes/shared/jar.inc.mn
|
||||
@@ -105,6 +105,7 @@
|
||||
skin/classic/browser/preferences/category-experiments.svg (../shared/preferences/category-experiments.svg)
|
||||
skin/classic/browser/preferences/category-general.svg (../shared/preferences/category-general.svg)
|
||||
skin/classic/browser/preferences/category-privacy-security.svg (../shared/preferences/category-privacy-security.svg)
|
||||
+ skin/classic/browser/preferences/category-librewolf.svg (../shared/preferences/category-librewolf.svg)
|
||||
skin/classic/browser/preferences/category-search.svg (../shared/preferences/category-search.svg)
|
||||
skin/classic/browser/preferences/category-sync.svg (../shared/preferences/category-sync.svg)
|
||||
skin/classic/browser/preferences/critters-postcard.jpg (../shared/preferences/critters-postcard.jpg)
|
||||
@@ -119,6 +120,7 @@
|
||||
skin/classic/browser/preferences/search-bar.svg (../shared/preferences/search-bar.svg)
|
||||
skin/classic/browser/preferences/search.css (../shared/preferences/search.css)
|
||||
skin/classic/browser/preferences/siteDataSettings.css (../shared/preferences/siteDataSettings.css)
|
||||
+ skin/classic/browser/preferences/librewolf.css (../shared/preferences/librewolf.css)
|
||||
* skin/classic/browser/preferences/containers.css (../shared/preferences/containers.css)
|
||||
* skin/classic/browser/preferences/containers-dialog.css (../shared/preferences/containers-dialog.css)
|
||||
skin/classic/browser/upgradeDialog/highlights-24.svg (../shared/upgradeDialog/highlights-24.svg)
|
||||
diff --git a/browser/themes/shared/preferences/category-librewolf.svg b/browser/themes/shared/preferences/category-librewolf.svg
|
||||
new file mode 100644
|
||||
index 0000000..8ebf2eb
|
||||
--- /dev/null
|
||||
+++ b/browser/themes/shared/preferences/category-librewolf.svg
|
||||
@@ -0,0 +1,96 @@
|
||||
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="20" height="20" fill="context-fill" fill-opacity="context-fill-opacity">
|
||||
+ <path d="M15.5 9 15 9l0-4A5 5 0 0 0 5 5l0 4-.5 0A2.5 2.5 0 0 0 2 11.5l0 6A2.5 2.5 0 0 0 4.5 20l11 0a2.5 2.5 0 0 0 2.5-2.5l0-6A2.5 2.5 0 0 0 15.5 9zm-9-4c0-1.93 1.57-3.5 3.5-3.5 1.93 0 3.5 1.57 3.5 3.5l0 4-7 0 0-4zm10 12.7-.8.8-11.4 0-.8-.8 0-6.4.8-.8 11.4 0 .8.8 0 6.4z"/>
|
||||
+</svg>
|
||||
+-->
|
||||
+
|
||||
+<svg
|
||||
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
+ xmlns:cc="http://creativecommons.org/ns#"
|
||||
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
+ xmlns:svg="http://www.w3.org/2000/svg"
|
||||
+ xmlns="http://www.w3.org/2000/svg"
|
||||
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
+ width="67.733337mm"
|
||||
+ height="67.733337mm"
|
||||
+ viewBox="0 0 67.733337 67.733337"
|
||||
+ version="1.1"
|
||||
+ id="svg8"
|
||||
+ inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||
+ sodipodi:docname="LibreWolf.svg">
|
||||
+ <defs
|
||||
+ id="defs2" />
|
||||
+ <sodipodi:namedview
|
||||
+ id="base"
|
||||
+ pagecolor="#ffffff"
|
||||
+ bordercolor="#666666"
|
||||
+ borderopacity="1.0"
|
||||
+ inkscape:pageopacity="0.0"
|
||||
+ inkscape:pageshadow="2"
|
||||
+ inkscape:zoom="0.9899495"
|
||||
+ inkscape:cx="-15.106575"
|
||||
+ inkscape:cy="110.91343"
|
||||
+ inkscape:document-units="mm"
|
||||
+ inkscape:current-layer="layer1"
|
||||
+ showgrid="false"
|
||||
+ inkscape:window-width="1366"
|
||||
+ inkscape:window-height="711"
|
||||
+ inkscape:window-x="0"
|
||||
+ inkscape:window-y="30"
|
||||
+ inkscape:window-maximized="1"
|
||||
+ inkscape:showpageshadow="false"
|
||||
+ units="px"
|
||||
+ fit-margin-top="0"
|
||||
+ fit-margin-left="0"
|
||||
+ fit-margin-right="0"
|
||||
+ fit-margin-bottom="0" />
|
||||
+ <metadata
|
||||
+ id="metadata5">
|
||||
+ <rdf:RDF>
|
||||
+ <cc:Work
|
||||
+ rdf:about="">
|
||||
+ <dc:format>image/svg+xml</dc:format>
|
||||
+ <dc:type
|
||||
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
+ <dc:title />
|
||||
+ </cc:Work>
|
||||
+ </rdf:RDF>
|
||||
+ </metadata>
|
||||
+ <g
|
||||
+ inkscape:label="Layer 1"
|
||||
+ inkscape:groupmode="layer"
|
||||
+ id="layer1"
|
||||
+ transform="translate(-42.106554,-153.8982)">
|
||||
+ <circle
|
||||
+ style="fill:#00acff;fill-opacity:1;stroke:none;stroke-width:0.53545821;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
+ id="path875"
|
||||
+ cx="75.973221"
|
||||
+ cy="187.76486"
|
||||
+ r="33.866669" />
|
||||
+ <path
|
||||
+ style="fill:#ffffff;stroke-width:0.13229167"
|
||||
+ d="m 72.543594,214.67719 c -4.744093,-0.60875 -9.281981,-2.49991 -13.241953,-5.51858 -1.29157,-0.98455 -3.714943,-3.42363 -4.772834,-4.80375 -2.96241,-3.86476 -4.804479,-8.2508 -5.41218,-12.88661 -0.260164,-1.98464 -0.258719,-5.63349 0.0029,-7.44738 1.308078,-9.0677 7.01463,-16.8454 15.20915,-20.72918 3.811512,-1.80647 7.300266,-2.57114 11.730683,-2.57114 7.165903,0 13.5265,2.56749 18.680882,7.54063 2.483054,2.39575 4.148141,4.66808 5.573968,7.60677 1.92868,3.9751 2.70979,7.43276 2.70979,11.99526 0,6.00619 -1.7345,11.24407 -5.336957,16.11672 -1.070527,1.44797 -3.161747,3.64749 -4.549468,4.78507 -3.806562,3.12041 -8.658642,5.23183 -13.473174,5.86296 -1.663528,0.21807 -5.593318,0.24524 -7.120854,0.0492 z m 10.041381,-4.86547 c 2.898391,-0.91366 5.260364,-2.14146 7.540624,-3.91979 1.212494,-0.9456 3.308223,-3.06144 4.186916,-4.22711 2.38328,-3.16162 4.004927,-7.12196 4.482067,-10.94597 0.229814,-1.84182 0.09634,-5.73827 -0.2545,-7.4296 -0.9294,-4.48046 -2.931647,-8.26499 -6.086007,-11.50342 -1.966575,-2.01898 -3.756882,-3.34972 -6.060203,-4.50458 -3.495001,-1.75236 -6.489835,-2.46043 -10.423481,-2.46442 -4.164073,-0.004 -7.815325,0.95024 -11.429055,2.98766 -3.289753,1.85476 -6.690628,5.25952 -8.553227,8.563 -1.371786,2.43299 -2.37583,5.32029 -2.767595,7.95869 -0.256867,1.72991 -0.261933,5.16508 -0.01006,6.82145 0.504067,3.31489 1.761474,6.59111 3.584314,9.33904 0.995409,1.50058 0.964154,1.48393 1.842248,0.98153 1.570774,-0.8987 1.980396,-1.33342 2.836087,-3.00984 1.000624,-1.96036 2.070459,-3.6735 3.037094,-4.86332 1.115822,-1.37347 1.269228,-1.61793 1.828988,-2.9147 0.281654,-0.65249 0.786977,-1.61074 1.122938,-2.12943 l 0.61084,-0.94309 -0.79023,-0.77671 c -1.049647,-1.03168 -1.922751,-2.2016 -2.087012,-2.79651 -0.167761,-0.60758 0.03021,-0.9466 0.818744,-1.40207 0.797354,-0.46057 1.367585,-0.5929 3.498657,-0.81193 1.037629,-0.10665 2.164153,-0.30199 2.518962,-0.43681 0.353024,-0.13414 1.407825,-0.70824 2.344001,-1.27579 2.702947,-1.63863 2.931619,-1.72344 4.552111,-1.68831 1.368686,0.0297 1.371262,0.0291 2.182813,-0.46143 1.700674,-1.02802 4.14305,-2.88289 7.357044,-5.58733 0.61632,-0.5186 1.21002,-0.92569 1.31934,-0.90464 0.45462,0.0876 1.289567,2.13636 1.416407,3.47562 0.07693,0.81225 -0.08023,1.6155 -0.562014,2.87261 -0.13146,0.34301 -0.19208,0.67043 -0.134706,0.7276 0.13774,0.13726 0.610706,-0.4535 0.610706,-0.76279 0,-0.39435 0.261127,-0.43936 0.616327,-0.10623 0.258235,0.24218 0.480842,0.31151 1.000202,0.31151 0.567073,0 0.707447,0.0526 0.928773,0.3479 0.375574,0.50112 0.463647,1.86688 0.176201,2.73231 -0.279641,0.84191 -1.124801,1.81287 -1.891829,2.17341 -0.686334,0.32262 -2.075841,1.67928 -2.726081,2.66164 -0.248906,0.37604 -0.715586,1.15995 -1.037066,1.74204 -0.321487,0.58208 -0.86074,1.46154 -1.19834,1.95436 -0.664294,0.96972 -1.233147,2.3224 -1.782214,4.23798 -0.322553,1.1253 -0.34962,1.41826 -0.362953,3.92797 -0.01613,3.0317 -0.172894,3.77561 -0.9925,4.7091 -0.931805,1.06126 -1.861937,3.39186 -1.940127,4.8613 -0.04935,0.92751 -0.192246,1.83164 -0.395304,2.50122 -0.08942,0.29484 0.07752,0.2914 1.072102,-0.0221 z"
|
||||
+ id="path847"
|
||||
+ inkscape:connector-curvature="0" />
|
||||
+ <path
|
||||
+ sodipodi:type="star"
|
||||
+ style="fill:#00acff;fill-opacity:1;stroke:none;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
+ id="path814"
|
||||
+ sodipodi:sides="4"
|
||||
+ sodipodi:cx="18.854025"
|
||||
+ sodipodi:cy="172.98837"
|
||||
+ sodipodi:r1="1.6036172"
|
||||
+ sodipodi:r2="1.1339285"
|
||||
+ sodipodi:arg1="1.5707963"
|
||||
+ sodipodi:arg2="2.3561945"
|
||||
+ inkscape:flatsided="true"
|
||||
+ inkscape:rounded="0"
|
||||
+ inkscape:randomized="0"
|
||||
+ d="m 18.854025,174.59199 -1.603617,-1.60362 1.603617,-1.60361 1.603617,1.60361 z"
|
||||
+ transform="matrix(0.23203125,0.40188991,-0.99392962,0.57384553,246.21921,73.888081)" />
|
||||
+ </g>
|
||||
+</svg>
|
||||
+
|
||||
diff --git a/browser/themes/shared/preferences/librewolf.css b/browser/themes/shared/preferences/librewolf.css
|
||||
new file mode 100644
|
||||
index 0000000..aeb550c
|
||||
--- /dev/null
|
||||
+++ b/browser/themes/shared/preferences/librewolf.css
|
||||
@@ -0,0 +1,16 @@
|
||||
+.librewolf-collapse > input {
|
||||
+ display: none;
|
||||
+}
|
||||
+.librewolf-collapse > input ~ .librewolf-collapsed {
|
||||
+ display: none;
|
||||
+ /* max-height: 0; */
|
||||
+ transition: max-height 0.25s ease-in-out;
|
||||
+}
|
||||
+.librewolf-collapse > input:checked ~ .librewolf-collapsed {
|
||||
+ display: block;
|
||||
+ /* max-height: 20rem; */
|
||||
+}
|
||||
+.librewolf-warning {
|
||||
+ display: inline;
|
||||
+ font-size: 0.8em;
|
||||
+}
|
||||
diff --git a/browser/themes/shared/preferences/preferences.inc.css b/browser/themes/shared/preferences/preferences.inc.css
|
||||
index 31bffd0..1f9fbcf 100644
|
||||
--- a/browser/themes/shared/preferences/preferences.inc.css
|
||||
+++ b/browser/themes/shared/preferences/preferences.inc.css
|
||||
@@ -201,6 +201,10 @@ checkbox {
|
||||
list-style-image: url("chrome://browser/skin/preferences/category-privacy-security.svg");
|
||||
}
|
||||
|
||||
+#category-librewolf > .category-icon {
|
||||
+ list-style-image: url("chrome://browser/skin/preferences/category-librewolf.svg");
|
||||
+}
|
||||
+
|
||||
#category-sync > .category-icon {
|
||||
list-style-image: url("chrome://browser/skin/preferences/category-sync.svg");
|
||||
}
|
||||
|
|
@ -137,15 +137,19 @@ patch -Np1 -i ${_PATCHES_DIR}/remove_addons.patch
|
|||
|
||||
# Disable (some) megabar functionality
|
||||
# Adapted from https://github.com/WesleyBranton/userChrome.css-Customizations
|
||||
patch -Np1 -i ${_PATCHES_DIR}/deprecated/megabar.patch
|
||||
patch -Np1 -i ${_PATCHES_DIR}/removed-patches/megabar.patch
|
||||
|
||||
# remove mozilla vpn ads
|
||||
patch -Np1 -i ${_PATCHES_DIR}/mozilla-vpn-ad.patch
|
||||
|
||||
# Debian patch to enable global menubar
|
||||
if [[ ! -z "${GLOBAL_MENUBAR}" ]];then
|
||||
# if [[ ! -z "${GLOBAL_MENUBAR}" ]];then
|
||||
# patch -Np1 -i ${_PATCHES_DIR}/unity-menubar.patch
|
||||
# fi
|
||||
|
||||
# experimentally re-included
|
||||
patch -Np1 -i ${_PATCHES_DIR}/unity-menubar.patch
|
||||
fi
|
||||
patch -Np1 -i ${CI_PROJECT_DIR}/deb_patches/mozilla-kde_after_unity.patch
|
||||
|
||||
# Disabling Pocket
|
||||
printf "\nDisabling Pocket\n";
|
||||
|
|
@ -205,6 +209,6 @@ patch -Np1 -i ${_PATCHES_DIR}/ui-patches/remove-snippets-from-home.patch
|
|||
patch -Np1 -i ${_PATCHES_DIR}/ui-patches/sanitizing-description.patch
|
||||
|
||||
# pref pane
|
||||
patch -Np1 -i "${CI_PROJECT_DIR}/deb_patches/pref_pane.patch"
|
||||
patch -Np1 -i ${_PATCHES_DIR}/librewolf-pref-pane.patch
|
||||
|
||||
rm -rf common
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ LAUNCHER_SCRIPT=$3;
|
|||
CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(realpath $(dirname $0)/../)}
|
||||
_SCRIPT_FOLDER=$(realpath $(dirname $0));
|
||||
_EXTRACTED_TARBALL_FOLDER=$_SCRIPT_FOLDER/librewolf;
|
||||
_SETTINGS_TAG=${SETTINGS_TAG:-'5.1'}
|
||||
_SETTINGS_TAG=${SETTINGS_TAG:-'5.2'}
|
||||
_SETTINGS_REPO='https://gitlab.com/librewolf-community/settings.git';
|
||||
|
||||
# Extracts the binary tarball
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue