The default bug view has changed. See this FAQ.

Implement desktop background on GNOME

RESOLVED FIXED

Status

SeaMonkey
OS Integration
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: neil@parkwaycc.co.uk)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
This is just the basic implementation that works with our existing context menuitem.
(Assignee)

Comment 1

5 years ago
Created attachment 642447 [details] [diff] [review]
Proposed patch
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #642447 - Flags: review?(iann_bugzilla)

Updated

5 years ago
No longer depends on: 773999
(Assignee)

Updated

5 years ago
Depends on: 773999

Comment 2

5 years ago
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+
(Assignee)

Comment 3

5 years ago
(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 :-[
(Assignee)

Comment 4

5 years ago
Created attachment 642711 [details] [diff] [review]
Addressed review comments
Attachment #642447 - Attachment is obsolete: true
Attachment #642711 - Flags: review?(iann_bugzilla)

Updated

5 years ago
Attachment #642711 - Flags: review?(iann_bugzilla) → review+
(Assignee)

Updated

5 years ago
Duplicate of this bug: 215532
(Assignee)

Comment 6

5 years ago
Pushed comm-central changeset 84f1af072b63.
Blocks: 632585
Depends on: 771941
(Assignee)

Comment 7

5 years ago
Oops, forgot to mark fixed at the same time...
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Assignee)

Updated

5 years ago
Blocks: 779300
You need to log in before you can comment on or make changes to this bug.