Closed
Bug 774130
Opened 12 years ago
Closed 12 years ago
Implement desktop background on GNOME
Categories
(SeaMonkey :: OS Integration, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: neil, Assigned: neil)
References
Details
Attachments
(1 file, 1 obsolete file)
7.04 KB,
patch
|
iannbugzilla
:
review+
|
Details | Diff | Splinter Review |
This is just the basic implementation that works with our existing context menuitem.
Assignee | ||
Comment 1•12 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•12 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•12 years ago
|
||
Attachment #642447 -
Attachment is obsolete: true
Attachment #642711 -
Flags: review?(iann_bugzilla)
Attachment #642711 -
Flags: review?(iann_bugzilla) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Assignee | ||
Comment 7•12 years ago
|
||
Oops, forgot to mark fixed at the same time...
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•