code: function preferencesDialog_close(saveChanges) {
      saveChanges = (saveChanges == undefined) ? false : saveChanges;
  
      if (mozmill.isWindows) {
        var button = this.getElement({type: "button", subtype: (saveChanges ? "accept" : "cancel")});
        this._controller.click(button);
      } else {
        this._controller.keypress(null, 'w', {accelKey: true});
      }
    }
docs: Close the preferences dialog
  
  @param {MozMillController} controller
  MozMillController of the window to operate on
  @param {boolean} saveChanges
  (Optional) If true the OK button is clicked on Windows which saves
  the changes. On OS X and Linux changes are applied immediately