Author: j16sdiz
Date: 2008-12-16 05:52:50 +0000 (Tue, 16 Dec 2008)
New Revision: 24368

Modified:
   trunk/plugins/XMLSpider/XMLSpider.java
Log:
Show "NO URI" when nothing is running

Modified: trunk/plugins/XMLSpider/XMLSpider.java
===================================================================
--- trunk/plugins/XMLSpider/XMLSpider.java      2008-12-16 05:48:15 UTC (rev 
24367)
+++ trunk/plugins/XMLSpider/XMLSpider.java      2008-12-16 05:52:50 UTC (rev 
24368)
@@ -1044,6 +1044,9 @@
                query.descend("lastChange").orderDescending();
                ObjectSet<Page> set = query.execute();
 
+               if (set.isEmpty()) {
+                       HTMLNode list = parent.addChild("%", "NO URI");
+               } else {
                HTMLNode list = parent.addChild("ol", "style", "overflow: auto; 
white-space: nowrap;");
 
                for (int i = 0; i < maxShownURIs && set.hasNext(); i++) {
@@ -1051,6 +1054,7 @@
                        HTMLNode litem = list.addChild("li", "title", 
page.comment);
                        litem.addChild("a", "href", "/freenet:" + page.uri, 
page.uri);
                }
+               }
        }
 
        /**
@@ -1098,6 +1102,9 @@
                runningBox.addAttribute("style", "right: 0;");
                HTMLNode runningContent = pageMaker.getContentNode(runningBox);
                synchronized (runningFetch) {
+                       if (runningFetch.isEmpty()) {
+                               HTMLNode list = runningContent.addChild("%", 
"NO URI");
+                       } else {
                        HTMLNode list = runningContent.addChild("ol", "style", 
"overflow: auto; white-space: nowrap;");
 
                        Iterator<Page> pi = runningFetch.keySet().iterator();
@@ -1106,6 +1113,7 @@
                                HTMLNode litem = list.addChild("li", "title", 
page.comment);
                                litem.addChild("a", "href", "/freenet:" + 
page.uri, page.uri);
                        }
+                       }
                }
                contentNode.addChild(runningBox);
 

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

Reply via email to