From 96a94aab31ae3e829d32dc47369064c2aa4f87ef Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 3 Apr 2007 14:24:09 +0000 Subject: [PATCH] Monotone-Parent: e45b2b02d2644ca45f53476d13a648ca71e4e361 Monotone-Revision: 212e168bc4d90ac245e14acdb1fa02cd21689ca4 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-04-03T14:24:09 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++ .../English.lproj/Localizable.strings | 2 +- UI/Scheduler/French.lproj/Localizable.strings | 2 +- UI/Scheduler/UIxCalTasksListView.h | 4 +-- UI/Scheduler/UIxCalTasksListView.m | 28 +++++++++---------- .../SchedulerUI/UIxCalTasksListView.wox | 6 ++-- UI/WebServerResources/SchedulerUI.js | 8 +++--- 7 files changed, 32 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac1ae32f3..49f303d4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-04-03 Wolfgang Sourdeau + + * UI/Scheduler/UIxCalTasksListView.m ([UIxCalTasksListView + -shouldDisplayCurrentTask]): the current task is not displayed if + it is NOT completed or if the "showCompletedTasks" flag is set. + The logic was inverted in Lightning and is now in SOGo too. + 2007-04-02 Wolfgang Sourdeau * UI/Contacts/UIxContactView.m ([UIxContactView -workUrl]): we diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index aa881ef13..4d51efadb 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -314,7 +314,7 @@ validate_invalid_enddate = "Incorrect enddate field!"; validate_endbeforestart = "Enddate is before startdate!"; "Tasks" = "Tasks"; -"Hide completed tasks" = "Hide completed tasks"; +"Show completed tasks" = "Show completed tasks"; /* tabs */ "Task" = "Task"; diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index 37002e785..b71756444 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -315,7 +315,7 @@ validate_invalid_enddate = "La date de fin est invalide !"; validate_endbeforestart = "La date de fin est avant la date de début !"; "Tasks" = "Tâches"; -"Hide completed tasks" = "Masquer les tâches accomplies"; +"Show completed tasks" = "Afficher les tâches accomplies"; /* tabs */ "Task" = "Tâche"; diff --git a/UI/Scheduler/UIxCalTasksListView.h b/UI/Scheduler/UIxCalTasksListView.h index dd1ab3fd8..5cdc7f84d 100644 --- a/UI/Scheduler/UIxCalTasksListView.h +++ b/UI/Scheduler/UIxCalTasksListView.h @@ -32,8 +32,8 @@ NSCalendarDate *startDate; NSCalendarDate *endDate; - BOOL knowsToHide; - BOOL hideCompleted; + BOOL knowsToShow; + BOOL showCompleted; NSDictionary *currentTask; } diff --git a/UI/Scheduler/UIxCalTasksListView.m b/UI/Scheduler/UIxCalTasksListView.m index a939a76f8..349cee29c 100644 --- a/UI/Scheduler/UIxCalTasksListView.m +++ b/UI/Scheduler/UIxCalTasksListView.m @@ -39,8 +39,8 @@ { startDate = nil; endDate = nil; - knowsToHide = NO; - hideCompleted = NO; + knowsToShow = NO; + showCompleted = NO; } return self; @@ -105,27 +105,27 @@ - (BOOL) shouldDisplayCurrentTask { - if (!knowsToHide) + if (!knowsToShow) { - hideCompleted - = [[self queryParameterForKey: @"hide-completed"] intValue]; - knowsToHide = YES; + showCompleted + = [[self queryParameterForKey: @"show-completed"] intValue]; + knowsToShow = YES; } - return !(hideCompleted - && [[currentTask objectForKey: @"status"] intValue] == 1); + return ([[currentTask objectForKey: @"status"] intValue] != 1 + || showCompleted); } -- (BOOL) shouldHideCompletedTasks +- (BOOL) shouldShowCompletedTasks { - if (!knowsToHide) + if (!knowsToShow) { - hideCompleted - = [[self queryParameterForKey: @"hide-completed"] intValue]; - knowsToHide = YES; + showCompleted + = [[self queryParameterForKey: @"show-completed"] intValue]; + knowsToShow = YES; } - return hideCompleted; + return showCompleted; } - (BOOL) isCurrentTaskCompleted diff --git a/UI/Templates/SchedulerUI/UIxCalTasksListView.wox b/UI/Templates/SchedulerUI/UIxCalTasksListView.wox index 37853c907..2ec74999b 100644 --- a/UI/Templates/SchedulerUI/UIxCalTasksListView.wox +++ b/UI/Templates/SchedulerUI/UIxCalTasksListView.wox @@ -7,10 +7,10 @@ xmlns:label="OGo:label">