View | Details | Raw Unified | Return to bug 21509
Collapse All | Expand All

(-)a/browser/base/content/nsContextMenu.js (-1 / +3 lines)
Lines 210-222 nsContextMenu.prototype = { Link Here
210
    // Set as Desktop background depends on whether an image was clicked on,
210
    // Set as Desktop background depends on whether an image was clicked on,
211
    // and only works if we have a shell service.
211
    // and only works if we have a shell service.
212
    var haveSetDesktopBackground = false;
212
    var haveSetDesktopBackground = false;
213
#ifdef HAVE_SHELL_SERVICE
213
#ifdef HAVE_SHELL_SERVICE
214
    // Only enable Set as Desktop Background if we can get the shell service.
214
    // Only enable Set as Desktop Background if we can get the shell service.
215
    var shell = getShellService();
215
    var shell = getShellService();
216
    if (shell)
216
    var env = Components.classes["@mozilla.org/process/environment;1"]
217
                        .getService(Components.interfaces.nsIEnvironment);
218
    if (shell && env.get('DESKTOP_SESSION') == "gnome")
217
      haveSetDesktopBackground = true;
219
      haveSetDesktopBackground = true;
218
#endif
220
#endif
219
    this.showItem("context-setDesktopBackground",
221
    this.showItem("context-setDesktopBackground",
220
                  haveSetDesktopBackground && this.onLoadedImage);
222
                  haveSetDesktopBackground && this.onLoadedImage);
221
223
222
    if (haveSetDesktopBackground && this.onLoadedImage) {
224
    if (haveSetDesktopBackground && this.onLoadedImage) {

Return to bug 21509