Ask before importing files on double-click
This commit is contained in:
parent
413ed3e749
commit
cf0e1e6972
|
@ -409,6 +409,9 @@ ingester.importReferRISDialog.title = Zotero RIS/Refer Import
|
||||||
ingester.importReferRISDialog.text = Do you want to import items from "%1$S" into Zotero?\n\nYou can disable automatic RIS/Refer import in the Zotero preferences.
|
ingester.importReferRISDialog.text = Do you want to import items from "%1$S" into Zotero?\n\nYou can disable automatic RIS/Refer import in the Zotero preferences.
|
||||||
ingester.importReferRISDialog.checkMsg = Always allow for this site
|
ingester.importReferRISDialog.checkMsg = Always allow for this site
|
||||||
|
|
||||||
|
ingester.importFile.title = Import File
|
||||||
|
ingester.importFile.text = Do you want to import the file "%S"?\n\nItems will be added to a new collection.
|
||||||
|
|
||||||
db.dbCorrupted = The Zotero database '%S' appears to have become corrupted.
|
db.dbCorrupted = The Zotero database '%S' appears to have become corrupted.
|
||||||
db.dbCorrupted.restart = Please restart %S to attempt an automatic restore from the last backup.
|
db.dbCorrupted.restart = Please restart %S to attempt an automatic restore from the last backup.
|
||||||
db.dbCorruptedNoBackup = The Zotero database '%S' appears to have become corrupted, and no automatic backup is available.\n\nA new database file has been created. The damaged file was saved in your Zotero directory.
|
db.dbCorruptedNoBackup = The Zotero database '%S' appears to have become corrupted, and no automatic backup is available.\n\nA new database file has been created. The damaged file was saved in your Zotero directory.
|
||||||
|
|
|
@ -380,7 +380,12 @@ ZoteroCommandLineHandler.prototype = {
|
||||||
// Install CSL file
|
// Install CSL file
|
||||||
this.Zotero.Styles.install(file);
|
this.Zotero.Styles.install(file);
|
||||||
} else {
|
} else {
|
||||||
// Show file import dialog
|
// Ask before importing
|
||||||
|
if(Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||||
|
.getService(Components.interfaces.nsIPromptService)
|
||||||
|
.confirm(null, this.Zotero.getString('ingester.importFile.title'),
|
||||||
|
this.Zotero.getString('ingester.importFile.text', [file.leafName]))) {
|
||||||
|
// Perform file import in front window
|
||||||
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||||
.getService(Components.interfaces.nsIWindowMediator);
|
.getService(Components.interfaces.nsIWindowMediator);
|
||||||
var browserWindow = wm.getMostRecentWindow("navigator:browser");
|
var browserWindow = wm.getMostRecentWindow("navigator:browser");
|
||||||
|
@ -388,6 +393,7 @@ ZoteroCommandLineHandler.prototype = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=zotero",
|
contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=zotero",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user