commit d12d6398426c76b85433b8ed07e8a9d1b03f636d
parent 50cc1fcb71026accc45a8ae9d11375ada6871a10
Author: Simon Kornblith <simon@simonster.com>
Date: Sat, 2 Jul 2011 07:16:24 +0000
Support for add-ons
Diffstat:
3 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js
@@ -100,6 +100,21 @@ var ZoteroStandalone = new function()
}
/**
+ * Opens a URL in the basic viewer
+ */
+ this.openInViewer = function(uri) {
+ var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+ .getService(Components.interfaces.nsIWindowMediator);
+ var win = wm.getMostRecentWindow("zotero:basicViewer");
+ if(win) {
+ win.loadURI(uri);
+ } else {
+ window.openDialog("chrome://zotero/content/standalone/basicViewer.xul",
+ "basicViewer", "chrome,resizable,centerscreen", uri);
+ }
+ }
+
+ /**
* Handles help menu requests
*/
this.openHelp = function(type) {
diff --git a/chrome/content/zotero/standalone/standalone.xul b/chrome/content/zotero/standalone/standalone.xul
@@ -168,6 +168,9 @@
command="cmd_zotero_createTimeline"/>
<menuitem id="menu_rtfScan" label="&zotero.toolbar.rtfScan.label;"
command="cmd_zotero_rtfScan"/>
+ <menuseparator/>
+ <menuitem id="menu_addons" label="&addons.label;"
+ oncommand="ZoteroStandalone.openInViewer('about:addons')"/>
</menupopup>
</menu>
diff --git a/chrome/locale/en-US/zotero/standalone/standalone.dtd b/chrome/locale/en-US/zotero/standalone/standalone.dtd
@@ -63,6 +63,7 @@
<!--TOOLS MENU-->
<!ENTITY toolsMenu.label "Tools">
<!ENTITY toolsMenu.accesskey "T">
+<!ENTITY addons.label "Add-ons">
<!--WINDOW MENU-->
<!ENTITY minimizeWindow.key "m">