Revision: 10935
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=10935&view=rev
Author: amaxwell
Date: 2007-08-17 11:41:31 -0700 (Fri, 17 Aug 2007)
Log Message:
-----------
Incorporate Skim notes when searching all fields.
Modified Paths:
--------------
trunk/bibdesk/BDSKItemSearchIndexes.m
Modified: trunk/bibdesk/BDSKItemSearchIndexes.m
===================================================================
--- trunk/bibdesk/BDSKItemSearchIndexes.m 2007-08-17 18:04:16 UTC (rev
10934)
+++ trunk/bibdesk/BDSKItemSearchIndexes.m 2007-08-17 18:41:31 UTC (rev
10935)
@@ -114,7 +114,15 @@
// ARM: I thought Search Kit was supposed to ignore some
punctuation, but it matches curly braces (bug #1762014). Since Title is the
field most likely to have specific formatting commands, we'll remove all TeX
from it, but the commands shouldn't affect search results anyway unless the
commands split words. For the allFieldsString, we'll just remove curly braces
to save time, and pollute the index with a few commands.
+ // shouldn't be any TeX junk to remove from these
+ NSString *skimNotes = [pub skimNotesForLocalURL];
+
NSString *searchText = [[pub allFieldsString]
stringByRemovingCurlyBraces];
+
+ // add Skim notes to all fields string as well
+ if (skimNotes)
+ searchText = [searchText stringByAppendingFormat:@" %@",
skimNotes];
+
SKIndexRef skIndex = (void *)CFDictionaryGetValue(searchIndexes,
BDSKAllFieldsString);
if (searchText && skIndex)
SKIndexAddDocumentWithText(skIndex, doc,
(CFStringRef)searchText, TRUE);
@@ -131,11 +139,9 @@
if (skIndex)
SKIndexAddDocumentWithText(skIndex, doc, (CFStringRef)names,
TRUE);
- // shouldn't be any TeX junk to remove from these
- searchText = [pub skimNotesForLocalURL];
skIndex = (void *)CFDictionaryGetValue(searchIndexes,
(CFStringRef)BDSKSkimNotesString);
- if (searchText && skIndex)
- SKIndexAddDocumentWithText(skIndex, doc,
(CFStringRef)searchText, TRUE);
+ if (skimNotes && skIndex)
+ SKIndexAddDocumentWithText(skIndex, doc,
(CFStringRef)skimNotes, TRUE);
CFRelease(doc);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit