summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DeleteVolumeAction.java3
-rw-r--r--src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StopVolumeAction.java2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DeleteVolumeAction.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DeleteVolumeAction.java
index 058eabb1..eb038738 100644
--- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DeleteVolumeAction.java
+++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/DeleteVolumeAction.java
@@ -97,6 +97,9 @@ public class DeleteVolumeAction extends AbstractActionDelegate {
super.selectionChanged(action, selection);
if (selectedEntity instanceof Volume) {
volume = (Volume) selectedEntity;
+ action.setEnabled(true);
+ }else {
+ action.setEnabled(false);
}
}
}
diff --git a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StopVolumeAction.java b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StopVolumeAction.java
index 4ee2cff3..23365bf8 100644
--- a/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StopVolumeAction.java
+++ b/src/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StopVolumeAction.java
@@ -77,6 +77,8 @@ public class StopVolumeAction extends AbstractActionDelegate {
if (selectedEntity instanceof Volume) {
volume = (Volume) selectedEntity;
action.setEnabled(volume.getStatus() == VOLUME_STATUS.ONLINE);
+ } else {
+ action.setEnabled(false);
}
}
}