From cf243d99127441ce2fd3b4641427cb49ab155402 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 1 Oct 2009 16:35:44 +0000 Subject: =?UTF-8?q?=E2=80=A2=20first=20implementation=20of=20a=20Content?= =?UTF-8?q?=20Filter=20Editor=20-=20user-defined=20content=20filter=20can?= =?UTF-8?q?=20be=20saved=20globally=20(Prefs)=20or=20in=20SPF=20files=20-?= =?UTF-8?q?=20BETA=20-=20further=20tests=20are=20needed=20due=20to=20compl?= =?UTF-8?q?exity=20-=20SPQueryController=20now=20handles=20the=20local=20u?= =?UTF-8?q?ser-defined=20content=20filters=20-=20tooltips=20are=20now=20ge?= =?UTF-8?q?nerated=20automatically=20if=20not=20defined=20explicitly=20(in?= =?UTF-8?q?cl.=20if=20$BINARY=20placeholder=20was=20used)=20=E2=80=A2=20if?= =?UTF-8?q?=20user=20added=20local=20query=20favorites=20or=20content=20fi?= =?UTF-8?q?lters=20to=20an=20Untitled=20document=20and=20s/he=20wants=20to?= =?UTF-8?q?=20close=20it=20the=20standard=20sheet=20will=20be=20displayed?= =?UTF-8?q?=20(Don't=20Save=20-=20Cancel=20-=20Save)=20-=20due=20to=20that?= =?UTF-8?q?=20changed=20old=20[TableDocument=20displayName]=20to=20'displa?= =?UTF-8?q?ySPName'=20to=20be=20conform=20with=20Cocoa=20=E2=80=A2=20chang?= =?UTF-8?q?ed=20behavior=20while=20importing=20query=20favorites=20-=20now?= =?UTF-8?q?=20they=20will=20append=20at=20the=20list=20(not=20inserted=20a?= =?UTF-8?q?fter=20selected=20row=20-=20makes=20more=20sense)=20=E2=80=A2?= =?UTF-8?q?=20introduced=20to=20history=20filter=20dict=20the=20key=20'men?= =?UTF-8?q?uLabel'=20which=20will=20be=20set=20to=20[TableContent=20tableF?= =?UTF-8?q?ilterString]=20for=20displaying=20the=20history=20menu=20title?= =?UTF-8?q?=20and=20simplified=20the=20SPHistoryController=20logic=20for?= =?UTF-8?q?=20that=20=E2=80=A2=20minor=20code=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPHistoryController.m | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'Source/SPHistoryController.m') diff --git a/Source/SPHistoryController.m b/Source/SPHistoryController.m index 9277a64b..8dc716fc 100644 --- a/Source/SPHistoryController.m +++ b/Source/SPHistoryController.m @@ -396,26 +396,9 @@ NSDictionary *filterSettings = [theEntry objectForKey:@"contentFilter"]; if (![filterSettings objectForKey:@"filterField"]) return theName; - if ([[filterSettings objectForKey:@"filterComparison"] isEqualToString:@"IS NULL"] - || [[filterSettings objectForKey:@"filterComparison"] isEqualToString:@"IS NOT NULL"]) - { - [theName appendFormat:@" (%@ %@ %@)", NSLocalizedString(@"Filtered by", @"History item filtered by label"), - [filterSettings objectForKey:@"filterField"], [filterSettings objectForKey:@"filterComparison"]]; - } else if ([[filterSettings objectForKey:@"filterComparison"] isEqualToString:@"BETWEEN"] - && [filterSettings objectForKey:@"firstBetweenField"] - && [[filterSettings objectForKey:@"secondBetweenField"] length] - && [filterSettings objectForKey:@"firstBetweenField"] - && [[filterSettings objectForKey:@"secondBetweenField"] length]) - { - [theName appendFormat:NSLocalizedString(@" (Filtered by %@ between %@ and %@)", @"History item filtered between values label"), - [filterSettings objectForKey:@"filterField"], - [filterSettings objectForKey:@"firstBetweenField"], - [filterSettings objectForKey:@"secondBetweenField"]]; - } else if ([filterSettings objectForKey:@"filterValue"] && [[filterSettings objectForKey:@"filterValue"] length]) { - [theName appendFormat:@" (%@ %@ %@ %@)", NSLocalizedString(@"Filtered by", @"History item filtered by label"), - [filterSettings objectForKey:@"filterField"], [filterSettings objectForKey:@"filterComparison"], - [filterSettings objectForKey:@"filterValue"]]; - } + if([filterSettings objectForKey:@"menuLabel"]) + return [NSString stringWithFormat:NSLocalizedString(@"%@ (Filtered by %@)", @"History item filtered by values label"), + theName, [filterSettings objectForKey:@"menuLabel"]]; return theName; } -- cgit v1.2.3