Symbolic Link, Hardlink and Junction creation is available via menu - #352
Conversation
95be265 to
3433415
Compare
Use F11 for Symlink
|
Chen (Kina) (@clzls) thank you for reviewing.
I should fix. FROM: TO: |
If you think '%s にファイルをリンク中' is a better Japanese then, please change it. |
|
No, I don't have any insights into JAPANBEGIN and JAPANEND. schinagl, related to an earlier question about the difference between the control afforded by the menus and that of the drag/drop: I was not thinking of adding another menu item, but would like to consider restricting the drag/drop case to match the menu case. That is, use the logic on line 788 of wfdlgs2.c in the drag/drop code, which would simplify the cases. |
|
Craig Wittenberg (@craigwims) please give a code snippet where you would like to place As mentioned above the idea in general is:
As of now WFMoveCopyDriverThread() is prepared to handle a fully filed out PCOPYINFO properly for the new FUNC_xxxx The 'menu coding' of this PR now also needs to out fill PCOPYINFO properly in wfdlgs2.c:788 Anyhow please give a code snippet on what you would like to change in detail, so I can give a better answer. |
|
Line 316 of wfdirsrc.c: instead of setting iShowBitmap to DROP_HARD unconditionally, set to DROP_JUNC when the source of the drag/drop is a directory. The case in treectl.c, line 2903 always uses DROP_JUNC since the source there is always a directory. |
|
I guess I got your point What I understoodYour concern starts in wfcopy.c:2776 and wfcopy:2810, because FUNC_HARD is used with oper == OPER_MKDIR
With the proposed change in wfdirsrc.c:316 to send FUNC_HARD or FUNC_JUNC according to the output of IsDirectory() the lines wfcopy.c:2776 and wfcopy:2810 could be deleted and thus would be more logical to an future developer. Discussion
So we must do this in wfcopy:3495. But here things also will not work because
So
ConclusioGive it a try in the compiler yourself, you will see this would not work. Or create lots of unneccessary effort. |
|
Doing a file system operation on each mouse move is not a good idea; agreed. Looking at this further, and reflecting on your comments, the difference between *_HARD and JUNC seems very, very small. Why do we have both since at the bottom they both call WFJunction() which does not take FUNC as a parameter? |
|
In most places we need a distinction
In general I also wanted to separate this for readability and debug-ability. The only place where it didn't work out, was wfcopy.c:2776 where a Junction disguises as FUNC_HARD, when it comes from the file-pane |
…k to', 'symlink from', 'symlink to'
|
Did my answers help? |
|
A refinement of my idea above: use the logic at line 788 in wfdlgs2.c at line 3506 in wfcopy.c. In this case, we don't need DROP_HARD (always use DROP_JUNC), but we do need FUNC_HARD .vs. FUNC_JUNC. This will also make the drag/drop from the right and left pane be the same; as noted above, there is a difference because the left pane contains only directories. |
DiscussionPlease read my comment from above, I discussed this way already: This does not work because (the most important of many reason)
Please try this in the compiler yourself! There are many other reasons from here and additionally:
Summary
|
|
But maybe there is a more radical way .... Trying out things .... |
|
The point of my above argument was IsDirectory() on many This would not work But more radical .... If we
then things work. IsDirectory() on many is not needed, that's the key point The drag and drop loop is now more symetrical between tree and file but many other places are not so obvious to understand. Anyhow it works. |
c50aa90 to
889858f
Compare
…352) * Symbolic Link, Hardlink and Junction creation is available via menu * Fix missing IDS_HARDLINK in .de Use F11 for Symlink * Fix typos in Turkish * Fix typos in .rc files * Move Turkish lang resource files into .vcxproj folder lang/ * Comment Junction disguise as FUNC_HARD in WFMoveCopyDriverThread() * Add Texts for full-width katakana texts for 'hardlink from', 'hardlink to', 'symlink from', 'symlink to' * Simplyfy things and completley get rid of DROP_JUNC and almost get rid of FUNC_JUNC * Fix Input for CopyError() and one typo in the comment Co-authored-by: Hermann Schinagl <hermann.schinagl@avl.com> Co-authored-by: schinagl <hermann@schinagl.priv.at>
Replace some misused zh-Hant translations with zh-CN ones.
As mentioned this is the small part, which provides menu entries for symbolic/hardlink/junction creation