changedirtohome.patch (2,856 bytes)
Index: language/doublecmd.es.po
===================================================================
--- language/doublecmd.es.po (revision 5149)
+++ language/doublecmd.es.po (working copy)
@@ -2377,6 +2377,10 @@
msgid "Change directory to root"
msgstr "Cambiar a la carpeta raĆz"
+#: tfrmmain.actchangedirtohome.caption
+msgid "Change directory to root"
+msgstr "Cambiar a la carpeta de usuario"
+
#: tfrmmain.actchecksumcalc.caption
msgctxt "TFRMMAIN.ACTCHECKSUMCALC.CAPTION"
msgid "Calculate Check&sum..."
Index: src/fmain.lfm
===================================================================
--- src/fmain.lfm (revision 5149)
+++ src/fmain.lfm (working copy)
@@ -1698,6 +1698,11 @@
Caption = 'Change directory to root'
OnExecute = actExecute
end
+ object actChangeDirToHome: TAction
+ Category = 'Commands'
+ Caption = 'Change directory to home'
+ OnExecute = actExecute
+ end
object actCountDirContent: TAction
Category = 'Commands'
Caption = 'Sho&w Occupied Space'
Index: src/uglobs.pas
===================================================================
--- src/uglobs.pas (revision 5149)
+++ src/uglobs.pas (working copy)
@@ -93,7 +93,7 @@
const
{ Default hotkey list version number }
- hkVersion = 16;
+ hkVersion = 17;
// Previously existing names if reused must check for ConfigVersion >= X.
// History:
@@ -615,6 +615,7 @@
AddIfNotExists(['Ctrl+Tab'],[],'cm_NextTab');
AddIfNotExists(['Ctrl+Up'],[],'cm_OpenDirInNewTab');
AddIfNotExists(['Ctrl+\'],[],'cm_ChangeDirToRoot');
+ AddIfNotExists(['Ctrl+Home'],[],'cm_ChangeDirToHome');
AddIfNotExists(['Ctrl+.'],[],'cm_ShowSysFiles');
AddIfNotExists(['Shift+F2'],[],'cm_FocusCmdLine');
AddIfNotExists(['Shift+F4'],[],'cm_EditNew');
Index: src/umaincommands.pas
===================================================================
--- src/umaincommands.pas (revision 5149)
+++ src/umaincommands.pas (working copy)
@@ -204,6 +204,7 @@
procedure cm_CutToClipboard(const Params: array of string);
procedure cm_PasteFromClipboard(const Params: array of string);
procedure cm_ChangeDirToRoot(const Params: array of string);
+ procedure cm_ChangeDirToHome(const Params: array of string);
procedure cm_ChangeDirToParent(const Params: array of string);
procedure cm_ChangeDir(const Params: array of string);
procedure cm_ClearLogWindow(const Params: array of string);
@@ -2795,6 +2796,14 @@
end;
end;
+procedure TMainCommands.cm_ChangeDirToHome(const Params: array of string);
+begin
+ with frmMain.ActiveFrame do
+ begin
+ CurrentPath := GetHomeDir;
+ end;
+end;
+
procedure TMainCommands.cm_ChangeDirToParent(const Params: array of string);
begin
frmMain.ActiveFrame.ChangePathToParent(True);