source: content/vI_context.xul @ c5860f

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

reference to new rdf storage

  • Property mode set to 100644
File size: 3.6 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">
37    Components.utils.import("resource://v_identity/vI_nameSpaceWrapper.js");
38    virtualIdentityExtension.ns(function() { with (virtualIdentityExtension.LIB) {
39   
40    Components.utils.import("resource://v_identity/vI_rdfDatasource.js", virtualIdentityExtension);
41    Components.utils.import("resource://v_identity/vI_prefs.js", virtualIdentityExtension);
42   
43    var vI_context = {
44      observe: function(subject, topic, data) {
45        document.getElementById("virtualIdentityExtension_vIMenu").setAttribute("hidden",
46          !virtualIdentityExtension.vIprefs.get("menu_entry"));
47      }
48    }
49    window.addEventListener("load", function(e) {
50      virtualIdentityExtension.vIprefs.addObserver("menu_entry", vI_context.observe);
51      vI_context.observe();
52    }, false);
53    window.addEventListener("unload", function(e) {
54      virtualIdentityExtension.vIprefs.removeObserver("menu_entry", vI_context.observe);
55    }, false);
56    }});
57    </script>
58   
59    <menupopup id="taskPopup">
60        <menu id="virtualIdentityExtension_vIMenu" hidden="true" label="&vident.vI_Menu.label;">
61            <menupopup>
62                <menuitem label="&vident.vI_Menu.Settings.label;"
63                      oncommand="window.open('chrome://v_identity/content/prefDialog/vI_prefDialog_TB3.xul', '', 'chrome, dialog, alwaysRaised, resizable=yes');" />
64                <menu label="&vident.vI_Menu.DataStorage.label;">
65                    <menupopup>                       
66                        <menuitem label="&vident.vI_Menu.DataEditor.label;"
67                            oncommand="window.open('chrome://v_identity/content/vI_rdfDataTree.xul', '', 'chrome, dialog, resizable=yes');" />
68                        <menuitem label="&importCmd.label;" accesskey="&importCmd.accesskey;" oncommand="var vI_localRdfDatasource = new virtualIdentityExtension.rdfDatasourceImporter(window, 'virtualIdentity_0.10.rdf');"/>
69                        <menuitem label="&exportCmd.label;" accesskey="&exportCmd.accesskey;" oncommand="var vI_localRdfDatasource = new virtualIdentityExtension.rdfDatasource(window); vI_localRdfDatasource.export('virtualIdentity_0.10.rdf')"/>
70                    </menupopup>
71                </menu>
72            </menupopup>
73        </menu>
74    </menupopup>
75</overlay>
Note: See TracBrowser for help on using the repository browser.