Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to distinguish between Directory\Background and Folder #152

Open
Vzz1c opened this issue Aug 4, 2024 · 1 comment
Open

Need to distinguish between Directory\Background and Folder #152

Vzz1c opened this issue Aug 4, 2024 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@Vzz1c
Copy link

Vzz1c commented Aug 4, 2024

class="directory" or maxfolders="1", we need to differentiate between Directory\Background\shell and Folder\shell, let's say I customize a 7zip, we don't want to have a menu command to compress a folder when we haven't selected a folder yet! I'd like to add this feature, thanks!

@Vzz1c Vzz1c added the enhancement New feature or request label Aug 4, 2024
@end2endzone
Copy link
Owner

class="directory" or maxfolders="1", we need to differentiate between Directory\Background\shell and Folder\shell.

ShellAnything does not differentiate between right-clicking a directory background or the right-clicking the directory itself. If you right-click on any of the following :

  • the white area after the last file on the right-pane or
  • a directory element in the Navigation Pane on the left-pane or
  • a directory element in the right-pane

it does not matter for ShellAnything. All these events are evaluated as the same event for ShellAnything : "a directory was selected, now show the menus when a single directory was clicked".

The code in the shell extension can detect that but this information is not used.

let's say I customize a 7zip, we don't want to have a menu command to compress a folder when we haven't selected a folder yet!

I am uncertain of what you mean. Are you referring to the menu that is shown when right-clicking a file/directory, dragging to another location and then releasing your mouse?

In File Explorer, if you right-click the white area after the last file on the right-pane, you will see menus that are related to this directory. A directory is selected even though you did not made any selection. This is not a feature of ShellAnything, it is baked-in File Explorer. For example, try the following :

  • Open a File Explorer.
  • Navigate to your TEMP directory (probably C:\Users\%USERNAME%\AppData\Local\Temp).
  • Hold SHIFT key.
  • Right-click in the white area.
  • Release SHIFT key.

Notice the option "Open PowerShell window here". This menu will open a PowerShell prompt located in this directory. Also, if you select menu "Properties", you will see properties of the Temp directory. This white area is referenced as the "directory background".

I'd like to add this feature, thanks!

Sure I would gladly accept a pull request to help improve ShellAnything. This feature would allow showing a menu only when the user right-click a white background or a directory. That would be great! Could you please elaborate on how you plan to implement this feature? Maybe setting a property selection.background to true or false ?

@end2endzone end2endzone added this to the 0.11.0 milestone Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants