From a0f1e0e9db4b0edee45018c47a08761916af0ce6 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 7 Jun 2008 20:40:48 +0200 Subject: Revised UTF-8 filenames support --- UConfig.pas | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'UConfig.pas') diff --git a/UConfig.pas b/UConfig.pas index 68da691..b662f58 100644 --- a/UConfig.pas +++ b/UConfig.pas @@ -25,8 +25,8 @@ uses Classes, ULocale; resourcestring ConstAppTitle = 'Tux Commander'; - ConstAboutVersion = '0.6.36'; - ConstAboutBuildDate = '2008-06-01'; + ConstAboutVersion = '0.6.38-dev'; + ConstAboutBuildDate = '2008-06-07'; {$IFDEF __FPC__} {$INCLUDE fpcver.inc} @@ -663,21 +663,29 @@ end; (********************************************************************************************************************************) procedure ReadBookmarks; var s: string; + i: integer; begin try s := IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(GetHomePath) + ConfDefaultSettingsDir) + 'bookmarks'; Bookmarks.LoadFromFile(s); InternalBookmarksConfmtime := GetFileTime(s); + if Bookmarks.Count > 0 then + for i := Bookmarks.Count - 1 downto 0 do + if Length(Trim(Bookmarks[i])) = 0 then Bookmarks.Delete(i); except end; end; procedure WriteBookmarks; var s: string; + i: integer; begin if InternalQuickExit then Exit; try s := IncludeTrailingPathDelimiter(IncludeTrailingPathDelimiter(GetHomePath) + ConfDefaultSettingsDir) + 'bookmarks'; + if Bookmarks.Count > 0 then + for i := Bookmarks.Count - 1 downto 0 do + if Length(Trim(Bookmarks[i])) = 0 then Bookmarks.Delete(i); Bookmarks.SaveToFile(s); InternalBookmarksConfmtime := GetFileTime(s); except @@ -1042,7 +1050,7 @@ var i: integer; begin if ParamCount > 0 then for i := 1 to ParamCount do begin - s := AnsiUpperCase(ParamStr(i)); + s := UpperCase(ParamStr(i)); if s = '--DEBUG' then ParamDebug := True else if s = '--DISABLE-GNOME' then ParamDisableGnome := True else if s = '--DELETE-HISTORY' then InternalDeleteHistory := True else -- cgit v1.2.3