Closed Bug 774130 Opened 12 years ago Closed 12 years ago

Implement desktop background on GNOME

Categories

(SeaMonkey :: OS Integration, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

References

Details

Attachments

(1 file, 1 obsolete file)

This is just the basic implementation that works with our existing context menuitem.
Attached patch Proposed patch (obsolete) — Splinter Review
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #642447 - Flags: review?(iann_bugzilla)
No longer depends on: 773999
Depends on: 773999
Comment on attachment 642447 [details] [diff] [review]
Proposed patch

>+++ b/suite/shell/src/nsGNOMEShellService.cpp

>+#include "nsIStringBundle.h"
>+#include "nsIImageLoadingContent.h"
>+#include "nsIDOMElement.h"
Firefox seems to use "nsIDOMHTMLImageElement.h" here.

>+#include "imgIRequest.h"
>+#include "imgIContainer.h"
>+#include "nsIImageToPixbuf.h"
Firefox seems to #ifdef MOZ_WIDGET_GTK2 this.

>+  // Set desktop wallpaper filling style
>+  nsCAutoString options;
>+  if (aPosition == BACKGROUND_TILE)
>+    options.AssignLiteral("wallpaper");
>+  else if (aPosition == BACKGROUND_STRETCH)
>+    options.AssignLiteral("stretched");
>+  else if (aPosition == BACKGROUND_FILL)
>+    options.AssignLiteral("zoom");
>+  else if (aPosition == BACKGROUND_FIT)
>+    options.AssignLiteral("scaled");
>+  else
>+    options.AssignLiteral("centered");
Would using switch here be possible so it is similar to the Windows one?

>+    // Set the image to an empty string first to force a refresh
>+    // (since we could be writing a new image on top of an existing
>+    // Firefox_wallpaper.png and nautilus doesn't monitor the file for changes)
Do we really mean "Firefox_wallpaper.png" here?

r=me with those answered/addressed
Attachment #642447 - Flags: review?(iann_bugzilla) → review+
(In reply to Ian Neal from comment #2)
> >+#include "nsIDOMElement.h"
> Firefox seems to use "nsIDOMHTMLImageElement.h" here.
We don't actually use the specific interface.

> >+#include "nsIImageToPixbuf.h"
> Firefox seems to #ifdef MOZ_WIDGET_GTK2 this.
We only build this file on GTK2 builds as per the Makefile.

> >+  // Set desktop wallpaper filling style
> Would using switch here be possible so it is similar to the Windows one?
Yeah, I noticed that when writing bug 773999; I'll change it.

> >+    // Firefox_wallpaper.png and nautilus doesn't monitor the file for changes)
> Do we really mean "Firefox_wallpaper.png" here?
Oops :-[
Attachment #642447 - Attachment is obsolete: true
Attachment #642711 - Flags: review?(iann_bugzilla)
Attachment #642711 - Flags: review?(iann_bugzilla) → review+
Pushed comm-central changeset 84f1af072b63.
Blocks: 632585
Depends on: 771941
Oops, forgot to mark fixed at the same time...
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks: 779300
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: