View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000627 | Double Commander | Logic | public | 2013-02-04 19:34 | 2014-10-26 18:16 |
Reporter | vitaliyg | Assigned To | Alexx2000 | ||
Priority | normal | Severity | tweak | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Projection | none | ETA | none | ||
Product Version | 0.6.0 (trunk) | ||||
Fixed in Version | 0.5.5 | ||||
Summary | 0000627: [PATCH] Open current dir in new tab if unable to open focused dir | ||||
Description | I like to use Ctrl+Up key when I need to open new tab. But when currently focused file is not a dir this command is ignored in DC (in TC it will always work and open focused dir, or current if there is no focused directory) Attached patch will update to TC like logic | ||||
Tags | No tags attached. | ||||
Attached Files | umaincommands.pas.patch (1,579 bytes)
Index: src/umaincommands.pas =================================================================== --- src/umaincommands.pas (revision 5094) +++ src/umaincommands.pas (working copy) @@ -733,27 +733,31 @@ end; procedure TMainCommands.cm_OpenDirInNewTab(const Params: array of string); + procedure OpenTab(const aFullPath: string); + var + NewPage: TFileViewPage; + begin + NewPage := FrmMain.ActiveNotebook.NewPage(FrmMain.ActiveFrame); + NewPage.FileView.CurrentPath := aFullPath; + if tb_open_new_in_foreground in gDirTabOptions then + NewPage.MakeActive; + end; + var - NewPage: TFileViewPage; aFile: TFile; begin - with FrmMain do - begin - aFile := ActiveFrame.CloneActiveFile; - if Assigned(aFile) then - try - if aFile.IsNameValid and - (aFile.IsDirectory or aFile.IsLinkToDirectory) then - begin - NewPage := ActiveNotebook.NewPage(ActiveFrame); - NewPage.FileView.CurrentPath := aFile.FullPath; - if tb_open_new_in_foreground in gDirTabOptions then - NewPage.MakeActive; - end; - finally - FreeAndNil(aFile); - end; - end; + aFile := FrmMain.ActiveFrame.CloneActiveFile; + if Assigned(aFile) then + try + if aFile.IsNameValid and (aFile.IsDirectory or aFile.IsLinkToDirectory) then + OpenTab(aFile.FullPath) + else + OpenTab(FrmMain.ActiveFrame.CurrentPath); + finally + FreeAndNil(aFile); + end + else + OpenTab(FrmMain.ActiveFrame.CurrentPath); end; procedure TMainCommands.cm_TargetEqualSource(const Params: array of string); | ||||
Fixed in Revision | |||||
Operating system | |||||
Widgetset | |||||
Architecture | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-04 19:34 | vitaliyg | New Issue | |
2013-02-04 19:34 | vitaliyg | File Added: umaincommands.pas.patch | |
2013-02-10 11:51 | Alexx2000 | Assigned To | => Alexx2000 |
2013-02-10 11:51 | Alexx2000 | Status | new => assigned |
2013-02-10 12:00 | Alexx2000 | Note Added: 0000999 | |
2013-02-10 12:00 | Alexx2000 | Status | assigned => resolved |
2013-02-10 12:00 | Alexx2000 | Fixed in Version | => 0.5.5 |
2013-02-10 12:00 | Alexx2000 | Resolution | open => fixed |
2014-10-26 18:16 | Alexx2000 | Status | resolved => closed |