Implement nsIShellService for GNOME (bug 242254). r=biesi, sr=shaver. Note: set as wallpaper for images that use transparency will be broken until bug 250531 is fixed. This also makes toolkit/ always be pulled in preparation for migrating more code to the new GNOME XPCOM interfaces.
This commit is contained in:
@@ -67,9 +67,15 @@ nsSetDefaultBrowser.prototype = {
|
||||
get prefNameForStartup() { throw Components.results.NS_ERROR_NOT_IMPLEMENTED; },
|
||||
|
||||
get chromeUrlForTask() {
|
||||
// First, get winhooks service.
|
||||
var shell = Components.classes["@mozilla.org/browser/shell-service;1"]
|
||||
// First, get shell service
|
||||
var shell;
|
||||
try {
|
||||
shell = Components.classes["@mozilla.org/browser/shell-service;1"]
|
||||
.getService(Components.interfaces.nsIShellService);
|
||||
} catch(e) { }
|
||||
if (!shell)
|
||||
throw Components.results.NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
shell.setDefaultBrowser(true, true);
|
||||
|
||||
// Now, get the cmd line service.
|
||||
|
||||
Reference in New Issue
Block a user