9 2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul |
9 2. cp browser/base/content/browser.xul browser/base/content/browser-kde.xul |
10 3. Find editBookmarkPanelDoneButton |
10 3. Find editBookmarkPanelDoneButton |
11 4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style) |
11 4. Replace #ifndef with #ifdef in the line above (this hanges the button order from Gnome-style to KDE-style) |
12 5. hg qrefresh |
12 5. hg qrefresh |
13 |
13 |
14 diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js |
14 Index: firefox-115.0/browser/components/preferences/main.js |
15 --- a/browser/components/preferences/main.js |
15 =================================================================== |
16 +++ b/browser/components/preferences/main.js |
16 --- firefox-115.0.orig/browser/components/preferences/main.js |
17 @@ -296,16 +296,23 @@ var gMainPane = { |
17 +++ firefox-115.0/browser/components/preferences/main.js |
18 }, backoffTimes[this._backoffIndex + 1 < backoffTimes.length ? this._backoffIndex++ : backoffTimes.length - 1]); |
18 @@ -293,6 +293,13 @@ var gMainPane = { |
19 }; |
|
20 |
|
21 window.setTimeout(() => { |
|
22 window.requestIdleCallback(pollForDefaultBrowser); |
|
23 }, backoffTimes[this._backoffIndex]); |
19 }, backoffTimes[this._backoffIndex]); |
24 } |
20 } |
25 |
21 |
26 + var env = Components.classes["@mozilla.org/process/environment;1"] |
22 + var env = Components.classes["@mozilla.org/process/environment;1"] |
27 + .getService(Components.interfaces.nsIEnvironment); |
23 + .getService(Components.interfaces.nsIEnvironment); |
31 + } |
27 + } |
32 + |
28 + |
33 this.initBrowserContainers(); |
29 this.initBrowserContainers(); |
34 this.buildContentProcessCountMenuList(); |
30 this.buildContentProcessCountMenuList(); |
35 |
31 |
36 this.updateDefaultPerformanceSettingsPref(); |
32 @@ -1762,6 +1769,17 @@ var gMainPane = { |
37 |
|
38 let defaultPerformancePref = Preferences.get( |
|
39 "browser.preferences.defaultPerformanceSettings.enabled" |
|
40 ); |
|
41 @@ -1298,16 +1305,27 @@ var gMainPane = { |
|
42 this._backoffIndex = 0; |
|
43 |
|
44 let shellSvc = getShellService(); |
|
45 if (!shellSvc) { |
|
46 return; |
|
47 } |
33 } |
48 try { |
34 try { |
49 shellSvc.setDefaultBrowser(true, false); |
35 shellSvc.setDefaultBrowser(true, false); |
50 + if (kde_session == 1) { |
36 + if (kde_session == 1) { |
51 + var shellObj = Components.classes["@mozilla.org/file/local;1"] |
37 + var shellObj = Components.classes["@mozilla.org/file/local;1"] |
59 + process.run(false, args, args.length); |
45 + process.run(false, args, args.length); |
60 + } |
46 + } |
61 } catch (ex) { |
47 } catch (ex) { |
62 console.error(ex); |
48 console.error(ex); |
63 return; |
49 return; |
64 } |
50 Index: firefox-115.0/browser/components/shell/moz.build |
65 |
51 =================================================================== |
66 let isDefault = shellSvc.isDefaultBrowser(false, true); |
52 --- firefox-115.0.orig/browser/components/shell/moz.build |
67 let setDefaultPane = document.getElementById("setDefaultPane"); |
53 +++ firefox-115.0/browser/components/shell/moz.build |
68 setDefaultPane.classList.toggle("is-default", isDefault); |
54 @@ -36,6 +36,8 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gt |
69 diff --git a/browser/components/shell/moz.build b/browser/components/shell/moz.build |
|
70 --- a/browser/components/shell/moz.build |
|
71 +++ b/browser/components/shell/moz.build |
|
72 @@ -31,16 +31,18 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "coco |
|
73 ] |
|
74 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": |
|
75 XPIDL_SOURCES += [ |
|
76 "nsIGNOMEShellService.idl", |
|
77 ] |
|
78 |
55 |
79 SOURCES += [ |
56 SOURCES += [ |
80 "nsGNOMEShellService.cpp", |
57 "nsGNOMEShellService.cpp", |
81 + "nsKDEShellService.cpp", |
58 + "nsKDEShellService.cpp", |
82 + "nsUnixShellService.cpp", |
59 + "nsUnixShellService.cpp", |
83 ] |
60 ] |
84 if CONFIG["MOZ_ENABLE_DBUS"]: |
61 if CONFIG["MOZ_ENABLE_DBUS"]: |
85 SOURCES += [ |
62 SOURCES += [ |
86 "nsGNOMEShellDBusHelper.cpp", |
63 Index: firefox-115.0/browser/components/shell/nsKDEShellService.cpp |
87 "nsGNOMEShellSearchProvider.cpp", |
64 =================================================================== |
88 ] |
65 --- /dev/null |
89 include("/ipc/chromium/chromium-config.mozbuild") |
66 +++ firefox-115.0/browser/components/shell/nsKDEShellService.cpp |
90 |
|
91 diff --git a/browser/components/shell/nsKDEShellService.cpp b/browser/components/shell/nsKDEShellService.cpp |
|
92 new file mode 100644 |
|
93 --- /dev/null |
|
94 +++ b/browser/components/shell/nsKDEShellService.cpp |
|
95 @@ -0,0 +1,109 @@ |
67 @@ -0,0 +1,109 @@ |
96 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
68 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
97 +/* This Source Code Form is subject to the terms of the Mozilla Public |
69 +/* This Source Code Form is subject to the terms of the Mozilla Public |
98 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
70 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
99 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
71 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
200 +nsKDEShellService::IsDefaultForScheme(nsTSubstring<char> const& aScheme, bool* aIsDefaultBrowser) |
172 +nsKDEShellService::IsDefaultForScheme(nsTSubstring<char> const& aScheme, bool* aIsDefaultBrowser) |
201 +{ |
173 +{ |
202 + return NS_ERROR_NOT_IMPLEMENTED; |
174 + return NS_ERROR_NOT_IMPLEMENTED; |
203 +} |
175 +} |
204 + |
176 + |
205 diff --git a/browser/components/shell/nsKDEShellService.h b/browser/components/shell/nsKDEShellService.h |
177 Index: firefox-115.0/browser/components/shell/nsKDEShellService.h |
206 new file mode 100644 |
178 =================================================================== |
207 --- /dev/null |
179 --- /dev/null |
208 +++ b/browser/components/shell/nsKDEShellService.h |
180 +++ firefox-115.0/browser/components/shell/nsKDEShellService.h |
209 @@ -0,0 +1,32 @@ |
181 @@ -0,0 +1,32 @@ |
210 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
182 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
211 +/* This Source Code Form is subject to the terms of the Mozilla Public |
183 +/* This Source Code Form is subject to the terms of the Mozilla Public |
212 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
184 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
213 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
185 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
237 + |
209 + |
238 + bool mCheckedThisSession; |
210 + bool mCheckedThisSession; |
239 +}; |
211 +}; |
240 + |
212 + |
241 +#endif // nskdeshellservice_h____ |
213 +#endif // nskdeshellservice_h____ |
242 diff --git a/browser/components/shell/nsUnixShellService.cpp b/browser/components/shell/nsUnixShellService.cpp |
214 Index: firefox-115.0/browser/components/shell/nsUnixShellService.cpp |
243 new file mode 100644 |
215 =================================================================== |
244 --- /dev/null |
216 --- /dev/null |
245 +++ b/browser/components/shell/nsUnixShellService.cpp |
217 +++ firefox-115.0/browser/components/shell/nsUnixShellService.cpp |
246 @@ -0,0 +1,22 @@ |
218 @@ -0,0 +1,22 @@ |
247 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
219 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
248 +/* This Source Code Form is subject to the terms of the Mozilla Public |
220 +/* This Source Code Form is subject to the terms of the Mozilla Public |
249 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
221 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
250 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
222 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
264 +{ |
236 +{ |
265 + if( nsKDEUtils::kdeSupport()) |
237 + if( nsKDEUtils::kdeSupport()) |
266 + return nsKDEShellServiceConstructor( aIID, aResult ); |
238 + return nsKDEShellServiceConstructor( aIID, aResult ); |
267 + return nsGNOMEShellServiceConstructor( aIID, aResult ); |
239 + return nsGNOMEShellServiceConstructor( aIID, aResult ); |
268 +} |
240 +} |
269 diff --git a/browser/components/shell/nsUnixShellService.h b/browser/components/shell/nsUnixShellService.h |
241 Index: firefox-115.0/browser/components/shell/nsUnixShellService.h |
270 new file mode 100644 |
242 =================================================================== |
271 --- /dev/null |
243 --- /dev/null |
272 +++ b/browser/components/shell/nsUnixShellService.h |
244 +++ firefox-115.0/browser/components/shell/nsUnixShellService.h |
273 @@ -0,0 +1,15 @@ |
245 @@ -0,0 +1,15 @@ |
274 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
246 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
275 +/* This Source Code Form is subject to the terms of the Mozilla Public |
247 +/* This Source Code Form is subject to the terms of the Mozilla Public |
276 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
248 + * License, v. 2.0. If a copy of the MPL was not distributed with this |
277 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
249 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |