Browse Source

P4TB-201: Add menu item to launch options.

1.1.101
Jorg Knobloch 2 years ago
parent
commit
47226a2ee8
3 changed files with 18 additions and 6 deletions
  1. +1
    -1
      chrome/content/dialogs/privacy_status.xhtml
  2. +3
    -5
      chrome/content/options.xhtml
  3. +14
    -0
      chrome/experiments.js

+ 1
- 1
chrome/content/dialogs/privacy_status.xhtml View File

@ -8,7 +8,7 @@
buttons="accept"
buttonlabelaccept="Close">
<script type="application/javascript" src="chrome://pEp4Tb/content/dialogs/privacy_status.js"/>
<script src="chrome://pEp4Tb/content/dialogs/privacy_status.js"/>
<vbox flex="1" style="overflow: auto; min-height: 200px; min-width: 400px;">
<html:div id="root">... fetching information about your recipients ...</html:div>


+ 3
- 5
chrome/content/options.xhtml View File

@ -6,11 +6,9 @@
<window id="appPreferences"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml"
title="pEp Preferences">
<script src="chrome://global/content/preferencesBindings.js"
type="application/javascript"/>
<script src="chrome://pEp4Tb/content/options.js"
type="application/javascript"/>
title="p≡p Options">
<script src="chrome://global/content/preferencesBindings.js"/>
<script src="chrome://pEp4Tb/content/options.js"/>
<tabbox class="prefPanel">
<tabs>
<tab label="Accounts" />


+ 14
- 0
chrome/experiments.js View File

@ -117,6 +117,20 @@ function paint(win) {
return;
}
Services.scriptloader.loadSubScript(script, win);
if (!win.location.href.startsWith("chrome://messenger/content/messenger.")) return;
// Add options menu before the normal options/preferences. L10N
let xul = win.MozXULElement.parseXULToFragment(`
<menuitem id="menu_pEp_options"
oncommand="openDialog('chrome://pEp4Tb/content/options.xhtml', '_blank', 'chrome,titlebar,resizable', null);"
label="p≡p Options"
class="menuitem-iconic"/>
`);
let menuPrefs = win.document.getElementById("menu_preferences");
menuPrefs.parentNode.insertBefore(xul, menuPrefs);
// Inserting after upsets TB's separator management.
// menuPrefs.parentNode.appendChild(xul);
}
function unpaint(win) {


Loading…
Cancel
Save