summaryrefslogtreecommitdiff
path: root/java/src
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2006-04-28 21:04:54 +0000
committerBernard Normier <bernard@zeroc.com>2006-04-28 21:04:54 +0000
commitb37455c87ecfda7b91d2aa0817fe432c69088bdd (patch)
treef26e50d4ef929024cdcb605b708237d1b48b99df /java/src
parentupdate to use AdminSessionManager (diff)
downloadice-b37455c87ecfda7b91d2aa0817fe432c69088bdd.tar.bz2
ice-b37455c87ecfda7b91d2aa0817fe432c69088bdd.tar.xz
ice-b37455c87ecfda7b91d2aa0817fe432c69088bdd.zip
Fixed bug #938
Diffstat (limited to 'java/src')
-rwxr-xr-xjava/src/IceGridGUI/Application/Root.java7
-rwxr-xr-xjava/src/IceGridGUI/Coordinator.java36
2 files changed, 25 insertions, 18 deletions
diff --git a/java/src/IceGridGUI/Application/Root.java b/java/src/IceGridGUI/Application/Root.java
index 818706b2d3b..83bbee3e117 100755
--- a/java/src/IceGridGUI/Application/Root.java
+++ b/java/src/IceGridGUI/Application/Root.java
@@ -687,10 +687,7 @@ public class Root extends ListTreeNode
if(confirm == JOptionPane.YES_OPTION)
{
- if(_coordinator.removeApplicationFromRegistry(_id))
- {
- _coordinator.getMainPane().removeApplication(this);
- }
+ _coordinator.removeApplicationFromRegistry(_id);
}
}
else
@@ -977,6 +974,8 @@ public class Root extends ListTreeNode
void updated()
{
_updated = true;
+ _registryUpdatesEnabled = false; // can be true before that when updated() is called by destroy()
+
_concurrentUpdates.clear();
_coordinator.getSaveAction().setEnabled(_live || _file != null);
diff --git a/java/src/IceGridGUI/Coordinator.java b/java/src/IceGridGUI/Coordinator.java
index 6148fed29ed..13d4bc0dde6 100755
--- a/java/src/IceGridGUI/Coordinator.java
+++ b/java/src/IceGridGUI/Coordinator.java
@@ -519,7 +519,7 @@ public class Coordinator
root.setSelectedNode(root);
}
- public boolean removeApplicationFromRegistry(String name)
+ public void removeApplicationFromRegistry(String name)
{
_mainFrame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
@@ -533,7 +533,6 @@ public class Coordinator
catch(AccessDeniedException e)
{
accessDenied(e);
- return false;
}
catch(ApplicationNotExistException e)
{
@@ -549,9 +548,6 @@ public class Coordinator
}
_mainFrame.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
-
- _liveApplications.remove(name);
- return true;
}
public void acquireExclusiveWriteAccess(Runnable runnable)
@@ -1341,18 +1337,30 @@ public class Coordinator
public void actionPerformed(ActionEvent e)
{
Object[] applicationNames = _liveDeploymentRoot.getApplicationNames();
-
- String appName = (String)JOptionPane.showInputDialog(
- _mainFrame, "Which Application do you want to open?", "Open Application from registry",
- JOptionPane.QUESTION_MESSAGE, null,
- applicationNames, applicationNames[0]);
- if(appName != null)
+ if(applicationNames.length == 0)
+ {
+ JOptionPane.showMessageDialog(
+ _mainFrame,
+ "The registry does not contain any application",
+ "Empty registry",
+ JOptionPane.INFORMATION_MESSAGE);
+ }
+ else
{
- IceGridGUI.Application.Root root = openLiveApplication(appName).getRoot();
- if(root.getSelectedNode() == null)
+ String appName = (String)JOptionPane.showInputDialog(
+ _mainFrame, "Which Application do you want to open?",
+ "Open Application from registry",
+ JOptionPane.QUESTION_MESSAGE, null,
+ applicationNames, applicationNames[0]);
+
+ if(appName != null)
{
- root.setSelectedNode(root);
+ IceGridGUI.Application.Root root = openLiveApplication(appName).getRoot();
+ if(root.getSelectedNode() == null)
+ {
+ root.setSelectedNode(root);
+ }
}
}
}