summaryrefslogtreecommitdiff
path: root/UConfig.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UConfig.pas')
-rw-r--r--UConfig.pas25
1 files changed, 21 insertions, 4 deletions
diff --git a/UConfig.pas b/UConfig.pas
index 48cd1cf..08719d8 100644
--- a/UConfig.pas
+++ b/UConfig.pas
@@ -25,8 +25,8 @@ uses Classes, ULocale;
resourcestring
ConstAppTitle = 'Tux Commander';
- ConstAboutVersion = '0.6.39-dev';
- ConstAboutBuildDate = '2008-06-08';
+ ConstAboutVersion = '0.6.40-dev';
+ ConstAboutBuildDate = '2008-06-09';
{$IFDEF __FPC__}
{$INCLUDE fpcver.inc}
@@ -81,12 +81,12 @@ var ConfPanelSep, ConfRowHeight, ConfRowHeightReal, ConfNumHistoryItems,
ConfMainWindowLeftSortColumn, ConfMainWindowLeftSortType, ConfMainWindowRightSortColumn, ConfMainWindowRightSortType,
ConfSizeFormat, ConfSizeGroupPrecision, ConfCmdLineTerminalBehaviour, ConfViewerTerminalBehaviour,
ConfEditorTerminalBehaviour, ConfLeftTabBarTabIndex, ConfRightTabBarTabIndex, ConfSwitchOtherPanelBehaviour,
- ConfTabMaxLength: integer;
+ ConfTabMaxLength, ConfDateFormat, ConfTimeFormat, ConfDateTimeFormat: integer;
ConfLeftPath, ConfRightPath, ConfPanelFont, ConfProfileName, ConfViewer, ConfEditor, ConfTerminalCommand,
ConfNormalItemFGColor, ConfActiveItemFGColor, ConfInactiveItemFGColor, ConfSelectedItemFGColor, ConfLinkItemFGColor,
ConfDotFileItemFGColor, ConfNormalItemBGColor, ConfActiveItemBGColor, ConfInactiveItemBGColor,
- ParamLeftDir, ParamRightDir: string;
+ ParamLeftDir, ParamRightDir, ConfCustomDateFormat, ConfCustomTimeFormat: string;
ParamDebug, ConfShowDotFiles, ConfClearReadOnlyAttr, ConfDisableMouseRename, ConfUseSystemFont, ConfUseFileTypeIcons,
ConfFocusRefresh, ConfNewStyleAltO, ConfDirsInBold, ConfDisableDirectoryBrackets, ParamDisableGnome, ConfWMCompatMode,
@@ -237,6 +237,12 @@ begin
ConfTabMaxLength := 25;
ConfTempPath := '/tmp/tuxcmd';
ConfUseSmoothScrolling := False;
+ ConfDateFormat := 0;
+ ConfTimeFormat := 0;
+ ConfDateTimeFormat := 0;
+ ConfCustomDateFormat := '%x';
+ ConfCustomTimeFormat := '%X';
+
// Setup default values for colors
ConfNormalItemFGColor := ConfDefaultNormalItemFGColor;
@@ -453,6 +459,11 @@ begin
ConfTabMaxLength := IniFile.ReadInteger(ConfProfileName, 'TabMaxLength', ConfTabMaxLength);
ConfTempPath := IniFile.ReadString(ConfProfileName, 'TempPath', ConfTempPath);
ConfUseSmoothScrolling := IniFile.ReadBool(ConfProfileName, 'UseSmoothScrolling', ConfUseSmoothScrolling);
+ ConfDateFormat := IniFile.ReadInteger(ConfProfileName, 'DateFormat', ConfDateFormat);
+ ConfTimeFormat := IniFile.ReadInteger(ConfProfileName, 'TimeFormat', ConfTimeFormat);
+ ConfDateTimeFormat := IniFile.ReadInteger(ConfProfileName, 'DateTimeFormat', ConfDateTimeFormat);
+ ConfCustomDateFormat := IniFile.ReadString(ConfProfileName, 'CustomDateFormat', ConfCustomDateFormat);
+ ConfCustomTimeFormat := IniFile.ReadString(ConfProfileName, 'CustomTimeFormat', ConfCustomTimeFormat);
SearchForDefaultApps;
@@ -535,6 +546,12 @@ begin
IniFile.WriteInteger(ConfProfileName, 'TabMaxLength', ConfTabMaxLength);
IniFile.WriteString(ConfProfileName, 'TempPath', ConfTempPath);
IniFile.WriteBool(ConfProfileName, 'UseSmoothScrolling', ConfUseSmoothScrolling);
+ IniFile.WriteInteger(ConfProfileName, 'DateFormat', ConfDateFormat);
+ IniFile.WriteInteger(ConfProfileName, 'TimeFormat', ConfTimeFormat);
+ IniFile.WriteInteger(ConfProfileName, 'DateTimeFormat', ConfDateTimeFormat);
+ IniFile.WriteString(ConfProfileName, 'CustomDateFormat', ConfCustomDateFormat);
+ IniFile.WriteString(ConfProfileName, 'CustomTimeFormat', ConfCustomTimeFormat);
+
except
on E: Exception do DebugMsg(['*** Error: Cannot save user settings (', E.ClassName, '): ', E.Message]);