diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-09 23:52:56 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-09 23:52:56 +0200 |
| commit | 47735c3d73cc677e519cd33b58232c97729596fa (patch) | |
| tree | 32b96f0388721dd63668cb159d05e6c934536268 /UConfig.pas | |
| parent | f9c7a5f62f96fab9ce5e3d2c205bc9da3046c4d4 (diff) | |
| download | tuxcmd-0.6.40.tar.xz | |
Date/time string formatting revisionv0.6.40
Added ability to set custom date/time format
Diffstat (limited to 'UConfig.pas')
| -rw-r--r-- | UConfig.pas | 25 |
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]); |
