Skip to content

Commit

Permalink
v2.2.7 (#12)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Date:   Sat Nov 19 11:13:53 2022 +0100

    Update uGlobal.pas

commit a8e8adf
Author: maurizuki <[email protected]>
Date:   Sat Nov 19 11:13:50 2022 +0100

    Update uiCalendarExport.pas

commit 66877b0
Author: maurizuki <[email protected]>
Date:   Thu Nov 17 18:57:36 2022 +0100

    Update uiCalendarExport.pas

commit 9d95757
Author: maurizuki <[email protected]>
Date:   Wed Nov 16 20:00:40 2022 +0100

    Update uiCalendarExport.pas

commit fa73b9c
Author: maurizuki <[email protected]>
Date:   Mon Nov 14 19:39:18 2022 +0100

    Update uiCalendarExport.pas

commit b7b3ea3
Author: maurizuki <[email protected]>
Date:   Mon Nov 14 19:39:09 2022 +0100

    GetFirstEvent

commit 929399d
Author: maurizuki <[email protected]>
Date:   Fri Nov 11 15:27:10 2022 +0100

    TiCalendarExport

commit 78e5275
Author: maurizuki <[email protected]>
Date:   Fri Nov 11 14:39:20 2022 +0100

    Refactoring

commit 8d2d870
Author: maurizuki <[email protected]>
Date:   Thu Nov 10 20:01:00 2022 +0100

    Added uiCalImportExport.pas

commit 5294594
Author: maurizuki <[email protected]>
Date:   Thu Nov 10 19:59:47 2022 +0100

    Removed import/export code from main

* Update localizations

* Code review

* v2.2.7
  • Loading branch information
maurizuki authored Nov 29, 2022
1 parent 5171079 commit 3d7b4d0
Show file tree
Hide file tree
Showing 49 changed files with 24,599 additions and 10,039 deletions.
24 changes: 5 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ winget install --id=maurizuki.O2 -e

## Change log

### Version 2.2.7
- 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.
- In the *Rule properties* dialog, *Date format* tab, the text field *Date format* has been replaced with a more friendly drop-down list.
- *Help* menu rationalization.

### Version 2.2.6
- Fixed: multiple consecutive white spaces in notes are not preserved during export to HTML.
- Minor improvements.
Expand Down Expand Up @@ -57,25 +62,6 @@ winget install --id=maurizuki.O2 -e
- Added the new feature *Replace role* to the objects menu: replaces the role of the selected objects in their relations.
- Minor bug fixes and improvements.

### Version 2.1.2
- Added accelerator characters to almost all the labels to navigate trough their associated input controls more quickly.
- Object properties dialog, fields editor: added the buttons *Move up* and *Move down* to replace the unhandy popup menu.
- Rule properties dialog: added a box with an explanation of valid field name mask and field value mask composition.
- Rule properties dialog: added the name of the rule to the window title to keep it always visible.
- Rule properties dialog (italian translation): translated the color names for the color boxes in the highlight tab.
- Minor visual improvements.

### Version 2.1.1
- Added a drop-down menu to the *Find* button to add the new feature *Clear search*.
- Added the *Find by rule* search option that search for objects with at least one field matching one of the selected rules.
- The columns of all the views are now resized automatically to fit the whole available width.
- Main window, rules view: improved the behavior of the functions *Move up* and *Move down*, now the item remains visible while it is moved.
- 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.
- Minor bug fixes and code improvements.

### Version 2.1
- 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.

## Acknowledgements

The development and deployment of O2 were made possible thanks to the following tools:
Expand Down
Binary file modified setup/ReadMe.rtf
Binary file not shown.
4 changes: 2 additions & 2 deletions sf_net/upd8r.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<AppVersion>
<MajorVersion>2</MajorVersion>
<MinorVersion>2</MinorVersion>
<Release>6</Release>
<Build>482</Build>
<Release>7</Release>
<Build>488</Build>
</AppVersion>
<DownloadURL>https://github.com/maurizuki/O2/releases/latest</DownloadURL>
</Update>
28 changes: 19 additions & 9 deletions src/Library/uO2Rules.pas
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ TO2Rule = class(TO2CollectionItem)
function GetHyperLink(const AField: TO2Field): string;
function CheckEvents(const AField: TO2Field; Date1,
Date2: TDateTime; UseParams: Boolean = False): Boolean;
function GetFirstEvent(const AField: TO2Field;
out FirstDate: TDateTime): Boolean;
function GetNextEvent(const AField: TO2Field; StartDate: TDateTime;
out NextDate: TDateTime; UseParams: Boolean = False): Boolean;
function GetHighlightColors(const AField: TO2Field;
Expand Down Expand Up @@ -528,27 +530,35 @@ function TO2Rule.CheckEvents(const AField: TO2Field; Date1,
end;
end;

function TO2Rule.GetFirstEvent(const AField: TO2Field;
out FirstDate: TDateTime): Boolean;
begin
Result := (RuleType in EventRules) and Matches(AField)
and TryStrToDate(AField.FieldValue, FirstDate, GetFormatSettings);
end;

function TO2Rule.GetNextEvent(const AField: TO2Field; StartDate: TDateTime;
out NextDate: TDateTime; UseParams: Boolean): Boolean;
var
DateValue: TDateTime;
FirstDate: TDateTime;
begin
Result := False;
if (RuleType in EventRules) and Matches(AField)
and TryStrToDate(AField.FieldValue, DateValue, GetFormatSettings) then
if GetFirstEvent(AField, FirstDate) then
begin
if UseParams then
StartDate := Date - Params.IntValue(DaysBeforeParam, DefaultDaysBefore);

case RuleType of
rtExpirationDate:
NextDate := DateValue;
NextDate := FirstDate;

rtRecurrence:
begin
NextDate := SafeRecodeYear(DateValue, YearOf(StartDate));
if UseParams then
StartDate := Date - Params.IntValue(DaysBeforeParam,
DefaultDaysBefore);

NextDate := SafeRecodeYear(FirstDate, YearOf(StartDate));

if NextDate < StartDate then
NextDate := SafeRecodeYear(DateValue, YearOf(IncYear(StartDate)));
NextDate := SafeRecodeYear(FirstDate, YearOf(IncYear(StartDate)));
end;
end;

Expand Down
94 changes: 50 additions & 44 deletions src/O2/ENU/o2_DRC.rc
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,51 @@
resources were bound to the produced executable.
*/

#define uRulePropsDlg_SMaskHelp16 64400
#define Vcl_OleConst_SBadPropValue 64401
#define Vcl_OleConst_SCannotActivate 64402
#define Vcl_OleConst_SNoWindowHandle 64403
#define Vcl_OleConst_SInvalidLicense 64404
#define Vcl_OleConst_SNotLicensed 64405
#define Vcl_OleConst_sNoRunningObject 64406
#define Vcl_EdgeConst_SWebViewFailure 64407
#define Vcl_EdgeConst_SNoWebView 64408
#define IEConst_sNotSupportedByEdge 64409
#define Data_DBConsts_SInvalidSqlTimeStamp 64416
#define uRulePropsDlg_SMaskHelp01 64417
#define uRulePropsDlg_SMaskHelp02 64418
#define uRulePropsDlg_SMaskHelp03 64419
#define uRulePropsDlg_SMaskHelp04 64420
#define uRulePropsDlg_SMaskHelp05 64421
#define uRulePropsDlg_SMaskHelp06 64422
#define uRulePropsDlg_SMaskHelp07 64423
#define uRulePropsDlg_SMaskHelp08 64424
#define uRulePropsDlg_SMaskHelp09 64425
#define uRulePropsDlg_SMaskHelp10 64426
#define uRulePropsDlg_SMaskHelp11 64427
#define uRulePropsDlg_SMaskHelp12 64428
#define uRulePropsDlg_SMaskHelp13 64429
#define uRulePropsDlg_SMaskHelp14 64430
#define uRulePropsDlg_SMaskHelp15 64431
#define uRulePropsDlg_SMaskHelp13 64400
#define uRulePropsDlg_SMaskHelp14 64401
#define uRulePropsDlg_SMaskHelp15 64402
#define uRulePropsDlg_SMaskHelp16 64403
#define Vcl_OleConst_SBadPropValue 64404
#define Vcl_OleConst_SCannotActivate 64405
#define Vcl_OleConst_SNoWindowHandle 64406
#define Vcl_OleConst_SInvalidLicense 64407
#define Vcl_OleConst_SNotLicensed 64408
#define Vcl_OleConst_sNoRunningObject 64409
#define Vcl_EdgeConst_SWebViewFailure 64410
#define Vcl_EdgeConst_SNoWebView 64411
#define IEConst_sNotSupportedByEdge 64412
#define Data_DBConsts_SBcdOverflow 64416
#define Data_DBConsts_SInvalidBcdValue 64417
#define Data_DBConsts_SCouldNotParseTimeStamp 64418
#define Data_DBConsts_SInvalidSqlTimeStamp 64419
#define uRulePropsDlg_SMaskHelp01 64420
#define uRulePropsDlg_SMaskHelp02 64421
#define uRulePropsDlg_SMaskHelp03 64422
#define uRulePropsDlg_SMaskHelp04 64423
#define uRulePropsDlg_SMaskHelp05 64424
#define uRulePropsDlg_SMaskHelp06 64425
#define uRulePropsDlg_SMaskHelp07 64426
#define uRulePropsDlg_SMaskHelp08 64427
#define uRulePropsDlg_SMaskHelp09 64428
#define uRulePropsDlg_SMaskHelp10 64429
#define uRulePropsDlg_SMaskHelp11 64430
#define uRulePropsDlg_SMaskHelp12 64431
#define uGlobal_SEventNext30days 64432
#define uGlobal_SEventNext60days 64433
#define uGlobal_SEventNext90days 64434
#define uGlobal_SEventNext180days 64435
#define uGlobal_SEventNext365days 64436
#define System_RegularExpressionsConsts_SRegExMissingExpression 64437
#define System_RegularExpressionsConsts_SRegExExpressionError 64438
#define System_RegularExpressionsConsts_SRegExStudyError 64439
#define System_RegularExpressionsConsts_SRegExMatchRequired 64440
#define System_RegularExpressionsConsts_SRegExStringsRequired 64441
#define System_RegularExpressionsConsts_SRegExInvalidIndexType 64442
#define System_RegularExpressionsConsts_SRegExIndexOutOfBounds 64443
#define System_RegularExpressionsConsts_SRegExInvalidGroupName 64444
#define Data_DBConsts_SBcdOverflow 64445
#define Data_DBConsts_SInvalidBcdValue 64446
#define Data_DBConsts_SCouldNotParseTimeStamp 64447
#define uGlobal_SYMD 64437
#define uGlobal_SMDY 64438
#define uGlobal_SDMY 64439
#define System_RegularExpressionsConsts_SRegExMissingExpression 64440
#define System_RegularExpressionsConsts_SRegExExpressionError 64441
#define System_RegularExpressionsConsts_SRegExStudyError 64442
#define System_RegularExpressionsConsts_SRegExMatchRequired 64443
#define System_RegularExpressionsConsts_SRegExStringsRequired 64444
#define System_RegularExpressionsConsts_SRegExInvalidIndexType 64445
#define System_RegularExpressionsConsts_SRegExIndexOutOfBounds 64446
#define System_RegularExpressionsConsts_SRegExInvalidGroupName 64447
#define uGlobal_SRuleHyperLink 64448
#define uGlobal_SRuleEmail 64449
#define uGlobal_SRulePassword 64450
Expand Down Expand Up @@ -1140,6 +1143,9 @@
#define System_SysConst_STooManyOpenFiles 65535
STRINGTABLE
BEGIN
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."
uRulePropsDlg_SMaskHelp14, L"Wildcards are asterisks (*) or question marks (?)."
uRulePropsDlg_SMaskHelp15, L"An asterisk matches any number of characters."
uRulePropsDlg_SMaskHelp16, L"A question mark matches a single arbitrary character."
Vcl_OleConst_SBadPropValue, L"'%s' is not a valid property value"
Vcl_OleConst_SCannotActivate, L"OLE control activation failed"
Expand All @@ -1150,6 +1156,9 @@ BEGIN
Vcl_EdgeConst_SWebViewFailure, L"Failed to create Edge browser control"
Vcl_EdgeConst_SNoWebView, L"The underlying WebView2 control is not initialized"
IEConst_sNotSupportedByEdge, L"Operation not supported by Edge WebView2 control"
Data_DBConsts_SBcdOverflow, L"BCD overflow"
Data_DBConsts_SInvalidBcdValue, L"%s is not a valid BCD value"
Data_DBConsts_SCouldNotParseTimeStamp, L"Could not parse SQL TimeStamp string"
Data_DBConsts_SInvalidSqlTimeStamp, L"Invalid SQL date/time values"
uRulePropsDlg_SMaskHelp01, L"Valid field name mask and field value mask consist of literal characters, sets, and wildcards."
uRulePropsDlg_SMaskHelp02, L"Each literal character must match a single character in the field name or value."
Expand All @@ -1163,14 +1172,14 @@ BEGIN
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."
uRulePropsDlg_SMaskHelp11, L"A character is in a range if it matches the initial value, the final value, or falls between the two values."
uRulePropsDlg_SMaskHelp12, L"All comparisons are case-insensitive."
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."
uRulePropsDlg_SMaskHelp14, L"Wildcards are asterisks (*) or question marks (?)."
uRulePropsDlg_SMaskHelp15, L"An asterisk matches any number of characters."
uGlobal_SEventNext30days, L"Next 30 days"
uGlobal_SEventNext60days, L"Next 60 days"
uGlobal_SEventNext90days, L"Next 90 days"
uGlobal_SEventNext180days, L"Next 180 days"
uGlobal_SEventNext365days, L"Next 365 days"
uGlobal_SYMD, L"Year, month, day"
uGlobal_SMDY, L"Month, day, year"
uGlobal_SDMY, L"Day, month, year"
System_RegularExpressionsConsts_SRegExMissingExpression, L"A regular expression specified in RegEx is required"
System_RegularExpressionsConsts_SRegExExpressionError, L"Error in regular expression at offset %d: %s"
System_RegularExpressionsConsts_SRegExStudyError, L"Error studying the regex: %s"
Expand All @@ -1179,9 +1188,6 @@ BEGIN
System_RegularExpressionsConsts_SRegExInvalidIndexType, L"Invalid index type"
System_RegularExpressionsConsts_SRegExIndexOutOfBounds, L"Index out of bounds (%d)"
System_RegularExpressionsConsts_SRegExInvalidGroupName, L"Invalid group name (%s)"
Data_DBConsts_SBcdOverflow, L"BCD overflow"
Data_DBConsts_SInvalidBcdValue, L"%s is not a valid BCD value"
Data_DBConsts_SCouldNotParseTimeStamp, L"Could not parse SQL TimeStamp string"
uGlobal_SRuleHyperLink, L"Internet link"
uGlobal_SRuleEmail, L"E-mail address"
uGlobal_SRulePassword, L"Password"
Expand Down Expand Up @@ -1249,7 +1255,7 @@ BEGIN
uGlobal_SImportFileFilter, L"O2 file|*.o2|XML file|*.xml"
uGlobal_SImportSettingsFileFilter, L"O2 settings file|*.xml|Any file|*.*"
uGlobal_SSaveFileFilter, L"O2 file|*.o2|Any file|*.*"
uGlobal_SExportFileFilter, L"O2 file|*.o2|XML file|*.xml"
uGlobal_SExportFileFilter, L"O2 file|*.o2|XML file|*.xml|iCalendar file|*.ics"
uGlobal_SExportSettingsFileFilter, L"O2 settings file|*.xml|Any file|*.*"
uGlobal_SDeleteObjectsQuery, L"Delete selected objects?"
uGlobal_SRemoveFromMRUListQuery, L"File not found. Remove from the recent files list?"
Expand Down
38 changes: 33 additions & 5 deletions src/O2/ENU/o2_DRC.rcn
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<header>
<prop-group name="ITEHeaderProp">
<prop prop-type="Version">9.0</prop>
<prop prop-type="SelfDateTime">44632.816875</prop>
<prop prop-type="OrigDateTime">44632.816875</prop>
<prop prop-type="XlatDateTime">44614.7848611111</prop>
<prop prop-type="Translated">1130</prop>
<prop prop-type="SelfDateTime">44894.7503703704</prop>
<prop prop-type="OrigDateTime">44894.7503472222</prop>
<prop prop-type="XlatDateTime">44689.388587963</prop>
<prop prop-type="Translated">1133</prop>
<prop prop-type="UnTranslated">0</prop>
</prop-group>
</header>
Expand Down Expand Up @@ -490,11 +490,18 @@
</prop-group>
</trans-unit>
<trans-unit id="uGlobal_SExportFileFilter" resname="uGlobal_SExportFileFilter">
<source>"O2 file|*.o2|XML file|*.xml"</source>
<source>"O2 file|*.o2|XML file|*.xml|iCalendar file|*.ics"</source>
<prop-group name="ITEFieldProp">
<prop prop-type="Created">40178.744837419</prop>
<prop prop-type="Status">1</prop>
</prop-group>
<alt-trans>
<source>"O2 file|*.o2|XML file|*.xml"</source>
<target>"O2 file|*.o2|XML file|*.xml"</target>
<prop-group name="ITEFieldProp">
<prop prop-type="Modified">44884.437076331</prop>
</prop-group>
</alt-trans>
<alt-trans>
<source>"O2 file|*.o2|XML file|*.xml|HTML file (with index)|*.html;*.htm|HTML file (without index)|*.html;*.htm"</source>
<target>"O2 file|*.o2|XML file|*.xml|HTML file (with index)|*.html;*.htm|HTML file (without index)|*.html;*.htm"</target>
Expand Down Expand Up @@ -12131,6 +12138,27 @@
<prop prop-type="Status">1</prop>
</prop-group>
</trans-unit>
<trans-unit id="uGlobal_SYMD" resname="uGlobal_SYMD">
<source>"Year, month, day"</source>
<prop-group name="ITEFieldProp">
<prop prop-type="Created">44868.7587539699</prop>
<prop prop-type="Status">1</prop>
</prop-group>
</trans-unit>
<trans-unit id="uGlobal_SMDY" resname="uGlobal_SMDY">
<source>"Month, day, year"</source>
<prop-group name="ITEFieldProp">
<prop prop-type="Created">44868.7587539699</prop>
<prop prop-type="Status">1</prop>
</prop-group>
</trans-unit>
<trans-unit id="uGlobal_SDMY" resname="uGlobal_SDMY">
<source>"Day, month, year"</source>
<prop-group name="ITEFieldProp">
<prop prop-type="Created">44868.7587539699</prop>
<prop prop-type="Status">1</prop>
</prop-group>
</trans-unit>
</body>
</file>
</xliff>
Binary file modified src/O2/ENU/o2_DRC.res
Binary file not shown.
4 changes: 2 additions & 2 deletions src/O2/ENU/uAbout.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<header>
<prop-group name="ITEHeaderProp">
<prop prop-type="Version">9.0</prop>
<prop prop-type="SelfDateTime">44558.6433564815</prop>
<prop prop-type="OrigDateTime">44558.6366898148</prop>
<prop prop-type="SelfDateTime">44894.7514814815</prop>
<prop prop-type="OrigDateTime">44689.388587963</prop>
<prop prop-type="XlatDateTime">44201.6166898148</prop>
<prop prop-type="Translated">123</prop>
<prop prop-type="UnTranslated">0</prop>
Expand Down
Loading

0 comments on commit 3d7b4d0

Please sign in to comment.