author | Wolfgang Rosenauer <wr@rosenauer.org> |
Fri, 22 Mar 2024 10:02:25 +0100 | |
branch | firefox123 |
changeset 1201 | 3a2c95022db2 |
parent 1200 | 2a0735b1eb92 |
permissions | -rw-r--r-- |
1196 | 1 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 |
From: Martin Sirringhaus <msirringhaus@suse.de> |
|
3 |
Date: Tue, 8 Aug 2023 16:18:24 +0300 |
|
4 |
Subject: [PATCH] Add KDE integration to Firefox |
|
5 |
||
6 |
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=140751 |
|
7 |
Bug: https://bugzilla.suse.com/show_bug.cgi?id=170055 |
|
8 |
||
1097 | 9 |
How to apply this patch: |
1196 | 10 |
|
1097 | 11 |
1. Import and apply it |
12 |
2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul |
|
13 |
3. Find editBookmarkPanelDoneButton |
|
14 |
4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style) |
|
15 |
5. hg qrefresh |
|
1196 | 16 |
--- |
17 |
browser/components/preferences/main.js | 18 +++ |
|
18 |
browser/components/shell/moz.build | 2 + |
|
19 |
.../components/shell/nsKDEShellService.cpp | 109 ++++++++++++++++++ |
|
20 |
browser/components/shell/nsKDEShellService.h | 32 +++++ |
|
21 |
.../components/shell/nsUnixShellService.cpp | 22 ++++ |
|
22 |
browser/components/shell/nsUnixShellService.h | 15 +++ |
|
23 |
6 files changed, 198 insertions(+) |
|
24 |
create mode 100644 browser/components/shell/nsKDEShellService.cpp |
|
25 |
create mode 100644 browser/components/shell/nsKDEShellService.h |
|
26 |
create mode 100644 browser/components/shell/nsUnixShellService.cpp |
|
27 |
create mode 100644 browser/components/shell/nsUnixShellService.h |
|
823 | 28 |
|
1196 | 29 |
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js |
30 |
--- a/browser/components/preferences/main.js |
|
31 |
+++ b/browser/components/preferences/main.js |
|
1200 | 32 |
@@ -292,16 +292,23 @@ var gMainPane = { |
1198 | 33 |
}, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ? this._backoffIndex++ : backoffTimes.length - 1]); |
34 |
}; |
|
35 |
||
36 |
window.setTimeout(() => { |
|
37 |
window.requestIdleCallback(pollForDefaultBrowser); |
|
1005 | 38 |
}, backoffTimes[this._backoffIndex]); |
952
8094e6bba260
rebased patches for 53.0b4
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
943
diff
changeset
|
39 |
} |
985 | 40 |
|
223 | 41 |
+ var env = Components.classes["@mozilla.org/process/environment;1"] |
985 | 42 |
+ .getService(Components.interfaces.nsIEnvironment); |
223 | 43 |
+ var kde_session = 0; |
956 | 44 |
+ if (env.get('KDE_FULL_SESSION') == "true") { |
985 | 45 |
+ kde_session = 1; |
952
8094e6bba260
rebased patches for 53.0b4
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
943
diff
changeset
|
46 |
+ } |
985 | 47 |
+ |
1005 | 48 |
this.initBrowserContainers(); |
985 | 49 |
this.buildContentProcessCountMenuList(); |
916 | 50 |
|
1198 | 51 |
this.updateDefaultPerformanceSettingsPref(); |
52 |
||
53 |
let defaultPerformancePref = Preferences.get( |
|
54 |
"browser.preferences.defaultPerformanceSettings.enabled" |
|
55 |
); |
|
1200 | 56 |
@@ -1753,16 +1760,27 @@ var gMainPane = { |
1198 | 57 |
|
1200 | 58 |
// Disable the set default button, so that the user doesn't try to hit it again |
59 |
// while awaiting on setDefaultBrowser |
|
60 |
let setDefaultButton = document.getElementById("setDefaultButton"); |
|
61 |
setDefaultButton.disabled = true; |
|
62 |
||
935
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
63 |
try { |
1200 | 64 |
await shellSvc.setDefaultBrowser(false); |
935
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
65 |
+ if (kde_session == 1) { |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
66 |
+ var shellObj = Components.classes["@mozilla.org/file/local;1"] |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
67 |
+ .createInstance(Components.interfaces.nsILocalFile); |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
68 |
+ shellObj.initWithPath("/usr/bin/kwriteconfig"); |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
69 |
+ var process = Components.classes["@mozilla.org/process/util;1"] |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
70 |
+ .createInstance(Components.interfaces.nsIProcess); |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
71 |
+ process.init(shellObj); |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
72 |
+ var args = ["--file", "kdeglobals", "--group", "General", "--key", |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
73 |
+ "BrowserApplication", "firefox"]; |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
74 |
+ process.run(false, args, args.length); |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
75 |
+ } |
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
76 |
} catch (ex) { |
1183 | 77 |
console.error(ex); |
935
9ae2b79d3bb1
prepare FF 51 -> 51.0b14
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
932
diff
changeset
|
78 |
return; |
1200 | 79 |
} finally { |
80 |
// Make sure to re-enable the default button when we're finished, regardless of the outcome |
|
81 |
setDefaultButton.disabled = false; |
|
1198 | 82 |
} |
83 |
||
1196 | 84 |
diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build |
85 |
--- a/browser/components/shell/moz.build |
|
86 |
+++ b/browser/components/shell/moz.build |
|
1198 | 87 |
@@ -31,16 +31,18 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "coco |
88 |
] |
|
89 |
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": |
|
90 |
XPIDL_SOURCES += [ |
|
91 |
"nsIGNOMEShellService.idl", |
|
92 |
] |
|
1089 | 93 |
|
1057
b70ce330958c
successfull RPM build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1055
diff
changeset
|
94 |
SOURCES += [ |
1152 | 95 |
"nsGNOMEShellService.cpp", |
96 |
+ "nsKDEShellService.cpp", |
|
97 |
+ "nsUnixShellService.cpp", |
|
659 | 98 |
] |
1152 | 99 |
if CONFIG["MOZ_ENABLE_DBUS"]: |
1127 | 100 |
SOURCES += [ |
1198 | 101 |
"nsGNOMEShellDBusHelper.cpp", |
102 |
"nsGNOMEShellSearchProvider.cpp", |
|
103 |
] |
|
104 |
include("/ipc/chromium/chromium-config.mozbuild") |
|
105 |
||
1196 | 106 |
diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp |
107 |
new file mode 100644 |
|
1099
8a3c73e74e65
68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1097
diff
changeset
|
108 |
--- /dev/null |
1196 | 109 |
+++ b/browser/components/shell/nsKDEShellService.cpp |
1198 | 110 |
@@ -0,0 +1,108 @@ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
111 |
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
548 | 112 |
+/* This Source Code Form is subject to the terms of the Mozilla Public |
113 |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
114 |
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
115 |
+ |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
116 |
+#include "mozilla/ArrayUtils.h" |
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
117 |
+ |
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
118 |
+#include "nsCOMPtr.h" |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
119 |
+#include "nsKDEShellService.h" |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
120 |
+#include "nsShellService.h" |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
121 |
+#include "nsKDEUtils.h" |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
122 |
+#include "nsIPrefService.h" |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
123 |
+#include "nsIProcess.h" |
515 | 124 |
+#include "nsIFile.h" |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
125 |
+#include "nsServiceManagerUtils.h" |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
126 |
+#include "nsComponentManagerUtils.h" |
398
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
127 |
+#include "nsIMutableArray.h" |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
128 |
+#include "nsISupportsPrimitives.h" |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
129 |
+#include "nsArrayUtils.h" |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
130 |
+ |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
131 |
+using namespace mozilla; |
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
132 |
+ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
133 |
+nsresult |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
134 |
+nsKDEShellService::Init() |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
135 |
+{ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
136 |
+ if( !nsKDEUtils::kdeSupport()) |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
137 |
+ return NS_ERROR_NOT_AVAILABLE; |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
138 |
+ return NS_OK; |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
139 |
+} |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
140 |
+ |
911 | 141 |
+NS_IMPL_ISUPPORTS(nsKDEShellService, nsIGNOMEShellService, nsIShellService) |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
142 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
143 |
+NS_IMETHODIMP |
1089 | 144 |
+nsKDEShellService::IsDefaultBrowser(bool aForAllTypes, |
367
3fabd9f66322
begin Firefox 10 cycle
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
356
diff
changeset
|
145 |
+ bool* aIsDefaultBrowser) |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
146 |
+{ |
398
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
147 |
+ *aIsDefaultBrowser = false; |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
148 |
+ |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
149 |
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
150 |
+ if (!command) |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
151 |
+ return NS_ERROR_FAILURE; |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
152 |
+ |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
153 |
+ nsCOMPtr<nsISupportsCString> str = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
154 |
+ if (!str) |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
155 |
+ return NS_ERROR_FAILURE; |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
156 |
+ |
1141 | 157 |
+ str->SetData("ISDEFAULTBROWSER"_ns); |
1021
1307721d2345
fixed patches for FF58
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1020
diff
changeset
|
158 |
+ command->AppendElement( str ); |
398
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
159 |
+ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
160 |
+ if( nsKDEUtils::command( command )) |
398
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
161 |
+ *aIsDefaultBrowser = true; |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
162 |
+ return NS_OK; |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
163 |
+} |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
164 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
165 |
+NS_IMETHODIMP |
1198 | 166 |
+nsKDEShellService::SetDefaultBrowser(bool aForAllUsers) |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
167 |
+{ |
398
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
168 |
+ nsCOMPtr<nsIMutableArray> command = do_CreateInstance( NS_ARRAY_CONTRACTID ); |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
169 |
+ if (!command) |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
170 |
+ return NS_ERROR_FAILURE; |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
171 |
+ |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
172 |
+ nsCOMPtr<nsISupportsCString> cmdstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
173 |
+ nsCOMPtr<nsISupportsCString> paramstr = do_CreateInstance( NS_SUPPORTS_CSTRING_CONTRACTID ); |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
174 |
+ if (!cmdstr || !paramstr) |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
175 |
+ return NS_ERROR_FAILURE; |
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
176 |
+ |
1141 | 177 |
+ cmdstr->SetData("SETDEFAULTBROWSER"_ns); |
1021
1307721d2345
fixed patches for FF58
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1020
diff
changeset
|
178 |
+ command->AppendElement( cmdstr ); |
398
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
179 |
+ |
1198 | 180 |
+ paramstr->SetData("ALLTYPES"_ns); |
1021
1307721d2345
fixed patches for FF58
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1020
diff
changeset
|
181 |
+ command->AppendElement( paramstr ); |
398
937669e1c537
ported and reenabled KDE integration (bnc#746591)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
367
diff
changeset
|
182 |
+ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
183 |
+ return nsKDEUtils::command( command ) ? NS_OK : NS_ERROR_FAILURE; |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
184 |
+} |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
185 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
186 |
+NS_IMETHODIMP |
910
a3615665211f
readd accidentally removed getter method
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
909
diff
changeset
|
187 |
+nsKDEShellService::GetCanSetDesktopBackground(bool* aResult) |
a3615665211f
readd accidentally removed getter method
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
909
diff
changeset
|
188 |
+{ |
a3615665211f
readd accidentally removed getter method
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
909
diff
changeset
|
189 |
+ *aResult = true; |
a3615665211f
readd accidentally removed getter method
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
909
diff
changeset
|
190 |
+ return NS_OK; |
a3615665211f
readd accidentally removed getter method
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
909
diff
changeset
|
191 |
+} |
a3615665211f
readd accidentally removed getter method
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
909
diff
changeset
|
192 |
+ |
a3615665211f
readd accidentally removed getter method
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
909
diff
changeset
|
193 |
+NS_IMETHODIMP |
1057
b70ce330958c
successfull RPM build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1055
diff
changeset
|
194 |
+nsKDEShellService::SetDesktopBackground(dom::Element* aElement, |
1007
65e317e42eff
fixed KDE custom code and replaced obsolete types
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1006
diff
changeset
|
195 |
+ int32_t aPosition, |
65e317e42eff
fixed KDE custom code and replaced obsolete types
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1006
diff
changeset
|
196 |
+ const nsACString& aImageName) |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
197 |
+{ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
198 |
+ return NS_ERROR_NOT_IMPLEMENTED; |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
199 |
+} |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
200 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
201 |
+NS_IMETHODIMP |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
202 |
+nsKDEShellService::GetDesktopBackgroundColor(PRUint32 *aColor) |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
203 |
+{ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
204 |
+ return NS_ERROR_NOT_IMPLEMENTED; |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
205 |
+} |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
206 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
207 |
+NS_IMETHODIMP |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
208 |
+nsKDEShellService::SetDesktopBackgroundColor(PRUint32 aColor) |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
209 |
+{ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
210 |
+ return NS_ERROR_NOT_IMPLEMENTED; |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
211 |
+} |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
212 |
+ |
1168 | 213 |
+NS_IMETHODIMP |
214 |
+nsKDEShellService::IsDefaultForScheme(nsTSubstring<char> const& aScheme, bool* aIsDefaultBrowser) |
|
215 |
+{ |
|
216 |
+ return NS_ERROR_NOT_IMPLEMENTED; |
|
217 |
+} |
|
218 |
+ |
|
1196 | 219 |
diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h |
220 |
new file mode 100644 |
|
1099
8a3c73e74e65
68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1097
diff
changeset
|
221 |
--- /dev/null |
1196 | 222 |
+++ b/browser/components/shell/nsKDEShellService.h |
1089 | 223 |
@@ -0,0 +1,32 @@ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
224 |
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
889 | 225 |
+/* This Source Code Form is subject to the terms of the Mozilla Public |
226 |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
227 |
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
228 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
229 |
+#ifndef nskdeshellservice_h____ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
230 |
+#define nskdeshellservice_h____ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
231 |
+ |
911 | 232 |
+#include "nsIGNOMEShellService.h" |
1089 | 233 |
+#include "nsToolkitShellService.h" |
942
66115255ad6f
prepare FF51 (currently 51.0b5)
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
935
diff
changeset
|
234 |
+#include "nsString.h" |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
235 |
+#include "mozilla/Attributes.h" |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
236 |
+ |
1089 | 237 |
+class nsKDEShellService final : public nsIGNOMEShellService, |
238 |
+ public nsToolkitShellService |
|
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
239 |
+{ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
240 |
+public: |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
241 |
+ nsKDEShellService() : mCheckedThisSession(false) { } |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
242 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
243 |
+ NS_DECL_ISUPPORTS |
1057
b70ce330958c
successfull RPM build
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1055
diff
changeset
|
244 |
+ NS_DECL_NSISHELLSERVICE |
911 | 245 |
+ NS_DECL_NSIGNOMESHELLSERVICE |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
246 |
+ |
889 | 247 |
+ nsresult Init(); |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
248 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
249 |
+private: |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
250 |
+ ~nsKDEShellService() {} |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
251 |
+ |
739
e178ad08fed6
update patch to Gecko 31
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
738
diff
changeset
|
252 |
+ bool mCheckedThisSession; |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
253 |
+}; |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
254 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
255 |
+#endif // nskdeshellservice_h____ |
1196 | 256 |
diff --git a/browser/components/shell/nsUnixShellService.cpp b/browser/components/shell/nsUnixShellService.cpp |
257 |
new file mode 100644 |
|
1099
8a3c73e74e65
68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1097
diff
changeset
|
258 |
--- /dev/null |
1196 | 259 |
+++ b/browser/components/shell/nsUnixShellService.cpp |
889 | 260 |
@@ -0,0 +1,22 @@ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
261 |
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
889 | 262 |
+/* This Source Code Form is subject to the terms of the Mozilla Public |
263 |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
264 |
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
265 |
+ |
|
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
266 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
267 |
+#include "nsUnixShellService.h" |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
268 |
+#include "nsGNOMEShellService.h" |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
269 |
+#include "nsKDEShellService.h" |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
270 |
+#include "nsKDEUtils.h" |
133
a77c32dc7ffd
Adopted KDE patch to compile with FF4
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
127
diff
changeset
|
271 |
+#include "mozilla/ModuleUtils.h" |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
272 |
+ |
136
0051f2b9308b
Fixed init of Shellservices
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
133
diff
changeset
|
273 |
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGNOMEShellService, Init) |
0051f2b9308b
Fixed init of Shellservices
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
133
diff
changeset
|
274 |
+NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsKDEShellService, Init) |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
275 |
+ |
953 | 276 |
+NS_IMETHODIMP |
1175 | 277 |
+nsUnixShellServiceConstructor(REFNSIID aIID, void **aResult) |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
278 |
+{ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
279 |
+ if( nsKDEUtils::kdeSupport()) |
1175 | 280 |
+ return nsKDEShellServiceConstructor( aIID, aResult ); |
281 |
+ return nsGNOMEShellServiceConstructor( aIID, aResult ); |
|
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
282 |
+} |
1196 | 283 |
diff --git a/browser/components/shell/nsUnixShellService.h b/browser/components/shell/nsUnixShellService.h |
284 |
new file mode 100644 |
|
1099
8a3c73e74e65
68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate68.1.0 candidate
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1097
diff
changeset
|
285 |
--- /dev/null |
1196 | 286 |
+++ b/browser/components/shell/nsUnixShellService.h |
889 | 287 |
@@ -0,0 +1,15 @@ |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
288 |
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
889 | 289 |
+/* This Source Code Form is subject to the terms of the Mozilla Public |
290 |
+ * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
291 |
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
292 |
+ |
|
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
293 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
294 |
+#ifndef nsunixshellservice_h____ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
295 |
+#define nsunixshellservice_h____ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
296 |
+ |
911 | 297 |
+#include "nsIGNOMEShellService.h" |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
298 |
+ |
953 | 299 |
+NS_IMETHODIMP |
9
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
300 |
+nsUnixShellServiceConstructor(nsISupports *aOuter, REFNSIID aIID, void **aResult); |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
301 |
+ |
bc5dfe5b853a
Rebased KDE integration patches to 1.9.2
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff
changeset
|
302 |
+#endif // nsunixshellservice_h____ |