summaryrefslogtreecommitdiffstats
path: root/idrop-swing
diff options
context:
space:
mode:
authorLisa Stillwell <lisa@renci.org>2012-11-15 19:00:18 (GMT)
committer Lisa Stillwell <lisa@renci.org>2012-11-15 19:00:18 (GMT)
commit5404aa2c15874d7408cccbaa90b200787d3bf462 (patch)
treeaaa173951c26a3f345335ee3d85b8494dd429a83 /idrop-swing
parentebc2c2f9ecacb77dbf2e5e0b5a4c5f490c887769 (diff)
downloadQCG-Data-5404aa2c15874d7408cccbaa90b200787d3bf462.zip
QCG-Data-5404aa2c15874d7408cccbaa90b200787d3bf462.tar.gz
QCG-Data-5404aa2c15874d7408cccbaa90b200787d3bf462.tar.bz2
[#983] add setting in idrop.properties file to enable/disable editing of default resource in iDrop Settings dialog
Diffstat (limited to 'idrop-swing')
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java5
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java1
-rw-r--r--idrop-swing/src/main/resources/idrop.properties3
3 files changed, 8 insertions, 1 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
index 61360c0..51f8b8b 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
@@ -1843,6 +1843,11 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
throw new IdropRuntimeException("error getting resource list", ex);
}
}
+ // check to see if defualt resource editing is allowed
+ String allowEdit = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.IDROP_ENABLE_RESC_EDIT);
+ if (allowEdit != null && allowEdit.equals("false")) {
+ comboPrefsDefaultResource.setEnabled(false);
+ }
}
protected void updateDetailsForSelectedSynch(int i) {
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
index 2b136a9..a90599e 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
@@ -55,6 +55,7 @@ public interface IdropConfigurationService {
public static final String IRODS_IO_LOCAL_OUTPUT_STREAM_BUFFER_SIZE = "jargon.io.local.output.stream.buffer.size";
public static final String IRODS_IO_PUT_BUFFER_SIZE = "jargon.put.buffer.size";
public static final String IRODS_IO_GET_BUFFER_SIZE = "jargon.get.buffer.size";
+ public static final String IDROP_ENABLE_RESC_EDIT = "idrop.settings.enable_default_resc_edit";
Properties bootstrapConfigurationAndMergePropertiesFromLocalAndClasspath() throws IdropException;
diff --git a/idrop-swing/src/main/resources/idrop.properties b/idrop-swing/src/main/resources/idrop.properties
index 4ab949d..1bf7055 100644
--- a/idrop-swing/src/main/resources/idrop.properties
+++ b/idrop-swing/src/main/resources/idrop.properties
@@ -18,12 +18,13 @@ login.preset.host=diamond.ils.unc.edu
login.preset.zone=lifelibZone
login.preset.resource=lifelibResc1
login.preset.port=2247
+# enable/disable user's ability to change the iRODS defualt resource setting
+idrop.settings.enable_default_resc_edit=false
# comment the following property to turn off rolling log file in users .idrop directory, or set to a valid log level
rolling.log.level=INFO
#---------
# properties that control jargon behavior
-
# verify checksum on put/get transfer
idrop.verify.checksum=true
# receive and display intra-file transfer progress (slight performance penalty)