Add "Show Data Directory" button to Advanced prefpane
This commit is contained in:
parent
deeab05a64
commit
d40d1bd075
|
@ -739,9 +739,6 @@ function updateIndexStats() {
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Unused
|
||||
*/
|
||||
function revealDataDirectory() {
|
||||
var dataDir = Zotero.getZoteroDirectory();
|
||||
dataDir.QueryInterface(Components.interfaces.nsILocalFile);
|
||||
|
@ -749,7 +746,12 @@ function revealDataDirectory() {
|
|||
dataDir.reveal();
|
||||
}
|
||||
catch (e) {
|
||||
// TODO: This won't work on Linux
|
||||
// On platforms that don't support nsILocalFile.reveal() (e.g. Linux), we
|
||||
// open a small window with a selected read-only textbox containing the
|
||||
// file path, so the user can open it, Control-c, Control-w, Alt-Tab, and
|
||||
// Control-v the path into another app
|
||||
var io = {alertText: dataDir.path};
|
||||
window.openDialog('chrome://zotero/content/selectableAlert.xul', "zotero-reveal-window", "chrome", io);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -388,6 +388,10 @@ To add a new preference:
|
|||
<button label="&zotero.preferences.dataDir.choose;" oncommand="var file = Zotero.chooseZoteroDirectory(true); if (!file) { event.stopPropagation(); }"/>
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
|
||||
<hbox>
|
||||
<button label="&zotero.preferences.dataDir.reveal;" oncommand="revealDataDirectory()"/>
|
||||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<groupbox>
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
<!ENTITY zotero.preferences.dataDir.useProfile "Use Firefox profile directory">
|
||||
<!ENTITY zotero.preferences.dataDir.custom "Custom:">
|
||||
<!ENTITY zotero.preferences.dataDir.choose "Choose...">
|
||||
<!ENTITY zotero.preferences.dataDir.reveal "Show Data Directory">
|
||||
|
||||
<!ENTITY zotero.preferences.dbIntegrity "Database Integrity">
|
||||
<!ENTITY zotero.preferences.dbIntegrity.integrityCheck "Check Database Now">
|
Loading…
Reference in New Issue
Block a user