Set toolkit.singletonWindowType pref instead of preventing default command line actions to prevent opening new windows

This commit is contained in:
Simon Kornblith 2011-08-17 08:31:34 +00:00
parent 22e9eb6ea8
commit 580d0df56d

View file

@ -353,9 +353,6 @@ ZoteroCommandLineHandler.prototype = {
if(isStandalone()) { if(isStandalone()) {
var param = cmdLine.handleFlagWithParam("url", false); var param = cmdLine.handleFlagWithParam("url", false);
if(param) { if(param) {
// don't open a new window
cmdLine.preventDefault = true;
var uri = cmdLine.resolveURI(param); var uri = cmdLine.resolveURI(param);
if(uri.schemeIs("zotero")) { if(uri.schemeIs("zotero")) {
// Check for existing window and focus it // Check for existing window and focus it
@ -374,9 +371,6 @@ ZoteroCommandLineHandler.prototype = {
var param = cmdLine.handleFlagWithParam("file", false); var param = cmdLine.handleFlagWithParam("file", false);
if(param) { if(param) {
// don't open a new window
cmdLine.preventDefault = true;
var file = Components.classes["@mozilla.org/file/local;1"]. var file = Components.classes["@mozilla.org/file/local;1"].
createInstance(Components.interfaces.nsILocalFile); createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(param); file.initWithPath(param);