This is just some static backup of the original site, don't expect every link to work!

source: content/vI_context.xul @ 184c6c

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

rearranged tree structure / added build-script

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