Skip to content

Commit 3d7b4d0

Browse files
authored
v2.2.7 (#12)
* Drop-down list for date format for rules of type expiration date and recurrence * Update localizations * Squashed commit of the following: commit e2977b7 Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Sat Nov 19 11:13:53 2022 +0100 Update uGlobal.pas commit a8e8adf Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Sat Nov 19 11:13:50 2022 +0100 Update uiCalendarExport.pas commit 66877b0 Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Thu Nov 17 18:57:36 2022 +0100 Update uiCalendarExport.pas commit 9d95757 Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Wed Nov 16 20:00:40 2022 +0100 Update uiCalendarExport.pas commit fa73b9c Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Mon Nov 14 19:39:18 2022 +0100 Update uiCalendarExport.pas commit b7b3ea3 Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Mon Nov 14 19:39:09 2022 +0100 GetFirstEvent commit 929399d Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Fri Nov 11 15:27:10 2022 +0100 TiCalendarExport commit 78e5275 Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Fri Nov 11 14:39:20 2022 +0100 Refactoring commit 8d2d870 Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Thu Nov 10 20:01:00 2022 +0100 Added uiCalImportExport.pas commit 5294594 Author: maurizuki <62178459+maurizuki@users.noreply.github.com> Date: Thu Nov 10 19:59:47 2022 +0100 Removed import/export code from main * Update localizations * Code review * v2.2.7
1 parent 5171079 commit 3d7b4d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+24599
-10039
lines changed

README.md

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ winget install --id=maurizuki.O2 -e
2626

2727
## Change log
2828

29+
### Version 2.2.7
30+
- New feature: export events (fields that match rules of type *Expiration date* and *Recurrence*) in *iCalendar* format, compatible with Microsoft Outlook, Google Calendar, Apple Calendar, etc.
31+
- In the *Rule properties* dialog, *Date format* tab, the text field *Date format* has been replaced with a more friendly drop-down list.
32+
- *Help* menu rationalization.
33+
2934
### Version 2.2.6
3035
- Fixed: multiple consecutive white spaces in notes are not preserved during export to HTML.
3136
- Minor improvements.
@@ -57,25 +62,6 @@ winget install --id=maurizuki.O2 -e
5762
- Added the new feature *Replace role* to the objects menu: replaces the role of the selected objects in their relations.
5863
- Minor bug fixes and improvements.
5964

60-
### Version 2.1.2
61-
- Added accelerator characters to almost all the labels to navigate trough their associated input controls more quickly.
62-
- Object properties dialog, fields editor: added the buttons *Move up* and *Move down* to replace the unhandy popup menu.
63-
- Rule properties dialog: added a box with an explanation of valid field name mask and field value mask composition.
64-
- Rule properties dialog: added the name of the rule to the window title to keep it always visible.
65-
- Rule properties dialog (italian translation): translated the color names for the color boxes in the highlight tab.
66-
- Minor visual improvements.
67-
68-
### Version 2.1.1
69-
- Added a drop-down menu to the *Find* button to add the new feature *Clear search*.
70-
- Added the *Find by rule* search option that search for objects with at least one field matching one of the selected rules.
71-
- The columns of all the views are now resized automatically to fit the whole available width.
72-
- Main window, rules view: improved the behavior of the functions *Move up* and *Move down*, now the item remains visible while it is moved.
73-
- Object properties dialog, fields editor: improved the behavior of the functions *Move up* and *Move down*, now the item remains visible while it is moved. Improved also the behavior of the function *Delete*, now is automatically selected the next item after the deleted one to continue deleting in sequence.
74-
- Minor bug fixes and code improvements.
75-
76-
### Version 2.1
77-
- Main window redesigned, clearer and cleaner. Click *Find* (Ctrl+F) toolbar button to show or hide the search options box (formerly filters): find by name, event, tags.
78-
7965
## Acknowledgements
8066

8167
The development and deployment of O2 were made possible thanks to the following tools:

setup/ReadMe.rtf

-1.59 KB
Binary file not shown.

sf_net/upd8r.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<AppVersion>
66
<MajorVersion>2</MajorVersion>
77
<MinorVersion>2</MinorVersion>
8-
<Release>6</Release>
9-
<Build>482</Build>
8+
<Release>7</Release>
9+
<Build>488</Build>
1010
</AppVersion>
1111
<DownloadURL>https://github.com/maurizuki/O2/releases/latest</DownloadURL>
1212
</Update>

src/Library/uO2Rules.pas

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ TO2Rule = class(TO2CollectionItem)
156156
function GetHyperLink(const AField: TO2Field): string;
157157
function CheckEvents(const AField: TO2Field; Date1,
158158
Date2: TDateTime; UseParams: Boolean = False): Boolean;
159+
function GetFirstEvent(const AField: TO2Field;
160+
out FirstDate: TDateTime): Boolean;
159161
function GetNextEvent(const AField: TO2Field; StartDate: TDateTime;
160162
out NextDate: TDateTime; UseParams: Boolean = False): Boolean;
161163
function GetHighlightColors(const AField: TO2Field;
@@ -528,27 +530,35 @@ function TO2Rule.CheckEvents(const AField: TO2Field; Date1,
528530
end;
529531
end;
530532

533+
function TO2Rule.GetFirstEvent(const AField: TO2Field;
534+
out FirstDate: TDateTime): Boolean;
535+
begin
536+
Result := (RuleType in EventRules) and Matches(AField)
537+
and TryStrToDate(AField.FieldValue, FirstDate, GetFormatSettings);
538+
end;
539+
531540
function TO2Rule.GetNextEvent(const AField: TO2Field; StartDate: TDateTime;
532541
out NextDate: TDateTime; UseParams: Boolean): Boolean;
533542
var
534-
DateValue: TDateTime;
543+
FirstDate: TDateTime;
535544
begin
536545
Result := False;
537-
if (RuleType in EventRules) and Matches(AField)
538-
and TryStrToDate(AField.FieldValue, DateValue, GetFormatSettings) then
546+
if GetFirstEvent(AField, FirstDate) then
539547
begin
540-
if UseParams then
541-
StartDate := Date - Params.IntValue(DaysBeforeParam, DefaultDaysBefore);
542-
543548
case RuleType of
544549
rtExpirationDate:
545-
NextDate := DateValue;
550+
NextDate := FirstDate;
546551

547552
rtRecurrence:
548553
begin
549-
NextDate := SafeRecodeYear(DateValue, YearOf(StartDate));
554+
if UseParams then
555+
StartDate := Date - Params.IntValue(DaysBeforeParam,
556+
DefaultDaysBefore);
557+
558+
NextDate := SafeRecodeYear(FirstDate, YearOf(StartDate));
559+
550560
if NextDate < StartDate then
551-
NextDate := SafeRecodeYear(DateValue, YearOf(IncYear(StartDate)));
561+
NextDate := SafeRecodeYear(FirstDate, YearOf(IncYear(StartDate)));
552562
end;
553563
end;
554564

src/O2/ENU/o2_DRC.rc

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,51 @@
88
resources were bound to the produced executable.
99
*/
1010

11-
#define uRulePropsDlg_SMaskHelp16 64400
12-
#define Vcl_OleConst_SBadPropValue 64401
13-
#define Vcl_OleConst_SCannotActivate 64402
14-
#define Vcl_OleConst_SNoWindowHandle 64403
15-
#define Vcl_OleConst_SInvalidLicense 64404
16-
#define Vcl_OleConst_SNotLicensed 64405
17-
#define Vcl_OleConst_sNoRunningObject 64406
18-
#define Vcl_EdgeConst_SWebViewFailure 64407
19-
#define Vcl_EdgeConst_SNoWebView 64408
20-
#define IEConst_sNotSupportedByEdge 64409
21-
#define Data_DBConsts_SInvalidSqlTimeStamp 64416
22-
#define uRulePropsDlg_SMaskHelp01 64417
23-
#define uRulePropsDlg_SMaskHelp02 64418
24-
#define uRulePropsDlg_SMaskHelp03 64419
25-
#define uRulePropsDlg_SMaskHelp04 64420
26-
#define uRulePropsDlg_SMaskHelp05 64421
27-
#define uRulePropsDlg_SMaskHelp06 64422
28-
#define uRulePropsDlg_SMaskHelp07 64423
29-
#define uRulePropsDlg_SMaskHelp08 64424
30-
#define uRulePropsDlg_SMaskHelp09 64425
31-
#define uRulePropsDlg_SMaskHelp10 64426
32-
#define uRulePropsDlg_SMaskHelp11 64427
33-
#define uRulePropsDlg_SMaskHelp12 64428
34-
#define uRulePropsDlg_SMaskHelp13 64429
35-
#define uRulePropsDlg_SMaskHelp14 64430
36-
#define uRulePropsDlg_SMaskHelp15 64431
11+
#define uRulePropsDlg_SMaskHelp13 64400
12+
#define uRulePropsDlg_SMaskHelp14 64401
13+
#define uRulePropsDlg_SMaskHelp15 64402
14+
#define uRulePropsDlg_SMaskHelp16 64403
15+
#define Vcl_OleConst_SBadPropValue 64404
16+
#define Vcl_OleConst_SCannotActivate 64405
17+
#define Vcl_OleConst_SNoWindowHandle 64406
18+
#define Vcl_OleConst_SInvalidLicense 64407
19+
#define Vcl_OleConst_SNotLicensed 64408
20+
#define Vcl_OleConst_sNoRunningObject 64409
21+
#define Vcl_EdgeConst_SWebViewFailure 64410
22+
#define Vcl_EdgeConst_SNoWebView 64411
23+
#define IEConst_sNotSupportedByEdge 64412
24+
#define Data_DBConsts_SBcdOverflow 64416
25+
#define Data_DBConsts_SInvalidBcdValue 64417
26+
#define Data_DBConsts_SCouldNotParseTimeStamp 64418
27+
#define Data_DBConsts_SInvalidSqlTimeStamp 64419
28+
#define uRulePropsDlg_SMaskHelp01 64420
29+
#define uRulePropsDlg_SMaskHelp02 64421
30+
#define uRulePropsDlg_SMaskHelp03 64422
31+
#define uRulePropsDlg_SMaskHelp04 64423
32+
#define uRulePropsDlg_SMaskHelp05 64424
33+
#define uRulePropsDlg_SMaskHelp06 64425
34+
#define uRulePropsDlg_SMaskHelp07 64426
35+
#define uRulePropsDlg_SMaskHelp08 64427
36+
#define uRulePropsDlg_SMaskHelp09 64428
37+
#define uRulePropsDlg_SMaskHelp10 64429
38+
#define uRulePropsDlg_SMaskHelp11 64430
39+
#define uRulePropsDlg_SMaskHelp12 64431
3740
#define uGlobal_SEventNext30days 64432
3841
#define uGlobal_SEventNext60days 64433
3942
#define uGlobal_SEventNext90days 64434
4043
#define uGlobal_SEventNext180days 64435
4144
#define uGlobal_SEventNext365days 64436
42-
#define System_RegularExpressionsConsts_SRegExMissingExpression 64437
43-
#define System_RegularExpressionsConsts_SRegExExpressionError 64438
44-
#define System_RegularExpressionsConsts_SRegExStudyError 64439
45-
#define System_RegularExpressionsConsts_SRegExMatchRequired 64440
46-
#define System_RegularExpressionsConsts_SRegExStringsRequired 64441
47-
#define System_RegularExpressionsConsts_SRegExInvalidIndexType 64442
48-
#define System_RegularExpressionsConsts_SRegExIndexOutOfBounds 64443
49-
#define System_RegularExpressionsConsts_SRegExInvalidGroupName 64444
50-
#define Data_DBConsts_SBcdOverflow 64445
51-
#define Data_DBConsts_SInvalidBcdValue 64446
52-
#define Data_DBConsts_SCouldNotParseTimeStamp 64447
45+
#define uGlobal_SYMD 64437
46+
#define uGlobal_SMDY 64438
47+
#define uGlobal_SDMY 64439
48+
#define System_RegularExpressionsConsts_SRegExMissingExpression 64440
49+
#define System_RegularExpressionsConsts_SRegExExpressionError 64441
50+
#define System_RegularExpressionsConsts_SRegExStudyError 64442
51+
#define System_RegularExpressionsConsts_SRegExMatchRequired 64443
52+
#define System_RegularExpressionsConsts_SRegExStringsRequired 64444
53+
#define System_RegularExpressionsConsts_SRegExInvalidIndexType 64445
54+
#define System_RegularExpressionsConsts_SRegExIndexOutOfBounds 64446
55+
#define System_RegularExpressionsConsts_SRegExInvalidGroupName 64447
5356
#define uGlobal_SRuleHyperLink 64448
5457
#define uGlobal_SRuleEmail 64449
5558
#define uGlobal_SRulePassword 64450
@@ -1140,6 +1143,9 @@
11401143
#define System_SysConst_STooManyOpenFiles 65535
11411144
STRINGTABLE
11421145
BEGIN
1146+
uRulePropsDlg_SMaskHelp13, L"If the first character after the opening bracket of a set is an exclamation point (!), then the set matches any character that is not in the set."
1147+
uRulePropsDlg_SMaskHelp14, L"Wildcards are asterisks (*) or question marks (?)."
1148+
uRulePropsDlg_SMaskHelp15, L"An asterisk matches any number of characters."
11431149
uRulePropsDlg_SMaskHelp16, L"A question mark matches a single arbitrary character."
11441150
Vcl_OleConst_SBadPropValue, L"'%s' is not a valid property value"
11451151
Vcl_OleConst_SCannotActivate, L"OLE control activation failed"
@@ -1150,6 +1156,9 @@ BEGIN
11501156
Vcl_EdgeConst_SWebViewFailure, L"Failed to create Edge browser control"
11511157
Vcl_EdgeConst_SNoWebView, L"The underlying WebView2 control is not initialized"
11521158
IEConst_sNotSupportedByEdge, L"Operation not supported by Edge WebView2 control"
1159+
Data_DBConsts_SBcdOverflow, L"BCD overflow"
1160+
Data_DBConsts_SInvalidBcdValue, L"%s is not a valid BCD value"
1161+
Data_DBConsts_SCouldNotParseTimeStamp, L"Could not parse SQL TimeStamp string"
11531162
Data_DBConsts_SInvalidSqlTimeStamp, L"Invalid SQL date/time values"
11541163
uRulePropsDlg_SMaskHelp01, L"Valid field name mask and field value mask consist of literal characters, sets, and wildcards."
11551164
uRulePropsDlg_SMaskHelp02, L"Each literal character must match a single character in the field name or value."
@@ -1163,14 +1172,14 @@ BEGIN
11631172
uRulePropsDlg_SMaskHelp10, L"The character matches the set if it is the same as one of the literal characters in the set, or if it is in one of the ranges in the set."
11641173
uRulePropsDlg_SMaskHelp11, L"A character is in a range if it matches the initial value, the final value, or falls between the two values."
11651174
uRulePropsDlg_SMaskHelp12, L"All comparisons are case-insensitive."
1166-
uRulePropsDlg_SMaskHelp13, L"If the first character after the opening bracket of a set is an exclamation point (!), then the set matches any character that is not in the set."
1167-
uRulePropsDlg_SMaskHelp14, L"Wildcards are asterisks (*) or question marks (?)."
1168-
uRulePropsDlg_SMaskHelp15, L"An asterisk matches any number of characters."
11691175
uGlobal_SEventNext30days, L"Next 30 days"
11701176
uGlobal_SEventNext60days, L"Next 60 days"
11711177
uGlobal_SEventNext90days, L"Next 90 days"
11721178
uGlobal_SEventNext180days, L"Next 180 days"
11731179
uGlobal_SEventNext365days, L"Next 365 days"
1180+
uGlobal_SYMD, L"Year, month, day"
1181+
uGlobal_SMDY, L"Month, day, year"
1182+
uGlobal_SDMY, L"Day, month, year"
11741183
System_RegularExpressionsConsts_SRegExMissingExpression, L"A regular expression specified in RegEx is required"
11751184
System_RegularExpressionsConsts_SRegExExpressionError, L"Error in regular expression at offset %d: %s"
11761185
System_RegularExpressionsConsts_SRegExStudyError, L"Error studying the regex: %s"
@@ -1179,9 +1188,6 @@ BEGIN
11791188
System_RegularExpressionsConsts_SRegExInvalidIndexType, L"Invalid index type"
11801189
System_RegularExpressionsConsts_SRegExIndexOutOfBounds, L"Index out of bounds (%d)"
11811190
System_RegularExpressionsConsts_SRegExInvalidGroupName, L"Invalid group name (%s)"
1182-
Data_DBConsts_SBcdOverflow, L"BCD overflow"
1183-
Data_DBConsts_SInvalidBcdValue, L"%s is not a valid BCD value"
1184-
Data_DBConsts_SCouldNotParseTimeStamp, L"Could not parse SQL TimeStamp string"
11851191
uGlobal_SRuleHyperLink, L"Internet link"
11861192
uGlobal_SRuleEmail, L"E-mail address"
11871193
uGlobal_SRulePassword, L"Password"
@@ -1249,7 +1255,7 @@ BEGIN
12491255
uGlobal_SImportFileFilter, L"O2 file|*.o2|XML file|*.xml"
12501256
uGlobal_SImportSettingsFileFilter, L"O2 settings file|*.xml|Any file|*.*"
12511257
uGlobal_SSaveFileFilter, L"O2 file|*.o2|Any file|*.*"
1252-
uGlobal_SExportFileFilter, L"O2 file|*.o2|XML file|*.xml"
1258+
uGlobal_SExportFileFilter, L"O2 file|*.o2|XML file|*.xml|iCalendar file|*.ics"
12531259
uGlobal_SExportSettingsFileFilter, L"O2 settings file|*.xml|Any file|*.*"
12541260
uGlobal_SDeleteObjectsQuery, L"Delete selected objects?"
12551261
uGlobal_SRemoveFromMRUListQuery, L"File not found. Remove from the recent files list?"

src/O2/ENU/o2_DRC.rcn

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
<header>
66
<prop-group name="ITEHeaderProp">
77
<prop prop-type="Version">9.0</prop>
8-
<prop prop-type="SelfDateTime">44632.816875</prop>
9-
<prop prop-type="OrigDateTime">44632.816875</prop>
10-
<prop prop-type="XlatDateTime">44614.7848611111</prop>
11-
<prop prop-type="Translated">1130</prop>
8+
<prop prop-type="SelfDateTime">44894.7503703704</prop>
9+
<prop prop-type="OrigDateTime">44894.7503472222</prop>
10+
<prop prop-type="XlatDateTime">44689.388587963</prop>
11+
<prop prop-type="Translated">1133</prop>
1212
<prop prop-type="UnTranslated">0</prop>
1313
</prop-group>
1414
</header>
@@ -490,11 +490,18 @@
490490
</prop-group>
491491
</trans-unit>
492492
<trans-unit id="uGlobal_SExportFileFilter" resname="uGlobal_SExportFileFilter">
493-
<source>"O2 file|*.o2|XML file|*.xml"</source>
493+
<source>"O2 file|*.o2|XML file|*.xml|iCalendar file|*.ics"</source>
494494
<prop-group name="ITEFieldProp">
495495
<prop prop-type="Created">40178.744837419</prop>
496496
<prop prop-type="Status">1</prop>
497497
</prop-group>
498+
<alt-trans>
499+
<source>"O2 file|*.o2|XML file|*.xml"</source>
500+
<target>"O2 file|*.o2|XML file|*.xml"</target>
501+
<prop-group name="ITEFieldProp">
502+
<prop prop-type="Modified">44884.437076331</prop>
503+
</prop-group>
504+
</alt-trans>
498505
<alt-trans>
499506
<source>"O2 file|*.o2|XML file|*.xml|HTML file (with index)|*.html;*.htm|HTML file (without index)|*.html;*.htm"</source>
500507
<target>"O2 file|*.o2|XML file|*.xml|HTML file (with index)|*.html;*.htm|HTML file (without index)|*.html;*.htm"</target>
@@ -12131,6 +12138,27 @@
1213112138
<prop prop-type="Status">1</prop>
1213212139
</prop-group>
1213312140
</trans-unit>
12141+
<trans-unit id="uGlobal_SYMD" resname="uGlobal_SYMD">
12142+
<source>"Year, month, day"</source>
12143+
<prop-group name="ITEFieldProp">
12144+
<prop prop-type="Created">44868.7587539699</prop>
12145+
<prop prop-type="Status">1</prop>
12146+
</prop-group>
12147+
</trans-unit>
12148+
<trans-unit id="uGlobal_SMDY" resname="uGlobal_SMDY">
12149+
<source>"Month, day, year"</source>
12150+
<prop-group name="ITEFieldProp">
12151+
<prop prop-type="Created">44868.7587539699</prop>
12152+
<prop prop-type="Status">1</prop>
12153+
</prop-group>
12154+
</trans-unit>
12155+
<trans-unit id="uGlobal_SDMY" resname="uGlobal_SDMY">
12156+
<source>"Day, month, year"</source>
12157+
<prop-group name="ITEFieldProp">
12158+
<prop prop-type="Created">44868.7587539699</prop>
12159+
<prop prop-type="Status">1</prop>
12160+
</prop-group>
12161+
</trans-unit>
1213412162
</body>
1213512163
</file>
1213612164
</xliff>

src/O2/ENU/o2_DRC.res

140 Bytes
Binary file not shown.

src/O2/ENU/uAbout.dfn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<header>
66
<prop-group name="ITEHeaderProp">
77
<prop prop-type="Version">9.0</prop>
8-
<prop prop-type="SelfDateTime">44558.6433564815</prop>
9-
<prop prop-type="OrigDateTime">44558.6366898148</prop>
8+
<prop prop-type="SelfDateTime">44894.7514814815</prop>
9+
<prop prop-type="OrigDateTime">44689.388587963</prop>
1010
<prop prop-type="XlatDateTime">44201.6166898148</prop>
1111
<prop prop-type="Translated">123</prop>
1212
<prop prop-type="UnTranslated">0</prop>

0 commit comments

Comments
 (0)