Author: jflesch
Date: 2006-07-20 18:31:47 +0000 (Thu, 20 Jul 2006)
New Revision: 9673
Modified:
trunk/apps/Thaw/src/thaw/core/Main.java
trunk/apps/Thaw/src/thaw/core/MainWindow.java
trunk/apps/Thaw/src/thaw/core/PluginManager.java
trunk/apps/Thaw/src/thaw/i18n/thaw.properties
trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties
Log:
Add a status plugin + possibility to force the language used
Modified: trunk/apps/Thaw/src/thaw/core/Main.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/Main.java 2006-07-20 16:18:29 UTC (rev
9672)
+++ trunk/apps/Thaw/src/thaw/core/Main.java 2006-07-20 18:31:47 UTC (rev
9673)
@@ -2,7 +2,10 @@
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
+import java.util.Locale;
+import thaw.i18n.I18n;
+
/**
* Main class. Only used to display some informations and init the core.
*
@@ -16,8 +19,14 @@
* Look & feel use by GUI front end
*/
private static String lookAndFeel = null;
+
+ /**
+ * Locale (null = default)
+ */
+ private static String locale = null;
+
/**
* Used to start the program
*
@@ -28,6 +37,9 @@
parseCommandLine(args);
+ if(locale != null)
+ I18n.setLocale(new Locale(locale));
+
core = new Core();
Core.setLookAndFeel(lookAndFeel);
core.initAll();
@@ -56,6 +68,9 @@
} else if (args[count].equals("-lf")) {
lookAndFeel = args[count + 1];
count = count + 2;
+ } else if (args[count].equals("-lc")) {
+ locale = args[count + 1];
+ count = count + 2;
} else {
showHelp();
}
@@ -83,6 +98,11 @@
System.out.println("\n And this one is used by
default:");
System.out.println(" " +
UIManager.getSystemLookAndFeelClassName() + "\n");
+ System.out.println("\n-lc Sets the locale to use: 'en' for
english,");
+ System.out.println(" 'fr' for french, etc.");
+ System.out.println(" see
http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt");
+ System.out.println(" for the complete list");
+
System.exit(0);
}
Modified: trunk/apps/Thaw/src/thaw/core/MainWindow.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/MainWindow.java 2006-07-20 16:18:29 UTC
(rev 9672)
+++ trunk/apps/Thaw/src/thaw/core/MainWindow.java 2006-07-20 18:31:47 UTC
(rev 9673)
@@ -182,6 +182,11 @@
statusBar.setText(" ");/* not empty else the status bar
disappear */
}
+
+ public String getStatus() {
+ return statusBar.getText();
+ }
+
public void windowActivated(WindowEvent e) {
Modified: trunk/apps/Thaw/src/thaw/core/PluginManager.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/PluginManager.java 2006-07-20 16:18:29 UTC
(rev 9672)
+++ trunk/apps/Thaw/src/thaw/core/PluginManager.java 2006-07-20 18:31:47 UTC
(rev 9673)
@@ -10,7 +10,8 @@
public class PluginManager {
private final static String[] defaultPlugins =
{"thaw.plugins.QueueWatcher",
"thaw.plugins.InsertPlugin",
-
"thaw.plugins.FetchPlugin" };
+
"thaw.plugins.FetchPlugin",
+
"thaw.plugins.StatusBar"};
private Core core = null;
Modified: trunk/apps/Thaw/src/thaw/i18n/thaw.properties
===================================================================
--- trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2006-07-20 16:18:29 UTC
(rev 9672)
+++ trunk/apps/Thaw/src/thaw/i18n/thaw.properties 2006-07-20 18:31:47 UTC
(rev 9673)
@@ -119,6 +119,14 @@
thaw.plugin.console.saveToFile=Save log to file
thaw.plugin.console.maxSize=Maximum memory allocated to store log (in Bytes)
+thaw.plugin.statistics.statistics=Statistics in the status bar
+thaw.plugin.statistics.globalProgression=Global progression:
+thaw.plugin.statistics.finished=Finished:
+thaw.plugin.statistics.failed=Failed:
+thaw.plugin.statistics.running=Running:
+thaw.plugin.statistics.pending=Pending:
+
+
## Warnings
thaw.warning.title=Warning
thaw.warning.isWriting=Warning ! Thaw is writing data. It would be better to
quit when thaw will finish. Are you sure you want to quit ?
Modified: trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties
===================================================================
--- trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2006-07-20 16:18:29 UTC
(rev 9672)
+++ trunk/apps/Thaw/src/thaw/i18n/thaw_fr.properties 2006-07-20 18:31:47 UTC
(rev 9673)
@@ -118,6 +118,14 @@
thaw.plugin.console.saveToFile=Sauvegarder les logs dans un fichier
thaw.plugin.console.maxSize=Taille m?moire maximum utilis?e pour m?moriser les
logs (en octets)
+thaw.plugin.statistics.statistics=Statistiques dans la barre de status
+thaw.plugin.statistics.globalProgression=Progression globale:
+thaw.plugin.statistics.finished=Finis:
+thaw.plugin.statistics.failed=Echou?s:
+thaw.plugin.statistics.running=En cours:
+thaw.plugin.statistics.pending=En attente:
+
+
## Warnings
thaw.warning.title=Avertissement
thaw.warning.isWriting=Attention ! Thaw est entrain d'?crire des informations.
Il serait pr?f?rable de quitter une fois ces envois finis. Etes-vous s?r de
vouloir quitter ?