source: content/vI_context.xul @ 308706

ng_0.9
Last change on this file since 308706 was 308706, checked in by rene <rene@…>, 9 years ago

namespace-id changes

  • Property mode set to 100644
File size: 3.9 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<!ENTITY % abMainWindowDTD SYSTEM "chrome://messenger/locale/addressbook/abMainWindow.dtd" >
32%abMainWindowDTD;
33]>
34
35<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
36    <script type="application/x-javascript" src="chrome://v_identity/content/modules/vI_rdfDatasource.js" />
37    <script type="application/x-javascript">
38    Components.utils.import("resource://v_identity/vI_nameSpaceWrapper.js");
39    virtualIdentityExtension.ns(function() { with (virtualIdentityExtension.LIB) {
40    var vI_context = {
41        prefroot : Components.classes["@mozilla.org/preferences-service;1"]
42            .getService(Components.interfaces.nsIPrefService)
43            .getBranch(null),
44           
45        observe: function(subject, topic, data) {
46            document.getElementById("virtualIdentityExtension_vIMenu").setAttribute("hidden",
47                !vI_context.prefroot.getBoolPref("extensions.virtualIdentity.menu_entry"));
48        }
49       
50    }
51    window.addEventListener("load", function(e) {
52        vI_context.prefroot.QueryInterface(Components.interfaces.nsIPrefBranch2);
53        vI_context.prefroot.addObserver("extensions.virtualIdentity.menu_entry", vI_context, false);
54        vI_context.observe();
55    }, false);
56    window.addEventListener("unload", function(e) {
57        vI_context.prefroot.removeObserver("extensions.virtualIdentity.menu_entry", vI_context, false);
58    }, false);
59    }});
60    dump('context: ' + virtualIdentityExtension.initTime + '\n');
61    </script>
62   
63    <menupopup id="taskPopup">
64        <menu id="virtualIdentityExtension_vIMenu" hidden="true" label="&vident.vI_Menu.label;">
65            <menupopup>
66                <menuitem label="&vident.vI_Menu.Settings.label;"
67                      oncommand="window.open('chrome://v_identity/content/prefDialog/vI_prefDialog_TB3.xul', '', 'chrome, dialog, alwaysRaised, resizable=yes');" />
68                <menu label="&vident.vI_Menu.DataStorage.label;">
69                    <menupopup>                       
70                        <menuitem label="&vident.vI_Menu.DataEditor.label;"
71                            oncommand="window.open('chrome://v_identity/content/vI_rdfDataTree.xul', '', 'chrome, dialog, resizable=yes');" />
72                        <menuitem label="&importCmd.label;" accesskey="&importCmd.accesskey;" oncommand="dump('command: ' + virtualIdentityExtension.initTime + '\n');var vI_localRdfDatasource = new virtualIdentityExtension.rdfDatasourceImporter('virtualIdentity.rdf');"/>
73                        <menuitem label="&exportCmd.label;" accesskey="&exportCmd.accesskey;" oncommand="dump('command: ' + virtualIdentityExtension.initTime + '\n');var vI_localRdfDatasource = new virtualIdentityExtension.rdfDatasource(); vI_localRdfDatasource.export('virtualIdentity.rdf')"/>
74                    </menupopup>
75                </menu>
76            </menupopup>
77        </menu>
78    </menupopup>
79</overlay>
Note: See TracBrowser for help on using the repository browser.