Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP4:Update
MozillaFirefox.3044
firefox-kde-114.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File firefox-kde-114.patch of Package MozillaFirefox.3044
# HG changeset patch # User Wolfgang Rosenauer <wr@rosenauer.org> # Parent 740644232932dc268f47a6bed11973e709f5d5b8 # Parent b379cd031ed98be134f177b5ca7ea68ba66c863f With openSUSE 11.4 the desktop file name changed from MozillaFirefox to firefox - keep the old name for SLE11 diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js --- a/browser/components/preferences/in-content/main.js +++ b/browser/components/preferences/in-content/main.js @@ -18,16 +18,22 @@ var gMainPane = { init: function () { function setEventListener(aId, aEventType, aCallback) { document.getElementById(aId) .addEventListener(aEventType, aCallback.bind(gMainPane)); } + var env = Components.classes["@mozilla.org/process/environment;1"] + .getService(Components.interfaces.nsIEnvironment); + var kde_session = 0; + if (env.get('KDE_FULL_SESSION') == "true") + kde_session = 1; + #ifdef HAVE_SHELL_SERVICE this.updateSetDefaultBrowser(); #ifdef XP_WIN // In Windows 8 we launch the control panel since it's the only // way to get all file type association prefs. So we don't know // when the user will select the default. We refresh here periodically // in case the default changes. On other Windows OS's defaults can also // be set while the prefs are open. @@ -720,16 +726,27 @@ var gMainPane = { */ setDefaultBrowser: function() { let shellSvc = getShellService(); if (!shellSvc) return; try { shellSvc.setDefaultBrowser(true, false); + if (kde_session == 1) { + var shellObj = Components.classes["@mozilla.org/file/local;1"] + .createInstance(Components.interfaces.nsILocalFile); + shellObj.initWithPath("/usr/bin/kwriteconfig"); + var process = Components.classes["@mozilla.org/process/util;1"] + .createInstance(Components.interfaces.nsIProcess); + process.init(shellObj); + var args = ["--file", "kdeglobals", "--group", "General", "--key", + "BrowserApplication", "firefox"]; + process.run(false, args, args.length); + } } catch (ex) { Cu.reportError(ex); return; } let selectedIndex = shellSvc.isDefaultBrowser(false, true) ? 1 : 0; document.getElementById("setDefaultPane").selectedIndex = selectedIndex; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor