tablacus / TablacusExplorerAddons

Add-ons for Tablacus Explorer
http://tablacus.github.io/TablacusExplorerAddons/
MIT License
87 stars 12 forks source link

Can Open Instead activate the specified tag when the tag are the same? #345

Open vvyoko opened 1 year ago

vvyoko commented 1 year ago

First of all, I wish you a happy life This article is converted through Google Translate, I hope you can understand

Currently it tries to create a new tag every time Windows in such a function https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shopenfolderandselectitems It is different from explorer /select, the command is that it will try to find the folder path first, If there is a tab (window) for the specified folder path and then navigate to the file

As mentioned above, the only extra step is to find out whether there is a tab(window), if there is no new and select, or activation and select

Open Instead can achieve this function I simply replaced SBSP_NEWBROWSER in o.Data.wFlags with SBSP_SAMEBROWSER

I know that I should get the list of tabs for tab plus first Then traverse whether the path of the tab is the folder of the incoming parameter According to the situation, decide whether the wFlags parameter is SBSP_NEWBROWSER or SBSP_SAMEBROWSER But I am really not familiar with the related functions of TE, I hope it can help...

By the way, hope not to change the ViewMode in Te etc. That is to modify the whole part of CurrentViewMode I can't predict what the status in Explorer will be like at this time Disturbing TE's status for this is very unreasonable

ccfs commented 1 year ago

try "Prevent duplicate tabs" add-on

vvyoko commented 1 year ago

try "Prevent duplicate tabs" add-on

Open Instead has a subsequent selection action Prevent duplicate tabs' will only activate tabs without this action

As shown in the figure below, I modified it to open in the current tab 动画

ccfs commented 1 year ago

I suggest @tablacus to enhance "Open instead" add-on so that it will activate an existing tab (i.e. already opened folder) and set the selection according to Explorer window. User will enable this feature by an option.

ccfs commented 1 year ago

I have patched TE and "Open instead" so that when "Prevent duplicate tabs" is enabled, a matching existing tab will be reused to select the required item.

I am not the application owner therefore I cannot deploy these patches through a proper release.

ccfs commented 9 months ago

You can download the latest patch here.