tablacus / TablacusExplorerAddons

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

Open instead - Activate existing tab #356

Closed ccfs closed 10 months ago

ccfs commented 1 year ago

This is a recap of https://github.com/tablacus/TablacusExplorerAddons/issues/345. @bblackmoor and @tablacus, please help to make the enhancement. Thanks.

Currently the add-on takes a File Explorer window in as a new tab, and selects the current item. This enhancement lets the add-on reuse any existing tab in order of precedence:

A new tab will be used only if there is no existing tab.

Users will be able to enable this feature by an option.

Only the active pane will be checked. The support of multiple panes will be deferred as a potential future enhancement.

bblackmoor commented 1 year ago

I have looked at #345. I am not familiar with this add-on, so I will need to install it and play with it a while.

bblackmoor commented 1 year ago

I would find it helpful if you would walk me through the steps which would result in the behavior you want to see.

1) The user is looking at their desktop. No applications are open. 2) ?

ccfs commented 1 year ago

Current behaviour of the add-on:

  1. TE is already running with the add-on enabled.
  2. Open a File Explorer window (in this case, from another application).
  3. TE automatically finds the File Explorer window and absorbs it as a NEW TAB.
  4. TE sets the current item in the File Explorer window as the selection in the tab.

This enhancement lets TE, at step 3, reuse a tab in which the folder has been opened, to avoid duplicated tabs.

ccfs commented 1 year ago

remember to opt for "Real folders"

ccfs commented 1 year ago

I suggest to make "Real folders" an initial default. Currently the add-on does nothing if the user forgets to tick it before enabling the add-on the first time.

bblackmoor commented 1 year ago

I think I understand now. Thank you.

ccfs commented 1 year ago

If you have confidence, you can further make it to handle multiple panes by repeating the tab checking on inactive panes. Then the option to enable this enhancement will be 1 of 3 states (you can decide the most appropriate words):

  1. do not reuse existing tab, always new tab (default)
  2. reuse existing tab on active pane
  3. reuse existing tab on any pane

take you time. no hurry.

bblackmoor commented 1 year ago

I can iterate through the (Tabs Plus) tabs in the active pane. I am having trouble iterating through the panes.

@tablacus ... Do you have any examples of looping through the panes, and then looping through the (Tabs Plus) tabs of each pane? That would be super helpful. I shall continue to experiment in the meantime.

ccfs commented 1 year ago

"Open the same locked tab instead" add-on can iterate through the panes and the tabs in each pane, though it does not prioritize active pane/tab over inactive ones.

ccfs commented 1 year ago

I have found a separated but related problem lately.

There are (at least) 6 ways to open a new tab and then select an item with a given path:

  1. Open item location of the target of a shortcut file
  2. Open item location from a Windows Search result
  3. Open containing folder from a TE result list such as History
  4. Command line switch /select
  5. "Open instead" add-on
  6. "Import Explorer" add-on

2 add-ons can reuse an existing matching tab to avoid a duplicated tab: (a) Prevent duplicate tabs (b) Open the same locked tab instead

If either (a) or (b) has been enabled when a user does 1 of the 6 ways, TE will switch to the existing tab instead of a new tab. However item selection is missed.

I have tried to patch TE and successfully solved case 1 to 4. However I am not familiar with JScript and the patch may have potential problems. @bblackmoor, please have a look and help to deploy a correct patch.

The initial enhancement of this issue can solve case 5. Case 6 can be ignored since the add-on aims at taking in a batch of File Explorer windows; any item selection is probably unimportant.

lnk win-srch hist cmd

ccfs commented 1 year ago

@bblackmoor, last patch misses some situations. Please have a look at this patch and help to deploy a correct one. Thanks.

bblackmoor commented 1 year ago

I only have a day (maybe two) per week to devote to Tablacus Explorer. I will look into that if I have the time.

ccfs commented 1 year ago

OK, I have re-assigned this patch to @tablacus so that you can focus on "Open instead". Thanks.

ccfs commented 1 year ago

@bblackmoor, how is the progress of this enhancement (handle multiple panes, make "Real folders" an initial default)? Besides, I want to re-re-assign the patch to you since I have got nothing from @tablacus.

bblackmoor commented 1 year ago

I apologize for the delay. My health has impaired my productivity in this and many other things. I hope to return to this task later this week.

On January 29, 2023 9:06:41 PM EST, ccfs @.***> wrote:

@bblackmoor, how is the progress of this enhancement (handle multiple panes, make "Real folders" an initial default)? Besides, I want to re-re-assign the patch to you since I have got nothing from @tablacus.

-- Reply to this email directly or view it on GitHub: https://github.com/tablacus/TablacusExplorerAddons/issues/356#issuecomment-1407880836 You are receiving this because you were mentioned.

Message ID: @.***> -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.

ccfs commented 1 year ago

Never mind, Take care of yourself.

ccfs commented 1 year ago

@bblackmoor,

After many trials, I have patched "Open instead" to successfully solve case 5. Therefore the enhancement to handle multiple panes is no longer required. Please simply deploy the latest patches of TE and "Open instead".

I will open another issue for an enhancement of "Open the same locked tab instead" (disregard lock status) later.

Thanks.