I don't think we do...
On Sun, May 21, 2006 at 01:17:39PM +0000, nextgens at freenetproject.org wrote:
> Author: nextgens
> Date: 2006-05-21 13:17:35 +0000 (Sun, 21 May 2006)
> New Revision: 8816
>
> Modified:
> trunk/freenet/src/freenet/node/UserAlertManager.java
> Log:
> Doh, in fact we do need ... but before
>
> Modified: trunk/freenet/src/freenet/node/UserAlertManager.java
> ===================================================================
> --- trunk/freenet/src/freenet/node/UserAlertManager.java 2006-05-21
> 13:15:31 UTC (rev 8815)
> +++ trunk/freenet/src/freenet/node/UserAlertManager.java 2006-05-21
> 13:17:35 UTC (rev 8816)
> @@ -44,34 +44,36 @@
> * Write the alerts as HTML to a StringBuffer
> */
> public void toHtml(StringBuffer buf) {
> - UserAlert[] a = getAlerts();
> - for(int i=0;i<a.length;i++) {
> - UserAlert alert = a[i];
> - if(!alert.isValid()) return;
> -
> - short level = a[i].getPriorityClass();
> - if(level <= UserAlert.CRITICAL_ERROR)
> - buf.append("<div class=\"infobox
> infobox-error\">\n");
> - else if(level <= UserAlert.ERROR)
> - buf.append("<div class=\"infobox
> infobox-alert\">\n");
> - else if(level <= UserAlert.WARNING)
> - buf.append("<div class=\"infobox
> infobox-warning\">\n");
> - else if(level <= UserAlert.MINOR)
> - buf.append("<div class=\"infobox
> infobox-information\">\n");
> - //
> - buf.append("<div class=\"infobox-header\">\n");
> - buf.append(a[i].getTitle());
> - buf.append("</div>\n");
> - //
> - buf.append("<div class=\"infobox-content\">\n");
> - buf.append(a[i].getText());
> - //
> - if(a[i].userCanDismiss())
> - buf.append("<form method=\"post\"
> action=\".\"><input type=\"hidden\" name=\"disable\" value=\""+
> - a[i].hashCode()+"\" /><input
> type=\"submit\" value=\"Hide\" /></form>");
> - //
> - buf.append("</div>\n");
> - buf.append("</div>\n");
> + synchronized(alerts){
> + UserAlert[] a = getAlerts();
> + for(int i=0;i<a.length;i++) {
> + UserAlert alert = a[i];
> + if(!alert.isValid()) return;
> +
> + short level = a[i].getPriorityClass();
> + if(level <= UserAlert.CRITICAL_ERROR)
> + buf.append("<div class=\"infobox
> infobox-error\">\n");
> + else if(level <= UserAlert.ERROR)
> + buf.append("<div class=\"infobox
> infobox-alert\">\n");
> + else if(level <= UserAlert.WARNING)
> + buf.append("<div class=\"infobox
> infobox-warning\">\n");
> + else if(level <= UserAlert.MINOR)
> + buf.append("<div class=\"infobox
> infobox-information\">\n");
> + //
> + buf.append("<div class=\"infobox-header\">\n");
> + buf.append(a[i].getTitle());
> + buf.append("</div>\n");
> + //
> + buf.append("<div class=\"infobox-content\">\n");
> + buf.append(a[i].getText());
> + //
> + if(a[i].userCanDismiss())
> + buf.append("<form method=\"post\"
> action=\".\"><input type=\"hidden\" name=\"disable\" value=\""+
> + a[i].hashCode()+"\"
> /><input type=\"submit\" value=\"Hide\" /></form>");
> + //
> + buf.append("</div>\n");
> + buf.append("</div>\n");
> + }
> }
> }
>
>
> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
>
--
Matthew J Toseland - toad at amphibian.dyndns.org
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20060522/f3e6c169/attachment.pgp>