Author: jflesch
Date: 2007-07-02 18:16:02 +0000 (Mon, 02 Jul 2007)
New Revision: 13879
Modified:
trunk/apps/Thaw/src/thaw/core/ConfigWindow.java
trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties
trunk/apps/Thaw/src/thaw/i18n/thaw.properties
trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties
Log:
Add a dialog "Please wait" when the user change the configuration
Modified: trunk/apps/Thaw/src/thaw/core/ConfigWindow.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/ConfigWindow.java 2007-07-02 15:17:34 UTC
(rev 13878)
+++ trunk/apps/Thaw/src/thaw/core/ConfigWindow.java 2007-07-02 18:16:02 UTC
(rev 13879)
@@ -11,8 +11,11 @@
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
+import javax.swing.JLabel;
+import java.awt.Dimension;
+import java.awt.Toolkit;
+
import thaw.gui.TabbedPane;
-
import thaw.gui.IconBox;
@@ -220,12 +223,34 @@
}
public void run() {
+ JDialog dialog = new
JDialog(core.getMainWindow().getMainFrame(),
+
I18n.getMessage("thaw.common.pleaseWait"));
+ dialog.getContentPane().setLayout(new GridLayout(1, 1));
+ dialog.getContentPane().add(new
JLabel(I18n.getMessage("thaw.common.pleaseWait")));
+
+ dialog.setUndecorated(true);
+ dialog.setResizable(false);
+
+ dialog.setSize(150, 30);
+
+ final Dimension screenSize =
+ Toolkit.getDefaultToolkit().getScreenSize();
+
+ final Dimension dialogSize = dialog.getSize();
+ dialog.setLocation(dialogSize.width/2 -
(dialogSize.width/2),
+ dialogSize.height/2 -
(dialogSize.height/2));
+
+ dialog.setVisible(true);
+
/* should reinit the whole connection correctly */
core.getPluginManager().stopPlugins();
if (resetConnection && !core.initConnection()) {
- new thaw.gui.WarningWindow(core,
I18n.getMessage("thaw.warning.unableToConnectTo")+ "
"+core.getConfig().getValue("nodeAddress")+":"+
core.getConfig().getValue("nodePort"));
+ new thaw.gui.WarningWindow(dialog,
+
I18n.getMessage("thaw.warning.unableToConnectTo")+
+ "
"+core.getConfig().getValue("nodeAddress")+
+ ":"+
core.getConfig().getValue("nodePort"));
}
needConnectionReset = false;
@@ -235,6 +260,8 @@
core.getPluginManager().loadPlugins();
core.getPluginManager().runPlugins();
+
+ dialog.setVisible(false);
}
}
Modified: trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties
===================================================================
--- trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties 2007-07-02
15:17:34 UTC (rev 13878)
+++ trunk/apps/Thaw/src/thaw/i18n/source.thaw_fr.properties 2007-07-02
18:16:02 UTC (rev 13879)
@@ -88,8 +88,9 @@
thaw.common.language=Langue (n?cessite de red?marrer Thaw) :
-thaw.common.buggy=Buggu?
+thaw.common.buggy=Bugg?
+thaw.common.pleaseWait=Veuillez patienter ...
## Errors
thaw.error.idAlreadyUsed=Impossible de se connecter. Notre identifiant est
d?j? utilis? par un autre client connect? au noeud.
Modified: trunk/apps/Thaw/src/thaw/i18n/thaw.properties
===================================================================
--- trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2007-07-02 15:17:34 UTC
(rev 13878)
+++ trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2007-07-02 18:16:02 UTC
(rev 13879)
@@ -92,6 +92,8 @@
thaw.common.buggy=Buggy
+thaw.common.pleaseWait=Please wait ...
+
## Errors
thaw.error.idAlreadyUsed=Unable to connect. Our Id is already used by another
client connected to the node.
Modified: trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties
===================================================================
--- trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2007-07-02 15:17:34 UTC
(rev 13878)
+++ trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2007-07-02 18:16:02 UTC
(rev 13879)
@@ -88,8 +88,9 @@
thaw.common.language=Langue (n\u00e9cessite de red\u00e9marrer Thaw) :
-thaw.common.buggy=Buggu\u00e9
+thaw.common.buggy=Bugg\u00e9
+thaw.common.pleaseWait=Veuillez patienter ...
## Errors
thaw.error.idAlreadyUsed=Impossible de se connecter. Notre identifiant est
d\u00e9j\u00e0 utilis\u00e9 par un autre client connect\u00e9 au noeud.