source: chrome/content/v_identity/vI_context.xul @ cc4b19

Last change on this file since cc4b19 was cc4b19, checked in by rene <rene@…>, 13 years ago

adapted FolderPicker? to new css-driven Style (see https://bugzilla.mozilla.org/show_bug.cgi?id=436630) for TB 3

  • Property mode set to 100644
File size: 2.8 KB
Line 
1<?xml version="1.0"?>
2<!-- ***** BEGIN LICENSE BLOCK *****
3   - This program is free software; you can redistribute it and/or modify
4   - it under the terms of the GNU General Public License as published by
5   - the Free Software Foundation; either version 2 of the License, or
6   - (at your option) any later version.
7
8   - This program is distributed in the hope that it will be useful,
9   - but WITHOUT ANY WARRANTY; without even the implied warranty of
10   - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11   - GNU General Public License for more details.
12
13   - You should have received a copy of the GNU General Public License
14   - along with this program; if not, write to the Free Software
15   - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16
17   - The Original Code is the Virtual Identity Extension.
18
19   - The Initial Developer of the Original Code is Rene Ejury.
20   - Portions created by the Initial Developer are Copyright (C) 2007
21   - the Initial Developer. All Rights Reserved.
22
23   - Contributor(s):
24   - ***** END LICENSE BLOCK ***** -->
25
26<!DOCTYPE overlay [
27<!ENTITY % dataTreeDTD SYSTEM "chrome://v_identity/locale/vI_rdfDataEditor.dtd">
28%dataTreeDTD;
29<!ENTITY % vIdentDTD SYSTEM "chrome://v_identity/locale/v_identity.dtd">
30%vIdentDTD;
31]>
32
33<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
34    <script type="application/x-javascript">
35    var vI_context = {
36        prefroot : Components.classes["@mozilla.org/preferences-service;1"]
37            .getService(Components.interfaces.nsIPrefService)
38            .getBranch(null),
39           
40        observe: function(subject, topic, data) {
41            document.getElementById("vI_Menu").setAttribute("hidden",
42                !vI_context.prefroot.getBoolPref("extensions.virtualIdentity.menu_entry"));
43        }
44       
45    }
46    window.addEventListener("load", function(e) {
47        vI_context.prefroot.QueryInterface(Components.interfaces.nsIPrefBranch2);
48        vI_context.prefroot.addObserver("extensions.virtualIdentity.menu_entry", vI_context, false);
49        vI_context.observe();
50    }, false);
51    window.addEventListener("unload", function(e) {
52        vI_context.prefroot.removeObserver("extensions.virtualIdentity.menu_entry", vI_context, false);
53    }, false);
54    </script>
55   
56    <menupopup id="taskPopup">
57        <menu id="vI_Menu" hidden="true" label="&vident.vI_Menu.label;">
58            <menupopup>
59                <menuitem label="&vident.vI_Menu.Settings.label;"
60                      oncommand="var chromeURL=(!vI_helper.olderVersion('TB', null) || vI_helper.olderVersion('TB', '3.0a1pre'))?'preTB3.xul':'TB3.xul';    window.openDialog('chrome://v_identity/content/vI_prefDialog_' + chromeURL, '', 'chrome,modal');" />
61                <menuitem label="&vident.vI_Menu.DataEditor.label;"
62                      oncommand="window.open('chrome://v_identity/content/vI_rdfDataTree.xul', '', 'chrome,modal');" />
63            </menupopup>
64        </menu>
65    </menupopup>
66</overlay>
Note: See TracBrowser for help on using the repository browser.