![](https://seccdn.libravatar.org/avatar/af22e20b6884acbc89be6d7736c43e92.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package beagle checked in at Fri Apr 28 21:09:56 CEST 2006. -------- --- GNOME/beagle/beagle.changes 2006-04-25 19:35:04.000000000 +0200 +++ STABLE/beagle/beagle.changes 2006-04-27 17:44:32.000000000 +0200 @@ -1,0 +2,11 @@ +Thu Apr 27 17:44:17 CEST 2006 - sbrabec@suse.cz + +- Fixed typo in cs.po. + +------------------------------------------------------------------- +Thu Apr 27 00:07:28 CEST 2006 - joeshaw@suse.de + +- Add patch which fixes HTML being returned in snippets for gaim + logs and tomboy notes. (bgo #333261, #328770) + +------------------------------------------------------------------- New: ---- beagle-cs.patch beagle-gaim-note-markup.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ beagle.spec ++++++ --- /var/tmp/diff_new_pack.aaDaSo/_old 2006-04-28 21:09:46.000000000 +0200 +++ /var/tmp/diff_new_pack.aaDaSo/_new 2006-04-28 21:09:46.000000000 +0200 @@ -18,7 +18,7 @@ Group: Productivity/Other Autoreqprov: on Version: 0.2.3 -Release: 30 +Release: 35 Summary: Desktop Search Application URL: http://www.gnome.org/projects/beagle/ Source: %{name}-%{version}.tar.gz @@ -46,6 +46,8 @@ Patch19: beagle-safe-process-redirect.patch Patch20: beagle-filter-stop-pulling-on-error.patch Patch21: beagle-settings-no-hardcoded-size.patch +Patch22: beagle-gaim-note-markup.patch +Patch23: beagle-cs.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Prereq: /usr/sbin/groupadd /usr/sbin/useradd Requires: mono-core >= 1.1.13.5 @@ -305,6 +307,8 @@ %patch19 %patch20 %patch21 +%patch22 +%patch23 %build rm po/no.* @@ -461,6 +465,11 @@ %{prefix}/%_lib/pkgconfig/*.pc %changelog -n beagle +* Thu Apr 27 2006 - sbrabec@suse.cz +- Fixed typo in cs.po. +* Thu Apr 27 2006 - joeshaw@suse.de +- Add patch which fixes HTML being returned in snippets for gaim + logs and tomboy notes. (bgo #333261, #328770) * Tue Apr 25 2006 - joeshaw@suse.de - Add a patch to not hardcode the beagle-settings window size. (bnc #169133, bgo #331161) ++++++ beagle-cs.patch ++++++ --- po/cs.po +++ po/cs.po @@ -54,7 +54,7 @@ #: ../search/Category.cs:103 #, csharp-format msgid "{0}-{1} of {2}" -msgstr "{0}-{1} x {2}" +msgstr "{0}-{1} z {2}" #: ../search/Pages/NoMatch.cs:19 msgid "No results were found." ++++++ beagle-gaim-note-markup.patch ++++++ Index: Util/ImLog.cs =================================================================== RCS file: /cvs/gnome/beagle/Util/ImLog.cs,v retrieving revision 1.23 diff -u -p -u -r1.23 ImLog.cs --- Util/ImLog.cs 21 Feb 2006 21:19:05 -0000 1.23 +++ Util/ImLog.cs 26 Apr 2006 19:29:48 -0000 @@ -133,48 +133,6 @@ namespace Beagle.Util { public const string MimeType = "beagle/x-gaim-log"; - private static string StripTags (string line, StringBuilder builder) - { - int first = line.IndexOf ('<'); - if (first == -1) - return line; - - builder.Length = 0; - - int i = 0; - while (i < line.Length) { - - int j; - if (first == -1) { - j = line.IndexOf ('<', i); - } else { - j = first; - first = -1; - } - - int k = -1; - if (j != -1) { - k = line.IndexOf ('>', j); - - // If a "<" is unmatched, preserve it, and the - // rest of the line - if (k == -1) - j = -1; - } - - if (j == -1) { - builder.Append (line, i, line.Length - i); - break; - } - - builder.Append (line, i, j-i); - - i = k+1; - } - - return builder.ToString (); - } - /////////////////////////////////////// public GaimLog (FileInfo file, TextReader reader) : base ("gaim", file, reader) @@ -300,7 +258,7 @@ namespace Beagle.Util { while ((line = TextReader.ReadLine ()) != null) { if (isHtml) - line = StripTags (line, builder); + line = StringFu.StripTags (line, builder); ProcessLine (line); } Index: Util/Note.cs =================================================================== RCS file: /cvs/gnome/beagle/Util/Note.cs,v retrieving revision 1.3 diff -u -p -u -r1.3 Note.cs --- Util/Note.cs 4 Nov 2005 15:35:34 -0000 1.3 +++ Util/Note.cs 26 Apr 2006 19:29:48 -0000 @@ -27,6 +27,7 @@ using System; using System.IO; +using System.Text; using System.Xml; namespace Beagle.Util { @@ -93,37 +94,40 @@ namespace Beagle.Util { XmlTextReader doc = new XmlTextReader (reader); doc.Namespaces = false; + bool read_text = false; + StringBuilder sb = new StringBuilder (); + while (doc.Read ()) { - if (doc.NodeType != XmlNodeType.Element) + // FIXME: Extract more information than mere text from the tags in note-content + // for hottext, linking notes etc. + if (doc.NodeType == XmlNodeType.Element && doc.Name == "note-content") { + read_text = true; + continue; + } + + if (doc.NodeType == XmlNodeType.EndElement && doc.Name == "note-content") { + read_text = false; continue; - - switch (doc.Name) { - case "title": + } + + if (doc.NodeType == XmlNodeType.Element && doc.Name == "title") { note.subject = doc.ReadString (); - break; - case "note-content": - // FIXME: don't discard XML style info - note.text = StripTags (doc.ReadInnerXml ()); - break; + continue; + } + + if (doc.NodeType == XmlNodeType.Text) { + if (read_text) + sb.Append (doc.Value); + continue; } } + doc.Close (); + note.text = sb.ToString (); return note; } - private static string StripTags (string line) - { - int i, j; - while (true) { - i = line.IndexOf ('<'); - if (i == -1) - break; - j = line.IndexOf ('>', i); - line = line.Substring (0, i) + line.Substring (j+1); - } - return line; - } } } Index: Util/StringFu.cs =================================================================== RCS file: /cvs/gnome/beagle/Util/StringFu.cs,v retrieving revision 1.41 diff -u -p -u -r1.41 StringFu.cs --- Util/StringFu.cs 6 Feb 2006 02:51:20 -0000 1.41 +++ Util/StringFu.cs 26 Apr 2006 19:29:48 -0000 @@ -612,5 +612,79 @@ namespace Beagle.Util { return sb.ToString (); } + public static string StripTags (string line, StringBuilder builder) + { + int first = line.IndexOf ('<'); + if (first == -1) + return line; + + builder.Length = 0; + + int i = 0; + while (i < line.Length) { + + int j; + if (first == -1) { + j = line.IndexOf ('<', i); + } else { + j = first; + first = -1; + } + + int k = -1; + if (j != -1) { + k = line.IndexOf ('>', j); + + // If a "<" is unmatched, preserve it, and the + // rest of the line + if (k == -1) + j = -1; + } + + if (j == -1) { + builder.Append (line, i, line.Length - i); + break; + } + + builder.Append (line, i, j-i); + + i = k+1; + } + + return builder.ToString (); + } + + public static string StripTags (string line) + { + StringBuilder sb = new StringBuilder (); + return StripTags (line, sb); + } + + } + + public class HtmlRemovingReader : TextReader { + private TextReader reader; + private StringBuilder sb; + + public HtmlRemovingReader (TextReader reader) + { + this.reader = reader; + sb = new StringBuilder (); + } + + public override string ReadLine () + { + string line = reader.ReadLine (); + if (line == null) + return null; + + sb.Length = 0; + return StringFu.StripTags (line, sb); + } + + public override void Close () + { + reader.Close (); + } } } Index: beagled/GaimLogQueryable/GaimLogQueryable.cs =================================================================== RCS file: /cvs/gnome/beagle/beagled/GaimLogQueryable/GaimLogQueryable.cs,v retrieving revision 1.50 diff -u -p -u -r1.50 GaimLogQueryable.cs --- beagled/GaimLogQueryable/GaimLogQueryable.cs 21 Feb 2006 19:27:17 -0000 1.50 +++ beagled/GaimLogQueryable/GaimLogQueryable.cs 26 Apr 2006 19:29:48 -0000 @@ -268,6 +268,19 @@ namespace Beagle.Daemon.GaimLogQueryable return true; } + override public string GetSnippet (string [] query_terms, Hit hit) + { + TextReader reader; + reader = TextCache.UserCache.GetReader (hit.Uri); + if (reader == null) + return null; + HtmlRemovingReader html_removing_reader = new HtmlRemovingReader (reader); + string snippet = SnippetFu.GetSnippet (query_terms, html_removing_reader); + html_removing_reader.Close (); + + return snippet; + } + } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de