summaryrefslogtreecommitdiff
path: root/UPreferences.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UPreferences.pas')
-rw-r--r--UPreferences.pas6
1 files changed, 4 insertions, 2 deletions
diff --git a/UPreferences.pas b/UPreferences.pas
index 90d5a5e..c289b7c 100644
--- a/UPreferences.pas
+++ b/UPreferences.pas
@@ -273,6 +273,7 @@ begin
CustomDateFormatEntry := TGTKEntry.Create(Self);
CustomDateFormatEntry.Enabled := False;
CustomDateFormatEntry.Tooltip := 'Enter custom date format string.'#10'Please see "man strftime" for syntax reference.';
+ CustomDateFormatEntry.OnChanged := DateTimeFormatOptionMenuChanged;
Table2.AddControlEx(2, 10, 2, 1, CustomDateFormatEntry, [taoShrink], [taoShrink], 10, 2);
TimeFormatLabel := TGTKLabel.Create(Self);
@@ -299,6 +300,7 @@ begin
CustomTimeFormatEntry := TGTKEntry.Create(Self);
CustomTimeFormatEntry.Enabled := False;
CustomTimeFormatEntry.Tooltip := 'Enter custom time format string.'#10'Please see "man strftime" for syntax reference.';
+ CustomTimeFormatEntry.OnChanged := DateTimeFormatOptionMenuChanged;
Table2.AddControlEx(2, 12, 2, 1, CustomTimeFormatEntry, [taoShrink], [taoShrink], 10, 2);
DateTimeFormatLabel := TGTKLabel.Create(Self);
@@ -681,10 +683,10 @@ begin
OldIndex := DateTimeFormatOptionMenu.ItemIndex;
DateTimeFormatOptionMenu.Items.Clear;
Item := TGTKMenuItem.CreateTyped(Self, itLabel);
- Item.Caption := FormatDate(FormatTime, True, True, TimeFormatOptionMenu.ItemIndex, DateFormatOptionMenu.ItemIndex, 0);
+ Item.Caption := FormatDate(FormatTime, True, True, TimeFormatOptionMenu.ItemIndex, DateFormatOptionMenu.ItemIndex, 0, CustomDateFormatEntry.Text, CustomTimeFormatEntry.Text);
DateTimeFormatOptionMenu.Items.Add(Item);
Item := TGTKMenuItem.CreateTyped(Self, itLabel);
- Item.Caption := FormatDate(FormatTime, True, True, TimeFormatOptionMenu.ItemIndex, DateFormatOptionMenu.ItemIndex, 1);
+ Item.Caption := FormatDate(FormatTime, True, True, TimeFormatOptionMenu.ItemIndex, DateFormatOptionMenu.ItemIndex, 1, CustomDateFormatEntry.Text, CustomTimeFormatEntry.Text);
DateTimeFormatOptionMenu.Items.Add(Item);
DateTimeFormatOptionMenu.ItemIndex := OldIndex;
end;