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

Update NanaZipShellExtension.cpp #333

Closed
wants to merge 6 commits into from
Closed

Update NanaZipShellExtension.cpp #333

wants to merge 6 commits into from

Conversation

modz2014
Copy link

@modz2014 modz2014 commented Sep 4, 2023

Addressing the NanaZip duplication issue has been resolved by eliminating its presence in the classic context menu, ensuring a streamlined and efficient user experience while maintaining its accessibility in the new context menu. #328 (comment)

Fixing Duplication of NanaZip on both new context menu and classic its now hidden from classic context tmenu
@MouriNaruto
Copy link
Member

MouriNaruto commented Sep 5, 2023

First, thanks for your PR and I'm sorry because I've been busy with other projects in recent days.

I haven't merged your PR because I need some time to understand the modifications.

I think we can utilize this not only on Windows 11 or later. So, I need to have more time to think.

Kenji Mouri

@modz2014
Copy link
Author

modz2014 commented Sep 5, 2023

i can explain it to you soon I have also done a few other fixes and feature for people for you

@modz2014
Copy link
Author

modz2014 commented Sep 5, 2023

this code works by first checking if the user is running Windows 11 or later using the IsWindows11OrLater function. Based on the Windows version and certain conditions (selection and okToBeSlow), it determines whether the context menu item should be visible and enabled (ECS_ENABLED) or hidden (ECS_HIDDEN). This provides a way to customize the behaviour of the context menu item based on the Windows version and user interaction.

The purpose of this else block is to provide default behaviour for cases where the Windows version is not Windows 11. In these cases, the context menu item is set to be enabled (ECS_ENABLED) by default. This means that regardless of the specific conditions related to file selection (selection) and speed of operation (okToBeSlow), the context menu item will be available for use on non-Windows 11 versions.

In summary, the else block ensures that the context menu item is enabled by default on Windows versions other than Windows 11. It provides a fallback behaviour to maintain consistent availability and functionality across different Windows versions, as it assumes that the context menu item's functionality is generally applicable and safe on those versions.

@MouriNaruto
Copy link
Member

I am not making you explain the implementation.

I think maybe this feature can be used in all supported Windows versions.

Also, we need to consider the third-party apps which use the context menu. (They also can use the okToBeSlow parameter to optimize the user experience.)

Kenji Mouri

@modz2014
Copy link
Author

modz2014 commented Sep 5, 2023

Thank you for your input, Kenji. You're absolutely right; expanding this feature to all supported Windows versions could be beneficial. It's essential to consider the broader ecosystem, including third-party apps that utilize the context menu. By allowing them to use the 'okToBeSlow' parameter, we can indeed optimize the user experience and ensure compatibility across various applications. Let's further explore this possibility and assess the potential impact on our development roadmap @MouriNaruto

@modz4567
Copy link

modz4567 commented Sep 5, 2023

@MouriNaruto this a good suggestion from what can understand it will still load context menu on both Windows 11 and below

Updated IsWindows11OrLater() function to a better approach
@modz2014
Copy link
Author

modz2014 commented Sep 7, 2023

@MouriNaruto I updated the IsWindows11OrLater() function approach to be a better one so hopefully this one will work better for you If you need any more information please let me know Also I have a Wix Installer Example did you want me to send this to you as well

@modz2014
Copy link
Author

@MouriNaruto can we add the those hash commands under a submenu so it looks nicer when right-clicking

@MouriNaruto
Copy link
Member

@MouriNaruto can we add the those hash commands under a submenu so it looks nicer when right-clicking

Due to the limitation of IExplorerCommand based context menu, we only have 16 items as maximum.

So, I think I will try to continue to reduce items.

Kenji Mouri

@modz2014
Copy link
Author

@MouriNaruto can you open the discussion tab here on GitHub to ask questions I want to know what else needs to be done before the new release

@MouriNaruto
Copy link
Member

MouriNaruto commented Sep 12, 2023

@MouriNaruto can you open the discussion tab here on GitHub to ask questions I want to know what else needs to be done before the new release

I don't use GitHub discussion feature because it makes it messier.

There are something at least I need to do before I release the next preview:

  • Split the LZMA SDK as a separate module in NanaZip.
  • Synchronize the LZMA SDK and 7-Zip implementations to 23.01 in NanaZip.
  • Cherry-pick something from the latest changes in 7-Zip ZS.
  • Three features originally in 2.0 release but I delayed that.
  • More XAML UI powered by Mile.Xaml.
  • JSON-based configuration.
  • Migration for some generators for project development.

Kenji Mouri

@modz2014
Copy link
Author

Could you please provide information on which older version or build NanaZip is based upon or derived from?

@MouriNaruto
Copy link
Member

Could you please provide information on which older version or build NanaZip is based upon or derived from?

NanaZip is based on 7-Zip 21.03 with heavily modifications for project building process originally.

Kenji Mouri

@modz2014
Copy link
Author

Do you have any specific preferences for features or changes from the latest build? @MouriNaruto

@MouriNaruto
Copy link
Member

Do you have any specific preferences for features or changes from the latest build? @MouriNaruto

I'm trying to synchronize the LZMA SDK and 7-Zip implementations to 23.01 in NanaZip first. And I hope I can finish that this week.

Kenji Mouri

Adding Open folder destination when the extraction is completed
@modz2014
Copy link
Author

i have Updated for Open folder destination after extraction is complete mention here #272 (comment)

@modz2014
Copy link
Author

I've noticed that when we right-click on a file (@MouriNaruto), the context menu displays certain options twice. Upon closer inspection, I'm wondering about the necessity of having both 'Compress to' and 'Email' options. While 'Compress to' successfully opens the program, 'Email' does not trigger any action. Wouldn't it be more user-friendly to streamline this and simply have 'Compress' and 'Email' as options in the context menu? This way, users can choose their preferred actions more seamlessly
Screenshot 2023-09-29 142452
Screenshot 2023-09-29 142641

Extraction being enabled from Shell
Adding User Option to open folder destination after extraction is completed using shell extension
@modz2014
Copy link
Author

@MouriNaruto i added User Option to open Folder location once Extraction has been completed

@modz4567
Copy link

I see you have added a few more things in NanaZip I'm hoping @MouriNaruto accepts the pull request @modz2014 would be greate to have that option to open destination of extracted files ect and I love how you removed the duplicated context menu for windows 11

@MouriNaruto
Copy link
Member

MouriNaruto commented Sep 30, 2023

I won't accept the suggestion and the PR of hiding NanaZip item in the legacy context menu because there is no proper way to implement.

Due to packaged shell extensions running out of process, we cannot check the process is File Explorer or third-party applications which need shell extensions. (For example, the common open and save dialog.)

Due to many people may like to select all files in the folder which the file count is large like the System32 folder, it's not suitable for using okToBeSlow to optimize.

I think I will change "Compress and email" to "Compress and share" as the result with offline talking with @AndromedaMelody for #322. (AndromedaMelody also suggests me to close his PR because he thinks the feature is right but the implement way is wrong.)

Kenji Mouri

@modz2014
Copy link
Author

@MouriNaruto i have just wondering thats all did you take a look at the other code that i added from this suggestion #272 (comment)

@MouriNaruto
Copy link
Member

@MouriNaruto i have just wondering thats all did you take a look at the other code that i added from this suggestion #272 (comment)

I have read it and found it may not be integrated into NanaZip's source code properly. I need to modify it first.

P.S. I will rewrite the content menu implementation in the recent days.

Kenji Mouri

@modz2014
Copy link
Author

modz2014 commented Sep 30, 2023

@MouriNaruto is it already integrated also what are your thoughts about creating iso images i have started it last night

@MouriNaruto
Copy link
Member

@MouriNaruto is it already integrated also what are your thoughts about creating iso images i have started it last night

It's not the current development goal for me because I'm trying to modernize the UI at the current stage.

Kenji Mouri

@modz2014
Copy link
Author

ok i have almost finished it just added a few more touches to it then I might send it to you or update to this pull request should I close this I guess or @MouriNaruto

@modz2014 modz2014 closed this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants