Hello. I've attached a patch (and a couple small graphics) to update the renderers a bit. You can view a screenshot of the renderers here: http://www.godby.org/dashboard/new-renderers.png I'm open to suggestions and recommendations for more improvements (and even criticism). Thanks. ---- Kevin Godby <godbyk yahoo com>
Attachment:
border-left.png
Description: PNG image
Attachment:
border-top.png
Description: PNG image
diff -ruN cvs/dashboard/engine/gui.cs dashboard-patch/engine/gui.cs --- cvs/dashboard/engine/gui.cs 2004-05-12 15:13:42.000000000 -0500 +++ dashboard-patch/engine/gui.cs 2004-05-13 22:38:14.000000000 -0500 @@ -210,7 +210,7 @@ private bool UpdateGUI () { this.stream = this.html.Begin (); - this.stream.Write ("<html><body>"); + this.stream.Write ("<html><body bgcolor=\"#ffffff\">"); String output = EngineMatchSetToHtmlGroupByType (matchset); if (output != "") this.stream.Write (output); Binary files cvs/dashboard/engine/images/border-left.png and dashboard-patch/engine/images/border-left.png differ Binary files cvs/dashboard/engine/images/border-top.png and dashboard-patch/engine/images/border-top.png differ diff -ruN cvs/dashboard/engine/Makefile.am dashboard-patch/engine/Makefile.am --- cvs/dashboard/engine/Makefile.am 2004-03-06 06:00:41.000000000 -0600 +++ dashboard-patch/engine/Makefile.am 2004-05-13 22:32:45.000000000 -0500 @@ -31,7 +31,9 @@ -resource:$(srcdir)/images/mail-new.png,mail-new.png \ -resource:$(srcdir)/images/mail-replied.png,mail-replied.png \ -resource:$(srcdir)/images/mail-read.png,mail-read.png \ - -resource:$(srcdir)/images/rss.png,rss.png + -resource:$(srcdir)/images/rss.png,rss.png \ + -resource:$(srcdir)/images/border-top.png,border-top.png \ + -resource:$(srcdir)/images/border-left.png,border-left.png DASHBOARD_CSFILES = \ $(srcdir)/Backend.cs \ diff -ruN cvs/dashboard/renderers/BugzillaBugMatchRenderer.cs dashboard-patch/renderers/BugzillaBugMatchRenderer.cs --- cvs/dashboard/renderers/BugzillaBugMatchRenderer.cs 2004-04-27 15:37:54.000000000 -0500 +++ dashboard-patch/renderers/BugzillaBugMatchRenderer.cs 2004-05-13 22:33:33.000000000 -0500 @@ -30,7 +30,37 @@ XmlWriter xw = new XmlTextWriter (sw); xw.WriteStartElement ("div"); // Start the bugzilla results block - xw.WriteElementString ("u", "Bugzilla Bugs"); // Print the title + + xw.WriteStartElement ("table"); + xw.WriteAttributeString ("border", "0"); + xw.WriteAttributeString ("cellspacing", "0"); + xw.WriteAttributeString ("cellpadding", "0"); + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("colspan", "2"); + xw.WriteAttributeString ("valign", "bottom"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-top.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-left.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteAttributeString ("align", "left"); + xw.WriteStartElement ("font"); + xw.WriteAttributeString ("size", "+1"); + xw.WriteElementString ("i", "Bugzilla Bugs"); + xw.WriteEndElement (); // font + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr + xw.WriteEndElement (); // table xw.WriteStartElement ("table"); // Start the results table xw.WriteAttributeString ("width", "100%"); @@ -42,6 +72,8 @@ HTMLRenderSingleBugzillaBug (m, xw); xw.WriteEndElement (); // End results table + xw.WriteStartElement ("br"); + xw.WriteEndElement (); // br xw.WriteEndElement (); // End bugzilla results block xw.Close (); @@ -61,7 +93,7 @@ // Trim the sender name if (Owner.IndexOf ("@") != -1) - Owner = Owner.Substring (0, (Owner.LastIndexOf ("@") - 1)); + Owner = Owner.Substring (0, Owner.LastIndexOf ("@")); xw.WriteStartElement ("tr"); xw.WriteStartElement ("td"); @@ -89,7 +121,7 @@ xw.WriteStartElement ("font"); xw.WriteAttributeString ("color", GetStatusColor (Status)); - xw.WriteString (Status); + xw.WriteString (" " + Status); xw.WriteEndElement (); // font xw.WriteEndElement (); // font diff -ruN cvs/dashboard/renderers/DefaultMatchRenderer.cs dashboard-patch/renderers/DefaultMatchRenderer.cs --- cvs/dashboard/renderers/DefaultMatchRenderer.cs 2004-03-04 14:15:05.000000000 -0600 +++ dashboard-patch/renderers/DefaultMatchRenderer.cs 2004-05-13 22:33:33.000000000 -0500 @@ -11,6 +11,8 @@ using System; using System.Collections; +using System.IO; +using System.Xml; [assembly:Dashboard.MatchRendererFactory ("Dashboard.DefaultMatchRenderer")] @@ -25,43 +27,100 @@ public override string HTMLRenderMatches (ArrayList matches) { - string html = ""; + StringWriter sw = new StringWriter (); + XmlWriter xw = new XmlTextWriter (sw); + + xw.WriteStartElement ("div"); // Start the File results block + + xw.WriteStartElement ("table"); + xw.WriteAttributeString ("border", "0"); + xw.WriteAttributeString ("cellspacing", "0"); + xw.WriteAttributeString ("cellpadding", "0"); + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("colspan", "2"); + xw.WriteAttributeString ("valign", "bottom"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-top.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-left.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteAttributeString ("align", "left"); + xw.WriteStartElement ("font"); + xw.WriteAttributeString ("size", "+1"); + xw.WriteElementString ("i", "Miscellaneous"); + xw.WriteEndElement (); // font + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr + xw.WriteEndElement (); // table + + + xw.WriteStartElement ("table"); + xw.WriteAttributeString ("border", "0"); + xw.WriteAttributeString ("cellpadding", "0"); + xw.WriteAttributeString ("cellspacing", "0"); foreach (Match m in matches) - html += HTMLRenderSingleMatch (m); + HTMLRenderSingleMatch (m, xw); + + xw.WriteEndElement (); // table + xw.WriteStartElement ("br"); + xw.WriteEndElement (); // br + xw.WriteEndElement (); // div + + xw.Close (); + + //Console.WriteLine ("-- Default Renderer -------------------------------------------------"); + //Console.WriteLine (sw.ToString ()); + //Console.WriteLine ("---------------------------------------------------------------------\n\n"); + + return sw.ToString (); - return html; } - private string HTMLRenderSingleMatch (Match m) + private void HTMLRenderSingleMatch (Match m, XmlWriter xw) { if (m ["Icon"] == null && m ["Text"] == null) - return ""; - - string html; + return; - html = String.Format ( - "<table border=0 cellpadding=0 cellspacing=0>" + - "<tr>"); - - if (m ["Icon"] != null) - html += String.Format ( - " <td valign=center>" + - + " <a href=\"{0}\"><img src=\"{1}\" border=0></a>" + - " </td>", - m ["Action"], - m ["Icon"]); - - html += String.Format ("<td> </td>" + - " <td valign=top>" + - " <a href=\"{0}\" style=\"text-decoration: none;\">{1}" + - " </td>" + - "</tr>" + - "</table>", - m ["Action"], - m ["Text"]); + xw.WriteStartElement ("tr"); - return html; + if (m ["Icon"] != null) { + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "center"); + xw.WriteStartElement ("a"); + xw.WriteAttributeString ("href", (string) m ["Action"]); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", (string) m ["Icon"]); + xw.WriteAttributeString ("border", "0"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // a + xw.WriteEndElement (); // td + } // end if + + xw.WriteStartElement ("td"); + xw.WriteRaw (" "); + xw.WriteEndElement (); // td + + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteStartElement ("a"); + xw.WriteAttributeString ("href", (string) m ["Action"]); + xw.WriteAttributeString ("style", "text-decoration: none;"); + xw.WriteString ((string) m ["Text"]); + xw.WriteEndElement (); // a + xw.WriteString (" (" + (string) m.Type + ")"); + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr } } } diff -ruN cvs/dashboard/renderers/FileMatchRenderer.cs dashboard-patch/renderers/FileMatchRenderer.cs --- cvs/dashboard/renderers/FileMatchRenderer.cs 2004-05-13 02:48:52.000000000 -0500 +++ dashboard-patch/renderers/FileMatchRenderer.cs 2004-05-13 22:33:33.000000000 -0500 @@ -11,6 +11,7 @@ using System.Collections; using System.Xml; using System.IO; +using Gdk; [assembly:Dashboard.MatchRendererFactory ("Dashboard.FileMatchRenderer")] @@ -32,14 +33,30 @@ xw.WriteStartElement ("table"); xw.WriteAttributeString ("border", "0"); - xw.WriteAttributeString ("width", "100%"); + xw.WriteAttributeString ("cellspacing", "0"); + xw.WriteAttributeString ("cellpadding", "0"); + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("colspan", "2"); + xw.WriteAttributeString ("valign", "bottom"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-top.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr xw.WriteStartElement ("tr"); xw.WriteStartElement ("td"); - xw.WriteAttributeString ("bgcolor", "fffa6e"); - xw.WriteAttributeString ("nowrap", "1"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-left.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteAttributeString ("align", "left"); xw.WriteStartElement ("font"); - xw.WriteAttributeString ("size", "+2"); - xw.WriteString ("Your Files"); + xw.WriteAttributeString ("size", "+1"); + xw.WriteElementString ("i", "Your Files"); xw.WriteEndElement (); // font xw.WriteEndElement (); // td xw.WriteEndElement (); // tr @@ -62,6 +79,8 @@ } xw.WriteEndElement (); // End results table + xw.WriteStartElement ("br"); + xw.WriteEndElement (); // br xw.WriteEndElement (); // End File results block xw.Close (); @@ -78,6 +97,7 @@ string Path = Convert.ToString (m ["Path"]); string Text = Convert.ToString (m ["Text"]); string Icon = Convert.ToString (m ["Icon"]); + Icon = GetSmallIcon (Icon); string Score = Convert.ToString (m ["Score"]); if (Score == null || Score == "") Score = "0"; @@ -102,7 +122,8 @@ //Console.WriteLine ("Last Write Time: {0}", file.LastWriteTime); //Console.WriteLine ("Size: {0}", file.Length); - string LastModifiedDate = file.LastWriteTime.ToLongDateString (); + //string LastModifiedDate = file.LastWriteTime.ToLongDateString (); + string LastModifiedDate = GetSmartDate (file.LastWriteTime); xw.WriteStartElement ("tr"); if (color_band) // highlight every other row @@ -110,6 +131,7 @@ xw.WriteStartElement ("td"); xw.WriteAttributeString ("valign", "top"); xw.WriteAttributeString ("align", "left"); + xw.WriteRaw (" "); // some padding // Show the file's icon (and make it a link) xw.WriteStartElement ("a"); // link @@ -122,6 +144,10 @@ xw.WriteEndElement (); // td xw.WriteStartElement ("td"); + xw.WriteRaw (" "); // spacer + xw.WriteEndElement (); // td + + xw.WriteStartElement ("td"); xw.WriteAttributeString ("valign", "top"); xw.WriteAttributeString ("align", "left"); xw.WriteAttributeString ("width", "100%"); @@ -143,7 +169,7 @@ // Print 'Last modified: date' xw.WriteStartElement ("font"); xw.WriteAttributeString ("color", "#666666"); - xw.WriteString ("Last modified: " + LastModifiedDate); + xw.WriteString ("Modified: " + LastModifiedDate); xw.WriteEndElement (); // font xw.WriteEndElement (); // font @@ -151,6 +177,70 @@ xw.WriteEndElement (); // tr } + + // Scale icon down to 24x24 for asthetics + private string GetSmallIcon (string icon) + { + // Load the original icon into the pixbuf + Gdk.Pixbuf fullsize = new Pixbuf (icon); + + // Scale the icon to 24x24 + Gdk.Pixbuf small_icon = fullsize.ScaleSimple (24, 24, Gdk.InterpType.Bilinear); + + // Get the user's home directory + string homedir = Environment.GetEnvironmentVariable ("HOME"); + + // Set icon to where we want to save the scaled image + icon = Path.Combine (Path.Combine (homedir, + String.Format (".dashboard/tmp/")), + "small-icon-" + Path.GetFileName (icon.ToString())); + + // Save the scaled image + small_icon.Savev (icon, "png", null, null); + + // Return the location of the new (scaled) image + return icon; + + } // end GetSmallIcon + + private string GetSmartDate (DateTime date) + { + // Set up some useful constants + int OneDayAgo = -86400000; // in milliseconds + int OneDayFromNow = 86400000; + int TwoDaysAgo = -172800000; + int SevenDaysAgo = -604800000; + int SixDaysFromNow = 518400000; + + DateTime now = DateTime.Now; + TimeSpan ts = date - now; + int offset = (int)ts.TotalMilliseconds; + + //DEBUG + //Console.WriteLine ("File renderer :: Date is {0}", date.ToString ("F")); + //Console.WriteLine ("File renderer :: Now is {0}", now.ToString ("F")); + //Console.WriteLine ("File renderer :: Offset is {0}", offset); + + // -- Relative dates + // Today, tomorrow, and yesterday + if ((offset > OneDayAgo) && (offset <= 0)) return "Today"; + if ((offset > 0) && (offset < OneDayFromNow)) return "Tomorrow"; + if ((offset > TwoDaysAgo) && (offset <= OneDayAgo)) return "Yesterday"; + + // Past week or coming week + if ((offset > SevenDaysAgo) && (offset <= TwoDaysAgo)) return "Last " + date.DayOfWeek; + if ((offset >= OneDayFromNow) && (offset < SixDaysFromNow)) return "This " + date.DayOfWeek; + + // -- Explicit dates + string month = date.ToString ("MMM "); + string year = ""; + if (date.Year != now.Year) + year = ", " + date.Year; + + return (month + date.Day + year); + + } // end GetSmartDate + } public enum SortDirection { diff -ruN cvs/dashboard/renderers/IMLogMatchRenderer.cs dashboard-patch/renderers/IMLogMatchRenderer.cs --- cvs/dashboard/renderers/IMLogMatchRenderer.cs 2004-03-04 01:32:54.000000000 -0600 +++ dashboard-patch/renderers/IMLogMatchRenderer.cs 2004-05-13 22:33:33.000000000 -0500 @@ -5,10 +5,13 @@ // // Author: // Nat Friedman <nat nat org> +// Kevin Godby <godbyk yahoo com> // using System; using System.Collections; +using System.Xml; +using System.IO; [assembly:Dashboard.MatchRendererFactory ("Dashboard.IMLogMatchRenderer")] @@ -33,7 +36,11 @@ public override string HTMLRenderMatches (ArrayList matches) { - string html = ""; + StringWriter sw = new StringWriter (); + XmlWriter xw = new XmlTextWriter (sw); + + xw.WriteStartElement ("div"); // Start the File results block + string current_alias = null; // Sort by alias @@ -42,52 +49,76 @@ foreach (Match m in matches) { string alias = (string) m ["Alias"]; - if (current_alias != null && current_alias != alias) - html += "</table>\n\n"; // Footer - if (current_alias != alias) - html += HTMLRenderHeader (m); + HTMLRenderHeader (m, xw); - html += HTMLRenderSingleIMConv (m); + HTMLRenderSingleIMConv (m, xw); current_alias = alias; } - html += "</table>\n\n"; // Footer + xw.WriteEndElement (); // div - return html; - } + xw.Close (); - private string HTMLRenderHeader (Match m) - { - string html; + //Console.WriteLine ("-- IM Log Renderer --------------------------------------------------"); + //Console.WriteLine (sw.ToString ()); + //Console.WriteLine ("---------------------------------------------------------------------\n\n"); - html = String.Format ("<table border=0 width=100%>" + - " <tr bgcolor=#ecd953>" + - " <td> <img border=0 src=\"{0}\"> </td>" + - " <td valign=center>" + - " <font size=+1>Conversations with {1}</font>" + - " </td>" + - " </tr>", - m ["Icon"], - m ["Alias"]); + return sw.ToString (); - return html; } - private string HTMLRenderSingleIMConv (Match m) + private void HTMLRenderHeader (Match m, XmlWriter xw) { - string html; - - html = String.Format ("<tr bgcolor=#f7ec93>" + - " <td colspan=2> <font size=-1>" + - " <a style=\"text-decoration: none;\" href=\"{1}\">{0}</a>" + - " </font></td>" + - "</tr>", - m ["Date"], - m ["URL"]); + xw.WriteStartElement ("table"); + xw.WriteAttributeString ("border", "0"); + xw.WriteAttributeString ("cellspacing", "0"); + xw.WriteAttributeString ("cellpadding", "0"); + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("colspan", "2"); + xw.WriteAttributeString ("valign", "bottom"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-top.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-left.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteAttributeString ("align", "left"); + xw.WriteStartElement ("font"); + xw.WriteAttributeString ("size", "+1"); + xw.WriteElementString ("i", "IM Conversation with " + m ["Alias"]); + xw.WriteEndElement (); // font + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr + xw.WriteEndElement (); // table + + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", (string)m ["Icon"]); + xw.WriteAttributeString ("align", "right"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteEndElement (); // img + } - return html; + private void HTMLRenderSingleIMConv (Match m, XmlWriter xw) + { + xw.WriteRaw ("• "); + xw.WriteStartElement ("a"); + xw.WriteAttributeString ("href", (string)m ["URL"]); + xw.WriteAttributeString ("style", "text-decoration: none;"); + xw.WriteString ((string)m ["Date"]); + xw.WriteEndElement (); // a + xw.WriteStartElement ("br"); + xw.WriteEndElement (); // br } } } diff -ruN cvs/dashboard/renderers/MailMessageMatchRenderer.cs dashboard-patch/renderers/MailMessageMatchRenderer.cs --- cvs/dashboard/renderers/MailMessageMatchRenderer.cs 2004-05-13 15:18:23.000000000 -0500 +++ dashboard-patch/renderers/MailMessageMatchRenderer.cs 2004-05-13 22:33:33.000000000 -0500 @@ -39,13 +39,30 @@ // Title of block xw.WriteStartElement ("table"); xw.WriteAttributeString ("border", "0"); - xw.WriteAttributeString ("width", "100%"); + xw.WriteAttributeString ("cellspacing", "0"); + xw.WriteAttributeString ("cellpadding", "0"); + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("colspan", "2"); + xw.WriteAttributeString ("valign", "bottom"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-top.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr xw.WriteStartElement ("tr"); xw.WriteStartElement ("td"); - xw.WriteAttributeString ("bgcolor", "fffa6e"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-left.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteAttributeString ("align", "left"); xw.WriteStartElement ("font"); - xw.WriteAttributeString ("size", "+2"); - xw.WriteString ("Email Messages"); + xw.WriteAttributeString ("size", "+1"); + xw.WriteElementString ("i", "Email Messages"); xw.WriteEndElement (); // font xw.WriteEndElement (); // td xw.WriteEndElement (); // tr @@ -70,6 +87,8 @@ } xw.WriteEndElement (); // table + xw.WriteStartElement ("br"); + xw.WriteEndElement (); // br xw.WriteEndElement (); // div // close the xhtml doc diff -ruN cvs/dashboard/renderers/RSSMatchRenderer.cs dashboard-patch/renderers/RSSMatchRenderer.cs --- cvs/dashboard/renderers/RSSMatchRenderer.cs 2004-03-05 16:07:13.000000000 -0600 +++ dashboard-patch/renderers/RSSMatchRenderer.cs 2004-05-13 22:33:33.000000000 -0500 @@ -34,9 +34,6 @@ XmlWriter xw = new XmlTextWriter (sw); xw.WriteStartElement ("div"); // Start the rss results block - // xw.WriteElementString ("u", "RSS Feed"); // Print the title - // xw.WriteStartElement ("br"); - // xw.WriteEndElement (); // br ArrayList Titles = new ArrayList (); @@ -63,17 +60,36 @@ private void HTMLRenderSingleRSSTitle (string Title, ArrayList matches, XmlWriter xw) { - string Icon = "internal:rss.png"; - - // xw.WriteStartElement ("img"); // rss icon - // xw.WriteAttributeString ("src", Icon); - - xw.WriteStartElement ("font"); // Make the font smaller to fit window width - xw.WriteAttributeString ("size", "+0"); - - xw.WriteElementString ("u", " Weblog: " + Title); - xw.WriteStartElement ("br"); - xw.WriteEndElement (); // br + xw.WriteStartElement ("table"); + xw.WriteAttributeString ("border", "0"); + xw.WriteAttributeString ("cellspacing", "0"); + xw.WriteAttributeString ("cellpadding", "0"); + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("colspan", "2"); + xw.WriteAttributeString ("valign", "bottom"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-top.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-left.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteAttributeString ("align", "left"); + xw.WriteStartElement ("font"); + xw.WriteAttributeString ("size", "+1"); + xw.WriteElementString ("i", "Weblog: " + Title); + xw.WriteEndElement (); // font + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr + xw.WriteEndElement (); // table xw.WriteStartElement ("table"); xw.WriteAttributeString ("border", "0"); @@ -92,8 +108,6 @@ xw.WriteEndElement (); // table - xw.WriteEndElement (); // font - } private void HTMLRenderSingleRSSItem (Match m, XmlWriter xw, bool color_band) @@ -144,9 +158,6 @@ xw.WriteEndElement (); // font } - // xw.WriteStartElement ("br"); - // xw.WriteEndElement (); // br - xw.WriteEndElement (); // td xw.WriteEndElement (); // tr diff -ruN cvs/dashboard/renderers/WebLinkMatchRenderer.cs dashboard-patch/renderers/WebLinkMatchRenderer.cs --- cvs/dashboard/renderers/WebLinkMatchRenderer.cs 2004-05-13 02:44:43.000000000 -0500 +++ dashboard-patch/renderers/WebLinkMatchRenderer.cs 2004-05-13 22:33:33.000000000 -0500 @@ -35,13 +35,30 @@ xw.WriteStartElement ("table"); // WebLink header xw.WriteAttributeString ("border", "0"); - xw.WriteAttributeString ("width", "100%"); + xw.WriteAttributeString ("cellspacing", "0"); + xw.WriteAttributeString ("cellpadding", "0"); xw.WriteStartElement ("tr"); xw.WriteStartElement ("td"); - xw.WriteAttributeString ("bgcolor", "#fffa6e"); + xw.WriteAttributeString ("colspan", "2"); + xw.WriteAttributeString ("valign", "bottom"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-top.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteEndElement (); // tr + xw.WriteStartElement ("tr"); + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteStartElement ("img"); + xw.WriteAttributeString ("src", "internal:border-left.png"); + xw.WriteEndElement (); // img + xw.WriteEndElement (); // td + xw.WriteStartElement ("td"); + xw.WriteAttributeString ("valign", "top"); + xw.WriteAttributeString ("align", "left"); xw.WriteStartElement ("font"); - xw.WriteAttributeString ("size", "+2"); - xw.WriteString ("Web Sites"); + xw.WriteAttributeString ("size", "+1"); + xw.WriteElementString ("i", "Web Sites"); xw.WriteEndElement (); // font xw.WriteEndElement (); // td xw.WriteEndElement (); // tr @@ -64,6 +81,8 @@ } xw.WriteEndElement (); // results table (table) + xw.WriteStartElement ("br"); + xw.WriteEndElement (); // br xw.WriteEndElement (); // end WebLink block (div) xw.Close (); @@ -121,6 +140,7 @@ xw.WriteAttributeString ("href", Uri); xw.WriteAttributeString ("style", "text-decoration: none;"); xw.WriteString (Title); + xw.WriteEndElement (); // a xw.WriteStartElement ("font"); xw.WriteAttributeString ("color", "#666666"); @@ -130,12 +150,14 @@ xw.WriteStartElement ("br"); xw.WriteEndElement (); // br + xw.WriteStartElement ("a"); + xw.WriteAttributeString ("href", Uri); + xw.WriteAttributeString ("style", "text-decoration: none;"); xw.WriteStartElement ("font"); xw.WriteAttributeString ("size", "-1"); xw.WriteAttributeString ("color", "#666666"); xw.WriteString (Uri); xw.WriteEndElement (); // font - xw.WriteEndElement (); // a xw.WriteEndElement (); // td