diff options
| author | Shireesh Anjal <shireesh@gluster.com> | 2011-03-23 16:29:19 +0530 |
|---|---|---|
| committer | Shireesh Anjal <shireesh@gluster.com> | 2011-03-23 16:29:19 +0530 |
| commit | 1cff1362e9b99fddff779872dd5bd3a83a44a688 (patch) | |
| tree | 6932d1f8eb802b054e6f58dcd61ec173e55684b1 | |
| parent | 0d9309a703b9c42b060bb733f7b87cd9a384704f (diff) | |
Modified to get the shell from workbench window
2 files changed, 4 insertions, 4 deletions
diff --git a/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StartVolumeAction.java b/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StartVolumeAction.java index fff5faa0..70c51119 100644 --- a/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StartVolumeAction.java +++ b/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StartVolumeAction.java @@ -42,12 +42,12 @@ public class StartVolumeAction extends AbstractActionDelegate { VolumesClient client = new VolumesClient(modelManager.getSecurityToken()); Status status = client.startVolume(volume.getName()); if (status.isSuccess()) { - new MessageDialog(Display.getDefault().getActiveShell(), action.getDescription(), null, "Volume [" + new MessageDialog(window.getShell(), action.getDescription(), null, "Volume [" + volume.getName() + "] started successfully!", MessageDialog.INFORMATION, new String[] { "OK" }, 0) .open(); modelManager.updateVolumeStatus(volume, VOLUME_STATUS.ONLINE); } else { - new MessageDialog(Display.getDefault().getActiveShell(), action.getDescription(), null, "Volume [" + new MessageDialog(window.getShell(), action.getDescription(), null, "Volume [" + volume.getName() + "] could not be started! Error: [" + status + "]", MessageDialog.ERROR, new String[] { "OK" }, 0).open(); } diff --git a/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StopVolumeAction.java b/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StopVolumeAction.java index 32a6ce08..a4e2c8d3 100644 --- a/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StopVolumeAction.java +++ b/com.gluster.storage.management.gui/src/com/gluster/storage/management/gui/actions/StopVolumeAction.java @@ -42,12 +42,12 @@ public class StopVolumeAction extends AbstractActionDelegate { VolumesClient client = new VolumesClient(modelManager.getSecurityToken()); Status status = client.stopVolume(volume.getName()); if (status.isSuccess()) { - new MessageDialog(Display.getDefault().getActiveShell(), action.getDescription(), null, "Volume [" + new MessageDialog(window.getShell(), action.getDescription(), null, "Volume [" + volume.getName() + "] stopped successfully!", MessageDialog.INFORMATION, new String[] { "OK" }, 0) .open(); modelManager.updateVolumeStatus(volume, VOLUME_STATUS.OFFLINE); } else { - new MessageDialog(Display.getDefault().getActiveShell(), action.getDescription(), null, "Volume [" + new MessageDialog(window.getShell(), action.getDescription(), null, "Volume [" + volume.getName() + "] could not be stopped! Error: [" + status + "]", MessageDialog.ERROR, new String[] { "OK" }, 0).open(); } |
