Fix file handling when Zotero is launched from close on Windows
When opening CSL, BibTeX, etc.
This commit is contained in:
parent
437c55b286
commit
99152d78e5
1 changed files with 18 additions and 2 deletions
|
@ -461,6 +461,22 @@ function isStandalone() {
|
||||||
return _isStandalone;
|
return _isStandalone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getOS() {
|
||||||
|
return Services.appinfo.OS;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isMac() {
|
||||||
|
return getOS() == "Darwin";
|
||||||
|
}
|
||||||
|
|
||||||
|
function isWin() {
|
||||||
|
return getOS() == "WINNT";
|
||||||
|
}
|
||||||
|
|
||||||
|
function isLinux() {
|
||||||
|
return getOS() == "Linux";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The class representing the Zotero command line handler
|
* The class representing the Zotero command line handler
|
||||||
*/
|
*/
|
||||||
|
@ -541,11 +557,11 @@ ZoteroCommandLineHandler.prototype = {
|
||||||
// In Fx49-based Mac Standalone, if Zotero is closed, an associated file is launched, and
|
// In Fx49-based Mac Standalone, if Zotero is closed, an associated file is launched, and
|
||||||
// Zotero hasn't been opened before, a -file parameter is passed and two main windows open.
|
// Zotero hasn't been opened before, a -file parameter is passed and two main windows open.
|
||||||
// Subsequent file openings when closed result in -url with file:// URLs (converted above)
|
// Subsequent file openings when closed result in -url with file:// URLs (converted above)
|
||||||
// and don't result in two windows.
|
// and don't result in two windows. Here we prevent the double window.
|
||||||
param = fileToOpen;
|
param = fileToOpen;
|
||||||
if (!param) {
|
if (!param) {
|
||||||
param = cmdLine.handleFlagWithParam("file", false);
|
param = cmdLine.handleFlagWithParam("file", false);
|
||||||
if (param) {
|
if (param && isMac()) {
|
||||||
cmdLine.preventDefault = true;
|
cmdLine.preventDefault = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue