diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js index f025157c2..344e25ea5 100644 --- a/chrome/content/zotero/preferences/preferences.js +++ b/chrome/content/zotero/preferences/preferences.js @@ -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); } } diff --git a/chrome/content/zotero/preferences/preferences.xul b/chrome/content/zotero/preferences/preferences.xul index 0156dd108..3f9bd710f 100644 --- a/chrome/content/zotero/preferences/preferences.xul +++ b/chrome/content/zotero/preferences/preferences.xul @@ -388,6 +388,10 @@ To add a new preference: