browser/components/shell/content/setDesktopBackground.xul
author Ian Moody <moz-ian@perix.co.uk>
Wed, 27 Mar 2019 18:26:11 +0000
changeset 525256 b921a78c88737795ae259dbeedf962b93c6e1137
parent 524982 8691a4583cae7e73381a844c3d616354671184a9
child 525257 f292291c4ef63711ad35c5be73a65d59f368eb8e
permissions -rw-r--r--
Bug 612373 - Remove Win version<7 code from setDesktopBackground. r=Standard8 Minimum supported version of Windows is 7 now, this is dead code. Differential Revision: https://phabricator.services.mozilla.com/D23335

<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/setDesktopBackground.css" type="text/css"?>


<!DOCTYPE dialog [
<!ENTITY % setDesktopBackgroundDTD SYSTEM "chrome://browser/locale/setDesktopBackground.dtd">
%setDesktopBackgroundDTD;
#ifdef XP_MACOSX
#include ../../../base/content/browser-doctype.inc
#endif
]>

<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:html="http://www.w3.org/1999/xhtml"
        windowtype="Shell:SetDesktopBackground"
#ifndef XP_MACOSX
        buttons="accept,cancel"
#else
        buttons="accept"
#endif
        buttonlabelaccept="&setDesktopBackground.title;"
        onload="gSetBackground.load();"
        title="&setDesktopBackground.title;"
        style="width: 30em;">

#ifdef XP_MACOSX
#include ../../../base/content/macWindow.inc.xul
#endif

    <stringbundle id="backgroundBundle"
                  src="chrome://browser/locale/shellservice.properties"/>
    <script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
    <script type="application/javascript" src="chrome://browser/content/setDesktopBackground.js"/>
    <script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>

#ifndef XP_MACOSX
    <hbox align="center">
      <label value="&position.label;"/>
      <menulist id="menuPosition"
                label="&position.label;"
                oncommand="gSetBackground.updatePosition();">
        <menupopup>
          <menuitem label="&center.label;"  value="CENTER"/>
          <menuitem label="&tile.label;"    value="TILE"/>
          <menuitem label="&stretch.label;" value="STRETCH"/>
          <menuitem label="&fill.label;"    value="FILL"/>
          <menuitem label="&fit.label;"     value="FIT"/>
        </menupopup>
      </menulist>
      <spacer flex="1"/>
      <label value="&color.label;"/>
      <html:input id="desktopColor"
                  type="color"
                  onchange="gSetBackground.updateColor(this.value);"/> 
    </hbox>
#endif

    <vbox align="center">
      <!-- default to 16:9, will be adjusted to match user's actual screen -->
      <html:canvas id="screen" width="202" height="114" role="presentation"/>
      <image id="monitor-base"/>
    </vbox>

#ifdef XP_MACOSX
    <separator/>

    <hbox align="right">
      <button id="setDesktopBackground"
              label="&setDesktopBackground.title;"
              oncommand="gSetBackground.setDesktopBackground();"/>
      <button id="showDesktopPreferences"
              label="&openDesktopPrefs.label;"
              oncommand="gSetBackground.showDesktopPrefs();"
              hidden="true"/>
    </hbox>
#endif

</dialog>