calendar/lightning/content/suite-overlay-addons.xul
author tbirdbld
Wed, 02 Nov 2016 03:02:59 -0700
changeset 23009 8b2cd9752fecc73fe669ae3ae0c16a0471e19cb3
parent 17409 576245902b22794df3c47cc7434ee0b07b975d48
permissions -rw-r--r--
No bug, Automated blocklist update from host bld-linux64-spot-584 - a=blocklist-update

<?xml version="1.0"?>

<!-- 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/.  -->

<overlay id="suiteAddonsOverlay"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <script type="application/javascript"><![CDATA[
    var lightningPrefs = {
      guid: "{e2fda1a4-762b-4020-b5ad-a41df1933103}",
      handleEvent: function(aEvent) {
        var item = gListView.getListItemForID(this.guid);
        if (!item)
          return;

        item.showPreferences = this.showPreferences;
      },
      showPreferences: function() {
        var win = Services.wm.getMostRecentWindow("mozilla:preferences");
        if (win) {
          win.focus();
          var doc = win.document;
          var pane = doc.getElementById("paneLightning");
          doc.documentElement.syncTreeWithPane(pane, true);
        } else {
          openDialog("chrome://communicator/content/pref/preferences.xul",
                     "PrefWindow",
                     "non-private,chrome,titlebar,dialog=no,resizable",
                     "paneLightning");
        }
      },
    };

    window.addEventListener("ViewChanged", lightningPrefs, false);
  ]]></script>

</overlay>