<?xml version="1.0"?>
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is mozilla.org configuration viewer.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2002
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Chip Clark <chipc@netscape.com>
#   Seth Spitzer <sspitzer@netscape.com>
#   Neil Rashbrook <neil@parkwaycc.co.uk>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****

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

<!DOCTYPE window SYSTEM "chrome://global/locale/config.dtd">

<window id="config"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 
        title="&window.title;"
        windowtype="Preferences:ConfigManager"
        width="750"
        height="500"
        onunload="onConfigUnload();"
        onload="onConfigLoad();">

<script src="chrome://global/content/config.js"/>

<stringbundle id="configBundle" src="chrome://global/locale/config.properties"/>

<popup id="configContext" onpopupshowing="if (event.target == this) updateContextMenu();">
  <menuitem id="toggleSelected" default="true"
            label="&toggle.label;" accesskey="&toggle.accesskey;"
            oncommand="ModifySelected();"/>
  <menuitem id="modifySelected" default="true"
            label="&modify.label;" accesskey="&modify.accesskey;"
            oncommand="ModifySelected();"/>
  <menuseparator/>
  <menuitem id="copyPref" label="&copyPref.label;" accesskey="&copyPref.accesskey;" oncommand="copyPref();"/>
  <menuitem id="copyName" label="&copyName.label;" accesskey="&copyName.accesskey;" oncommand="copyName();"/>
  <menuitem id="copyValue" label="&copyValue.label;" accesskey="&copyValue.accesskey;" oncommand="copyValue();"/>
  <menu label="&new.label;" accesskey="&new.accesskey;">
    <menupopup>
      <menuitem label="&string.label;" accesskey="&string.accesskey;" oncommand="NewPref(nsIPrefBranch.PREF_STRING);"/>
      <menuitem label="&integer.label;" accesskey="&integer.accesskey;" oncommand="NewPref(nsIPrefBranch.PREF_INT);"/>
      <menuitem label="&boolean.label;" accesskey="&boolean.accesskey;" oncommand="NewPref(nsIPrefBranch.PREF_BOOL);"/>
    </menupopup>
  </menu>
  <menuitem id="resetSelected" label="&reset.label;" accesskey="&reset.accesskey;" oncommand="ResetSelected();"/>
</popup>

<keyset id="configTreeKeyset" disabled="true">
  <key keycode="VK_ENTER" oncommand="ModifySelected();"/>
  <key keycode="VK_RETURN" oncommand="ModifySelected();"/>
  <key key="&focusFilter.key;" modifiers="accel" oncommand="document.getElementById('textbox').focus();"/>
</keyset>
<deck id="configDeck" flex="1">
  <vbox id="warningScreen" flex="1" align="center">
    <spacer flex="1"/>
    <hbox id="warningBox" align="top">
      <image id="exclam"/>
      <vbox id="warningInnerBox" flex="1">
        <label id="warningTitle">&aboutWarningTitle.label;</label>
        <label id="warningText">&aboutWarningText.label;</label>
        <checkbox id="showWarningNextTime" label="&aboutWarningCheckbox.label;" checked="true"/>
        <hbox pack="center">
          <button id="warningButton" oncommand="ShowPrefs();" label="&aboutWarningButton.label;"/>
        </hbox>
      </vbox>
    </hbox>
    <spacer flex="2"/>
  </vbox>
  <vbox flex="1">
    <hbox id="filterRow" align="center">
      <label value="&filterPrefs.label;" accesskey="&filterPrefs.accesskey;" control="textbox"/>
      <textbox id="textbox" flex="1" type="search" cocoa-size="small"
               aria-controls="configTree"
               oncommand="FilterPrefs();"/>
    </hbox>
  
    <tree id="configTree" flex="1" seltype="single"
          onselect="updateCommands('select');"
          enableColumnDrag="true" context="configContext">
      <treecols>
        <treecol id="prefCol" label="&prefColumn.label;" flex="7"
            class="sortDirectionIndicator"
            ignoreincolumnpicker="true"
            persist="hidden width ordinal sortDirection"/>
        <splitter class="tree-splitter" />
        <treecol id="lockCol" label="&lockColumn.label;" flex="1"
            class="sortDirectionIndicator"
            persist="hidden width ordinal sortDirection"/>
        <splitter class="tree-splitter" />
        <treecol id="typeCol" label="&typeColumn.label;" flex="1"
            class="sortDirectionIndicator"
            persist="hidden width ordinal sortDirection"/>
        <splitter class="tree-splitter" />
        <treecol id="valueCol" label="&valueColumn.label;" flex="10"
            class="sortDirectionIndicator"
            persist="hidden width ordinal sortDirection"/>
      </treecols>
  
      <treechildren id="configTreeBody" ondblclick="if (event.button == 0) ModifySelected();"/>
    </tree>
  </vbox>
</deck>
</window>
