Author: juiceman
Date: 2009-01-07 06:15:51 +0000 (Wed, 07 Jan 2009)
New Revision: 24952

Modified:
   trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
   trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
Log:
Break search out of bookmarks and into own info-box.  Also, previously if there 
wasn't a search plugin loaded the form would silently not load!  Now it will 
warn the user.

Modified: trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java  2009-01-07 
00:37:10 UTC (rev 24951)
+++ trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java  2009-01-07 
06:15:51 UTC (rev 24952)
@@ -550,6 +550,22 @@
         if (ctx.isAllowedFullAccess()) {
             
contentNode.addChild(core.alerts.createAlertsShort(l10n("alertsSummary"), 
advancedModeOutputEnabled, true, ctx));
         }
+               
+               // Search Box
+               HTMLNode searchBox = 
contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-normal", 
L10n.getString("WelcomeToadlet.searchBoxLabel")));
+        // Search form
+        if(core.node.pluginManager != null && 
+                       
core.node.pluginManager.isPluginLoaded("plugins.XMLLibrarian.XMLLibrarian")) {
+               HTMLNode form = searchBox.addChild("form", new String[] { 
"method", "action" }, new String[] { "GET", 
"/plugins/plugins.XMLLibrarian.XMLLibrarian" });
+               form.addChild("input", new String[] { "type", "name", "value" 
}, new String[] { "hidden", "choice", "index" });
+               form.addChild("input", new String[] { "type", "size", "name" }, 
new String[] { "text", "80", "search" });
+               form.addChild("input", new String[] { "type", "name", "value" 
}, new String[] { "submit", "find", "Search Freenet!" });
+        } else {
+                       // Warn that search plugin is not loaded.
+                       HTMLNode searchBoxContent = 
ctx.getPageMaker().getContentNode(searchBox);
+                       searchBoxContent.addChild("#", 
L10n.getString("WelcomeToadlet.searchPluginNotLoaded"));
+               }
+                       
 
         // Bookmarks
         HTMLNode bookmarkBox = contentNode.addChild("div", "class", "infobox 
infobox-normal");
@@ -563,15 +579,7 @@
 
         HTMLNode bookmarkBoxContent = bookmarkBox.addChild("div", "class", 
"infobox-content");
         
-        // Search box
-        if(core.node.pluginManager != null && 
-                       
core.node.pluginManager.isPluginLoaded("plugins.XMLLibrarian.XMLLibrarian")) {
-               HTMLNode form = bookmarkBoxContent.addChild("form", new 
String[] { "method", "action" }, new String[] { "GET", 
"/plugins/plugins.XMLLibrarian.XMLLibrarian" });
-               form.addChild("input", new String[] { "type", "name", "value" 
}, new String[] { "hidden", "choice", "index" });
-               form.addChild("input", new String[] { "type", "size", "name" }, 
new String[] { "text", "80", "search" });
-               form.addChild("input", new String[] { "type", "name", "value" 
}, new String[] { "submit", "find", "Search Freenet!" });
-        }
-        
+                
         HTMLNode bookmarksList = bookmarkBoxContent.addChild("ul", "id", 
"bookmarks");
         addCategoryToList(BookmarkManager.MAIN_CATEGORY, bookmarksList, 
useragent != null && useragent.contains("khtml") && 
!useragent.contains("chrome"), ctx);
 

Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2009-01-07 
00:37:10 UTC (rev 24951)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2009-01-07 
06:15:51 UTC (rev 24952)
@@ -1116,9 +1116,13 @@
 SecurityLevels.userAlertExtro=You can change these settings on ${link}the 
config page${/link}.
 ShortOption.parseError=Cannot parse value as a string array: ${error}
 ShortOption.parseError=The value specified can't be parsed as a 16-bit integer 
: ${val}
+SimpleHelpToadlet.CHK=CHK = Content Hash Key - A static key derived by a 
mathematical hash of a file.
+SimpleHelpToadlet.SSK=SSK = Signed Subspace Key - 
+SimpleHelpToadlet.USK=USK = Updateable Subspace Key - 
 SimpleHelpToadlet.connectivityText=Testing. Test.   Blah blah blah, etc etc 
etc 
 SimpleHelpToadlet.connectivityTitle=Connectivity
-SimpleHelpToadlet.descriptionText=This page should provide basic info for you 
to get started with Freenet.  There are many other places for more in-depth 
information such as the offical Freenet website http://freenetproject.org, the 
offical wiki http://wiki.freenetproject.org or in-Freenet Freesites.
+SimpleHelpToadlet.definitionsTitle=Definitions
+SimpleHelpToadlet.descriptionText=This page should provide basic info for you 
to get started with Freenet.  There are many other places for more in-depth 
information such as the offical Freenet website http://freenetproject.org, the 
offical wiki http://wiki.freenetproject.org or various in-Freenet Freesites.
 SimpleHelpToadlet.descriptionTitle=Description
 SimpleHelpToadlet.help=Help
 SimpleToadletServer.advancedMode=Enable Advanced Mode?
@@ -1357,7 +1361,7 @@
 WelcomeToadlet.extVersion=Freenet-ext Build #${build} r${rev}
 WelcomeToadlet.extVersionWithRecommended=Freenet-ext Build #${build} 
(${recbuild} is recommended) r${rev}
 WelcomeToadlet.fetch=Fetch
-WelcomeToadlet.fetchKeyLabel=Fetch a Key
+WelcomeToadlet.fetchKeyLabel=Fetch a Key (CHK, SSK, USK)
 WelcomeToadlet.finInsertSuccessWithKey=The message has been inserted 
successfully into ${key}.
 WelcomeToadlet.finInsertedTitle=Insertion
 WelcomeToadlet.finTitle=Frost Instant Note insert
@@ -1386,6 +1390,8 @@
 WelcomeToadlet.restartNode=Restart the node
 WelcomeToadlet.restarting=Please wait a moment while the node is being 
restarted.  This screen should refresh automatically.  Thank you for using 
Freenet.
 WelcomeToadlet.restartingTitle=The Freenet node is being restarted.
+WelcomeToadlet.searchBoxLabel=Search Freenet(may take a while)
+WelcomeToadlet.searchPluginNotLoaded=Search plugin not loaded!
 WelcomeToadlet.shutdown=Shutdown
 WelcomeToadlet.shutdownConfirm=Are you sure you wish to shut down your Freenet 
node?
 WelcomeToadlet.shutdownConfirmTitle=Node Shutdown

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

Reply via email to