www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 4bb7f7d08be8a29dd921f9a1d0d88c5d4a6ff4b1
parent 64701de5f95808e25d45dffde73725de468cb8e3
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue,  1 May 2012 20:00:35 -0400

Show data directory properly on Linux

Previously used a custom selectable alert when reveal() failed, but we
can just launch the directory, as we do for attachments

Diffstat:
Mchrome/content/zotero/preferences/preferences.js | 9+++------
Dchrome/content/zotero/selectableAlert.xul | 23-----------------------
2 files changed, 3 insertions(+), 29 deletions(-)

diff --git a/chrome/content/zotero/preferences/preferences.js b/chrome/content/zotero/preferences/preferences.js @@ -1234,12 +1234,9 @@ function revealDataDirectory() { dataDir.reveal(); } catch (e) { - // 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); + // On platforms that don't support nsILocalFile.reveal() (e.g. Linux), + // launch the directory + window.opener.ZoteroPane_Local.launchFile(dataDir); } } diff --git a/chrome/content/zotero/selectableAlert.xul b/chrome/content/zotero/selectableAlert.xul @@ -1,23 +0,0 @@ -<?xml version="1.0"?> -<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> - -<window - orient="vertical" - width="400" - height="200" - xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> - - <keyset> - <key id="key_close" key="W" modifiers="accel" command="cmd_close"/> - </keyset> - <command id="cmd_close" oncommand="window.close();"/> - - <textbox id="alert-textbox" class="plain" flex="1" readonly="true"/> - - <script> - window.addEventListener('load', function(e){ - document.getElementById('alert-textbox').value = window.arguments[0].alertText; - document.getElementById('alert-textbox').select(); - }, false); - </script> -</window>