source: content/vI_context.xul @ 750887

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

finally, all modules are where they should be. conversation plugin added.

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