Author: toad
Date: 2008-11-29 18:49:21 +0000 (Sat, 29 Nov 2008)
New Revision: 23976

Modified:
   branches/db4o/freenet/
   branches/db4o/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java
   branches/db4o/freenet/src/freenet/l10n/freenet.l10n.en.properties
   branches/db4o/freenet/src/freenet/node/Version.java
   branches/db4o/freenet/src/freenet/support/BinaryBloomFilter.java
   branches/db4o/freenet/src/freenet/support/BloomFilter.java
   branches/db4o/freenet/src/freenet/support/CountingBloomFilter.java
   branches/db4o/freenet/test/freenet/support/io/MockInputStream.java
Log:
Merge 1171 into db4o branch: up to 23425.



Property changes on: branches/db4o/freenet
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/freenet:19964-23423
   + /trunk/freenet:19964-23425

Modified: 
branches/db4o/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java
===================================================================
--- branches/db4o/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java  
2008-11-29 18:46:21 UTC (rev 23975)
+++ branches/db4o/freenet/src/freenet/clients/http/FirstTimeWizardToadlet.java  
2008-11-29 18:49:21 UTC (rev 23976)
@@ -11,6 +11,7 @@
 import freenet.client.HighLevelSimpleClient;
 import freenet.config.Config;
 import freenet.config.ConfigException;
+import freenet.config.Option;
 import freenet.config.WrapperConfig;
 import freenet.l10n.L10n;
 import freenet.node.Node;
@@ -185,13 +186,22 @@
                        HTMLNode bandwidthForm = 
ctx.addFormChild(bandwidthInfoboxContent, ".", "bwForm");
                        HTMLNode result = bandwidthForm.addChild("select", 
"name", "bw");
                        
+                       Option sizeOption = 
config.get("node").getOption("outputBandwidthLimit");
+                       if(!sizeOption.isDefault()) {
+                               long current = (Integer)sizeOption.getValue();
+                               result.addChild("option", new String[] { 
"value", "selected" }, new String[] { SizeUtil.formatSize(current), "on" }, 
l10n("currentSpeed")+" "+SizeUtil.formatSize(current)+"/s");
+                       }
+
                        // don't forget to update handlePost too if you change 
that!
                        result.addChild("option", "value", "8K", 
l10n("bwlimitLowerSpeed"));
                        // Special case for 128kbps to increase performance at 
the cost of some link degradation. Above that we use 50% of the limit.
-                       result.addChild("option", "value", "12K", "512+/128 
kbps");
-                       result.addChild("option", new String[] { "value", 
"selected" }, new String[] { "16K", "selected" }, "1024+/256 kbps");
-                       result.addChild("option", "value", "32K", "1024+/512 
kbps");
-                       result.addChild("option", "value", "64K", "1024+/1024 
kbps");
+                       result.addChild("option", "value", "12K", "512+/128 
kbps (12KB/s)");
+                       if(!sizeOption.isDefault())
+                               result.addChild("option", "value", "16K", 
"1024+/256 kbps (16KB/s)");
+                       else
+                               result.addChild("option", new String[] { 
"value", "selected" }, new String[] { "16K", "selected" }, "1024+/256 kbps 
(16KB/s)");
+                       result.addChild("option", "value", "32K", "1024+/512 
kbps (32K/s)");
+                       result.addChild("option", "value", "64K", "1024+/1024 
kbps (64K/s)");
                        result.addChild("option", "value", "1000K", 
l10n("bwlimitHigherSpeed"));
                        
                        bandwidthForm.addChild("input", new String[] { "type", 
"name", "value" }, new String[] { "submit", "bwF", 
L10n.getString("FirstTimeWizardToadlet.continue")});
@@ -216,9 +226,17 @@
                        HTMLNode bandwidthForm = 
ctx.addFormChild(bandwidthInfoboxContent, ".", "dsForm");
                        HTMLNode result = bandwidthForm.addChild("select", 
"name", "ds");
 
+                       Option sizeOption = 
config.get("node").getOption("storeSize");
+                       if(!sizeOption.isDefault()) {
+                               long current = (Long)sizeOption.getValue();
+                               result.addChild("option", new String[] { 
"value", "selected" }, new String[] { SizeUtil.formatSize(current), "on" }, 
l10n("currentPrefix")+" "+SizeUtil.formatSize(current));
+                       }
                        result.addChild("option", "value", "512M", "512MiB");
                        result.addChild("option", "value", "1G", "1GiB");
-                       result.addChild("option", new String[] { "value", 
"selected" }, new String[] { "2G", "on" }, "2GiB");
+                       if(!sizeOption.isDefault())
+                               result.addChild("option", "value", "2G", 
"2GiB");
+                       else
+                               result.addChild("option", new String[] { 
"value", "selected" }, new String[] { "2G", "on" }, "2GiB");
                        result.addChild("option", "value", "3G", "3GiB");
                        result.addChild("option", "value", "5G", "5GiB");
                        result.addChild("option", "value", "10G", "10GiB");
@@ -499,6 +517,8 @@
        }
        
        private boolean canAutoconfigureBandwidth() {
+               
if(!config.get("node").getOption("outputBandwidthLimit").isDefault())
+                       return false;
                FredPluginBandwidthIndicator bwIndicator = 
core.node.ipDetector.getBandwidthIndicator();
                if(bwIndicator == null)
                        return false;
@@ -524,6 +544,8 @@
        }
        
        private boolean canAutoconfigureDatastoreSize() {
+               if(!config.get("node").getOption("storeSize").isDefault())
+                       return false;
                // Use JNI to find out the free space on this partition.
                long freeSpace = -1;
                File dir = FileUtil.getCanonicalFile(core.node.getNodeDir());

Modified: branches/db4o/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- branches/db4o/freenet/src/freenet/l10n/freenet.l10n.en.properties   
2008-11-29 18:46:21 UTC (rev 23975)
+++ branches/db4o/freenet/src/freenet/l10n/freenet.l10n.en.properties   
2008-11-29 18:49:21 UTC (rev 23976)
@@ -273,6 +273,8 @@
 FirstTimeWizardToadlet.clickContinue=Click here to continue.
 FirstTimeWizardToadlet.continue=Continue
 FirstTimeWizardToadlet.continueEnd=Click here to start using Freenet!
+FirstTimeWizardToadlet.currentPrefix=Current size:
+FirstTimeWizardToadlet.currentSpeed=Current limit:
 FirstTimeWizardToadlet.datastoreSize=Datastore size
 FirstTimeWizardToadlet.datastoreSizeLong=Please select a size for your 
datastore. The datastore acts like a cache; storing data for the network will 
help you to get better throughput when requesting popular files. The more space 
you can afford the better it is for the community and the faster your node and 
especially your downloads will go.
 FirstTimeWizardToadlet.highNetworkThreatLevelWarning=${bold}WARNING${/bold}: 
You are about to set the network security level to high. This means your node 
will not be able to connect unless ${bold}you add some connections to 
Friends${/bold}. These should be people you already know and at least 
marginally trust. If you don't know anyone already using Freenet, please use 
the NORMAL network security level so that Freenet will setup connections 
automatically. Adding people you don't know as Friends will not significantly 
improve security and will harm performance. Also note that HIGH security level 
is slower, especially if you don't have many Friends (you need 5-10 for 
adequate performance).

Modified: branches/db4o/freenet/src/freenet/node/Version.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/Version.java 2008-11-29 18:46:21 UTC 
(rev 23975)
+++ branches/db4o/freenet/src/freenet/node/Version.java 2008-11-29 18:49:21 UTC 
(rev 23976)
@@ -24,11 +24,11 @@
        public static final String protocolVersion = "1.0";
 
        /** The build number of the current revision */
-       private static final int buildNumber = 1170;
+       private static final int buildNumber = 1171;
 
        /** Oldest build of Fred we will talk to */
-       private static final int oldLastGoodBuild = 1168;
-       private static final int newLastGoodBuild = 1169;
+       private static final int oldLastGoodBuild = 1169;
+       private static final int newLastGoodBuild = 1170;
        static final long transitionTime;
        
        static {


Property changes on: 
branches/db4o/freenet/src/freenet/support/BinaryBloomFilter.java
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /trunk/freenet/src/freenet/support/BinaryBloomFilter.java:22002-23425


Property changes on: branches/db4o/freenet/src/freenet/support/BloomFilter.java
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /trunk/freenet/src/freenet/support/BloomFilter.java:22002-23425


Property changes on: 
branches/db4o/freenet/src/freenet/support/CountingBloomFilter.java
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /trunk/freenet/src/freenet/support/CountingBloomFilter.java:22002-23425


Property changes on: 
branches/db4o/freenet/test/freenet/support/io/MockInputStream.java
___________________________________________________________________
Modified: svn:mergeinfo
   - 
   + /trunk/freenet/test/freenet/support/io/MockInputStream.java:22002-23425

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to