summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-09-24 10:13:30 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-09-24 10:13:30 +0200
commit4e24fb845acd4a1fc6a772749eceb08129acaf08 (patch)
tree7ef84f3c0157b9a2d17374e2a4750a85cef4ec56
parent71294c99aa628f487d2094c101ecdf1ea829b3e1 (diff)
downloadtuxcmd-4e24fb845acd4a1fc6a772749eceb08129acaf08.tar.xz
Remember relative path checkbox state from the symlink dialog
-rw-r--r--UConfig.pas6
-rw-r--r--UCore.pas2
2 files changed, 7 insertions, 1 deletions
diff --git a/UConfig.pas b/UConfig.pas
index 760d811..01a47d8 100644
--- a/UConfig.pas
+++ b/UConfig.pas
@@ -102,7 +102,8 @@ var ConfPanelSep, ConfRowHeight, ConfRowHeightReal, ConfNumHistoryItems,
ConfDisableFileTips, ConfInsMoveDown, ConfSpaceMovesDown, ConfShowFuncButtons, ConfSelectAllDirs, ConfOctalPerm: boolean;
ConfMounterUseFSTab, ConfShowTextUIDs, ConfMounterPushDown, ConfSavePanelTabs, ConfDuplicateTabWarning,
ConfOpenConnectionsWarning, ConfSortDirectoriesLikeFiles, ConfQuickRenameSkipExt, ConfRightClickSelect,
- ConfSearchFilterCaseSensitive, ConfSearchOtherFS, ConfSearchArchives, ConfSearchTextCaseSensitive: boolean;
+ ConfSearchFilterCaseSensitive, ConfSearchOtherFS, ConfSearchArchives, ConfSearchTextCaseSensitive,
+ ConfMakeSymlinkRelative: boolean;
ConfShowMounterBar: integer;
ConfColumnSizes, ConfColumnIDs: array[1..ConstNumPanelColumns] of integer;
@@ -269,6 +270,7 @@ begin
ConfSearchOtherFS := False;
ConfSearchArchives := False;
ConfSearchTextCaseSensitive := False;
+ ConfMakeSymlinkRelative := False;
// Setup default values for colors
@@ -351,6 +353,7 @@ begin
ConfSearchOtherFS := IniFile.ReadBool(ConfProfileName, 'SearchOtherFS', ConfSearchOtherFS);
ConfSearchArchives := IniFile.ReadBool(ConfProfileName, 'SearchArchives', ConfSearchArchives);
ConfSearchTextCaseSensitive := IniFile.ReadBool(ConfProfileName, 'SearchTextCaseSensitive', ConfSearchTextCaseSensitive);
+ ConfMakeSymlinkRelative := IniFile.ReadBool(ConfProfileName, 'MakeSymlinkRelative', ConfMakeSymlinkRelative);
finally
try IniFile.Free; except end;
@@ -417,6 +420,7 @@ begin
IniFile.WriteBool(ConfProfileName, 'SearchOtherFS', ConfSearchOtherFS);
IniFile.WriteBool(ConfProfileName, 'SearchArchives', ConfSearchArchives);
IniFile.WriteBool(ConfProfileName, 'SearchTextCaseSensitive', ConfSearchTextCaseSensitive);
+ IniFile.WriteBool(ConfProfileName, 'MakeSymlinkRelative', ConfMakeSymlinkRelative);
except
on E: Exception do DebugMsg(['*** Error: Cannot save user settings (', E.ClassName, '): ', E.Message]);
diff --git a/UCore.pas b/UCore.pas
index 416bd45..deccbb1 100644
--- a/UCore.pas
+++ b/UCore.pas
@@ -2192,8 +2192,10 @@ begin
AFSymlink.ToEntry.Text := StrToUTF8(PossibleNewName);
AFSymlink.ToEntry.SetFocus;
AFSymlink.ToEntry.SelectAll;
+ AFSymLink.RelativeCheckButton.Checked := ConfMakeSymlinkRelative;
if AFSymlink.Run = mbOK then Result := HandleCreateSymlink(UTF8ToStr(AFSymlink.FromEntry.Text),
ProcessPattern(Engine, UTF8ToStr(AFSymlink.ToEntry.Text), Engine.Path, '', False));
+ if Result then ConfMakeSymlinkRelative := AFSymLink.RelativeCheckButton.Checked;
finally
AFSymlink.Free;
end;