Author: toad
Date: 2008-04-18 23:39:22 +0000 (Fri, 18 Apr 2008)
New Revision: 19405

Modified:
   trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
   trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/ProxyUserAlert.java
   trunk/freenet/src/freenet/node/useralerts/UserAlert.java
   trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java
Log:
Make it more or less work.
I'm not sure about PeerManagerUserAlert, and I definitely want to change 
IPDetectorPluginManager's behaviour.

Modified: trunk/freenet/src/freenet/node/IPDetectorPluginManager.java
===================================================================
--- trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2008-04-18 
23:35:21 UTC (rev 19404)
+++ trunk/freenet/src/freenet/node/IPDetectorPluginManager.java 2008-04-18 
23:39:22 UTC (rev 19405)
@@ -40,7 +40,7 @@
                boolean noDismiss;

                public MyUserAlert(String title, String text, boolean 
suggestPortForward, short code, boolean noDismiss) {
-                       super(false, title, text, null, null, code, true, 
L10n.getString("UserAlert.hide"), false, null);
+                       super(false, title, text, title, null, code, true, 
L10n.getString("UserAlert.hide"), false, null);
                        this.suggestPortForward = suggestPortForward;
                        this.noDismiss = noDismiss;
                        portsNotForwarded = new int[] { };
@@ -128,7 +128,7 @@
                noConnectionAlert = new MyUserAlert( 
l10n("noConnectivityTitle"), l10n("noConnectivity"), 
                                true, UserAlert.ERROR, true);
                symmetricAlert = new MyUserAlert(l10n("symmetricTitle"), 
l10n("symmetric"), 
-                               true, UserAlert.ERROR, false);                  
        
+                               true, UserAlert.ERROR, false);
                portRestrictedAlert = new 
MyUserAlert(l10n("portRestrictedTitle"), l10n("portRestricted"), 
                                true, UserAlert.WARNING, false);
                restrictedAlert = new MyUserAlert(l10n("restrictedTitle"), 
l10n("restricted"), 

Modified: trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java 
2008-04-18 23:35:21 UTC (rev 19404)
+++ trunk/freenet/src/freenet/node/useralerts/PeerManagerUserAlert.java 
2008-04-18 23:39:22 UTC (rev 19405)
@@ -86,6 +86,10 @@
                else throw new IllegalArgumentException("Not valid");
        }

+       public String getShortText() {
+               return getTitle();
+       }
+       
        private String l10n(String key, String pattern, String value) {
                return L10n.getString("PeerManagerUserAlert."+key, pattern, 
value);
        }

Modified: trunk/freenet/src/freenet/node/useralerts/ProxyUserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/ProxyUserAlert.java       
2008-04-18 23:35:21 UTC (rev 19404)
+++ trunk/freenet/src/freenet/node/useralerts/ProxyUserAlert.java       
2008-04-18 23:39:22 UTC (rev 19405)
@@ -77,8 +77,8 @@
                return "anchor:"+Integer.toString(hashCode());
        }

-//     public String getShortText() {
-//             return alert.getShortText();
-//     }
+       public String getShortText() {
+               return alert.getShortText();
+       }

 }

Modified: trunk/freenet/src/freenet/node/useralerts/UserAlert.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/UserAlert.java    2008-04-18 
23:35:21 UTC (rev 19404)
+++ trunk/freenet/src/freenet/node/useralerts/UserAlert.java    2008-04-18 
23:39:22 UTC (rev 19405)
@@ -28,11 +28,11 @@
         */
        public HTMLNode getHTMLText();

-//     /**
-//      * *Really* concise text of alert. Should be comfortably under a line 
even when translated
-//      * into a verbose language. Will link to the full details.
-//      */
-//     public String getShortText();
+       /**
+        * *Really* concise text of alert. Should be comfortably under a line 
even when translated
+        * into a verbose language. Will link to the full details.
+        */
+       public String getShortText();

        /**
         * Priority class

Modified: trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java     
2008-04-18 23:35:21 UTC (rev 19404)
+++ trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java     
2008-04-18 23:39:22 UTC (rev 19405)
@@ -138,8 +138,7 @@
                        if (!alert.isValid())
                                continue;
                        HTMLNode listItem = alertsNode.addChild("li");
-                       //listItem.addChild("a", "href", 
"/alerts/#"+alert.anchor(), alert.getShortText());
-                       listItem.addChild("a", "href", 
"/alerts/#"+alert.anchor(), alert.getTitle());
+                       listItem.addChild("a", "href", 
"/alerts/#"+alert.anchor(), alert.getShortText());
                        totalNumber++;
                }
                if (totalNumber == 0) {


Reply via email to