0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 13:43:04 -05:00

Merge branch 'patches_from_common' into 'main'

add remaining patches from common to allow switching over to source

See merge request librewolf-community/browser/source!20
This commit is contained in:
Bert van der Weerd 2022-03-09 11:33:18 +00:00
commit 54387fd628
4 changed files with 3571 additions and 7 deletions

98
patches/dbus_name.patch Normal file
View file

@ -0,0 +1,98 @@
diff --git a/toolkit/components/remote/nsDBusRemoteClient.cpp b/toolkit/components/remote/nsDBusRemoteClient.cpp
index 1c8db04..d8916f5 100644
--- a/toolkit/components/remote/nsDBusRemoteClient.cpp
+++ b/toolkit/components/remote/nsDBusRemoteClient.cpp
@@ -86,7 +86,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram,
profileName.ReplaceChar("+/=-", '_');
aDestinationName =
- nsPrintfCString("org.mozilla.%s.%s", aProgram, profileName.get());
+ nsPrintfCString("io.gitlab.%s.%s", aProgram, profileName.get());
if (aDestinationName.Length() > DBUS_MAXIMUM_NAME_LENGTH)
aDestinationName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
@@ -99,7 +99,7 @@ bool nsDBusRemoteClient::GetRemoteDestinationName(const char* aProgram,
if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) {
// We don't have a valid busName yet - try to create a default one.
aDestinationName =
- nsPrintfCString("org.mozilla.%s.%s", aProgram, "default");
+ nsPrintfCString("io.gitlab.%s.%s", aProgram, "default");
if (!sDBusValidateBusName(aDestinationName.get(), nullptr)) {
// We failed completelly to get a valid bus name - just quit
// to prevent crash at dbus_bus_request_name().
@@ -122,7 +122,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProgram,
return NS_ERROR_FAILURE;
nsAutoCString pathName;
- pathName = nsPrintfCString("/org/mozilla/%s/Remote", appName.get());
+ pathName = nsPrintfCString("/io/gitlab/%s/Remote", appName.get());
static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym(
RTLD_DEFAULT, "dbus_validate_path");
@@ -132,7 +132,7 @@ nsresult nsDBusRemoteClient::DoSendDBusCommandLine(const char* aProgram,
}
nsAutoCString remoteInterfaceName;
- remoteInterfaceName = nsPrintfCString("org.mozilla.%s", appName.get());
+ remoteInterfaceName = nsPrintfCString("io.gitlab.%s", appName.get());
RefPtr<DBusMessage> msg =
already_AddRefed<DBusMessage>(dbus_message_new_method_call(
diff --git a/toolkit/components/remote/nsDBusRemoteServer.cpp b/toolkit/components/remote/nsDBusRemoteServer.cpp
index ff88482..28e6329 100644
--- a/toolkit/components/remote/nsDBusRemoteServer.cpp
+++ b/toolkit/components/remote/nsDBusRemoteServer.cpp
@@ -33,7 +33,7 @@ static const char* introspect_template =
" <arg name=\"data\" direction=\"out\" type=\"s\"/>\n"
" </method>\n"
" </interface>\n"
- " <interface name=\"org.mozilla.%s\">\n"
+ " <interface name=\"io.gitlab.%s\">\n"
" <method name=\"OpenURL\">\n"
" <arg name=\"url\" direction=\"in\" type=\"ay\"/>\n"
" </method>\n"
@@ -68,7 +68,7 @@ DBusHandlerResult nsDBusRemoteServer::OpenURL(DBusMessage* msg) {
&commandLine, &length, DBUS_TYPE_INVALID) ||
length == 0) {
nsAutoCString errorMsg;
- errorMsg = nsPrintfCString("org.mozilla.%s.Error", mAppName.get());
+ errorMsg = nsPrintfCString("io.gitlab.%s.Error", mAppName.get());
reply = dbus_message_new_error(msg, errorMsg.get(), "Wrong argument");
} else {
guint32 timestamp = gtk_get_current_event_time();
@@ -98,7 +98,7 @@ DBusHandlerResult nsDBusRemoteServer::HandleDBusMessage(
}
nsAutoCString ourInterfaceName;
- ourInterfaceName = nsPrintfCString("org.mozilla.%s", mAppName.get());
+ ourInterfaceName = nsPrintfCString("io.gitlab.%s", mAppName.get());
if ((strcmp("OpenURL", method) == 0) &&
(strcmp(ourInterfaceName.get(), iface) == 0)) {
@@ -164,7 +164,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
nsAutoCString busName;
busName =
- nsPrintfCString("org.mozilla.%s.%s", mAppName.get(), profileName.get());
+ nsPrintfCString("io.gitlab.%s.%s", mAppName.get(), profileName.get());
if (busName.Length() > DBUS_MAXIMUM_NAME_LENGTH)
busName.Truncate(DBUS_MAXIMUM_NAME_LENGTH);
@@ -176,7 +176,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
// We don't have a valid busName yet - try to create a default one.
if (!sDBusValidateBusName(busName.get(), nullptr)) {
- busName = nsPrintfCString("org.mozilla.%s.%s", mAppName.get(), "default");
+ busName = nsPrintfCString("io.gitlab.%s.%s", mAppName.get(), "default");
if (!sDBusValidateBusName(busName.get(), nullptr)) {
// We failed completelly to get a valid bus name - just quit
// to prevent crash at dbus_bus_request_name().
@@ -196,7 +196,7 @@ nsresult nsDBusRemoteServer::Startup(const char* aAppName,
return NS_ERROR_FAILURE;
}
- mPathName = nsPrintfCString("/org/mozilla/%s/Remote", mAppName.get());
+ mPathName = nsPrintfCString("/io/gitlab/%s/Remote", mAppName.get());
static auto sDBusValidatePathName = (bool (*)(const char*, DBusError*))dlsym(
RTLD_DEFAULT, "dbus_validate_path");
if (!sDBusValidatePathName ||

1908
patches/mozilla-kde.patch Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -32,7 +32,7 @@
+ continue;
+ }
+
if (toolbar.id == "PersonalToolbar" && gBookmarksToolbar2h2020) {
if (toolbar.id == "PersonalToolbar") {
let menu = BookmarkingUI.buildBookmarksToolbarSubmenu(toolbar);
popup.insertBefore(menu, firstMenuItem);
--- a/browser/components/places/content/places.xhtml
@ -72,7 +72,7 @@
nsINode* XULPopupElement::GetTriggerNode() const {
--- a/dom/xul/moz.build
+++ b/dom/xul/moz.build
@@ -83,6 +83,11 @@ LOCAL_INCLUDES += [
@@ -83,4 +83,9 @@ LOCAL_INCLUDES += [
include("/ipc/chromium/chromium-config.mozbuild")
@ -82,8 +82,6 @@
+ ]
+
FINAL_LIBRARY = "xul"
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
--- a/layout/build/moz.build
+++ b/layout/build/moz.build
@@ -68,6 +68,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "an
@ -5086,7 +5084,7 @@
#endif
@@ -168,6 +170,8 @@ class nsWindow final : public nsBaseWidg
nsIScreen* aTargetScreen = nullptr) override;
virtual void HideWindowChrome(bool aShouldHide) override;
void HideWindowChrome(bool aShouldHide) override;
+ void SetMenuBar(mozilla::UniquePtr<nsMenuBar> aMenuBar);
+
@ -5236,7 +5234,7 @@
+
EXPORTS.mozilla += [
"BasicEvents.h",
"CommandList.h",
"ColorScheme.h",
--- /dev/null
+++ b/widget/nsINativeMenuService.h
@@ -0,0 +1,39 @@