Author: nextgens
Date: 2007-03-09 14:32:29 +0000 (Fri, 09 Mar 2007)
New Revision: 12054
Modified:
trunk/apps/Thaw/build.xml
trunk/apps/Thaw/src/thaw/core/Core.java
trunk/apps/Thaw/src/thaw/core/SplashScreen.java
Log:
Thaw: implement MDNS discovery for thaw... some work has still to be done
Modified: trunk/apps/Thaw/build.xml
===================================================================
--- trunk/apps/Thaw/build.xml 2007-03-09 03:11:42 UTC (rev 12053)
+++ trunk/apps/Thaw/build.xml 2007-03-09 14:32:29 UTC (rev 12054)
@@ -9,7 +9,12 @@
<property name="javadoc.dir" value="javadoc" />
<property name="javac.debug" value="false" />
<property name="svn.revision" value="@custom@"/>
-
+
+ <property name="jmdns.location" value="${lib.dir}/jmdns.jar" />
+ <available file="${jmdns.location}" property="jmdns_available" />
+ <fail unless="jmdns_available" status="1"
+ message="You need to download jmdns.jar from
http://sourceforge.net/projects/jmdns/ and to put it in lib/" />
+
<property name="hsqldb.location" value="${lib.dir}/hsqldb.jar" />
<available file="${hsqldb.location}" property="hsqldb_available" />
<fail unless="hsqldb_available" status="1"
@@ -27,6 +32,7 @@
<!-- <compilerarg value="-Xlint" /> -->
<classpath>
+ <pathelement location="${jmdns.location}"/>
<pathelement location="${hsqldb.location}"/>
</classpath>
</javac>
@@ -56,6 +62,7 @@
<fileset dir="${bin.dir}"/>
<ZipFileSet src="${hsqldb.location}"/>
+ <ZipFileSet src="${jmdns.location}"/>
</jar>
</target>
Modified: trunk/apps/Thaw/src/thaw/core/Core.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/Core.java 2007-03-09 03:11:42 UTC (rev
12053)
+++ trunk/apps/Thaw/src/thaw/core/Core.java 2007-03-09 14:32:29 UTC (rev
12054)
@@ -14,6 +14,7 @@
import thaw.fcp.FCPQueueLoader;
import thaw.fcp.FCPQueueManager;
import thaw.fcp.FCPWatchGlobal;
+import thaw.gui.MDNSDiscoveryPanel;
/**
* A "core" contains references to all the main parts of Thaw.
@@ -138,11 +139,12 @@
*/
public boolean initConfig() {
config = new Config(Config.CONFIG_FILE_NAME);
+
+ if(!config.loadConfig()){
+ config.setDefaultValues();
+ new MDNSDiscoveryPanel(config).run();
+ }
- // FIXME: awfull hack to set default values if necessary. Maybe
the freenet's config framework should be borrowed ;)
- config.loadConfig();
- config.setDefaultValues();
-
return true;
}
Modified: trunk/apps/Thaw/src/thaw/core/SplashScreen.java
===================================================================
--- trunk/apps/Thaw/src/thaw/core/SplashScreen.java 2007-03-09 03:11:42 UTC
(rev 12053)
+++ trunk/apps/Thaw/src/thaw/core/SplashScreen.java 2007-03-09 14:32:29 UTC
(rev 12054)
@@ -92,7 +92,7 @@
}
/**
- * @param progress In pourcent
+ * @param progress In percent
*/
public void setProgression(final int progress) {
if(progressBar != null && splashScreen != null) {