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:
bryner@brianryner.com
2004-07-15 22:51:19 +00:00
parent f63b78c57f
commit 1f705a49bd
39 changed files with 1781 additions and 97 deletions

View File

@@ -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.