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

Improvements #829

Merged
merged 11 commits into from
Aug 13, 2022
Merged

Improvements #829

merged 11 commits into from
Aug 13, 2022

Conversation

thisismy-github
Copy link

New options:

  • Single-click expandable folders
  • Disable showing modified settings in bold
  • Custom search hint
  • Hide "see more results" item in search
  • Custom commands for every type of control
  • Single-expand options for every command in Windows 7 style
  • Open pinned folders to their true path
  • Customize pinned folder's location*

Other changes:

  • Settings now detect whether or not they're actually modified
  • Bug fix for loading XML files while an edit box is open
  • "Open Pinned" added to start button's context menu
  • New setting type for picking and saving directories called TYPE_DIRECTORY

*Because this changes the way the shell extension for pinning items through the context menu works, users may need to reinstall/repair their installations to actually update their context menus and start pinning to custom locations. I'm not sure if this will cause any issues when officially updating.

This is my first serious pull request, and my first serious C++ project. I tried my best to stay as consistent to the original code and formatting as possible. I wanted to do more, but finally stopped myself at 10 commits.

Opens pinned items on both sides of the start menu in just one click,
while preserving hover functionality. Ignores the All Programs button
for now as the All Programs folder is rarely accessed and this option
can obstruct its use, especially for the inline menu style. Fixes Open-Shell#692.
Intercepts *most* instances of FLAG_DEFAULT getting set, including
when XML files are loaded and when Open-Shell starts, adding
if-statements to those spots to check if a new value is actually
different from the setting's default value. Ensures more consistency
behind the scenes and gets rid of inaccurate bold highlights.
Prevents settings from appearing in bold. Does not change the helper
text at the bottom of the window.
When loading XML files, settings with active edit boxes open will not be
adjusted. This adds an additional tab-reload before the load begins to
forcibly close any active edit boxes.
If set, intercepts the search hint's DrawText function and swaps out the
default text for user-defined text. Leaving the text blank results in an
empty search box.
Hides the item in both start menu styles and adjusts search height to
ensure the empty space is used. Partially fixes Open-Shell#660, but currently
does not honor group policy settings.
Includes a unique option for each control and supports environment
variables.
Expands the "display as a list of drives" option from This PC to work on
almost any item in the Windows 7 style. Incompatible items have a new
setting called ITEM_NODRIVES which blocks the option from appearing.
This PC still uses the original "list of drives" text, while other items
use "list of links" instead. Sorting has been updated to account for
this option by adding a property called bFolderLink which marks any
folder, even if it is not explicitly expandable.
Adds a new function called GetFakeFolder which attempts to find and get
the target.lnk file from a fake folder (what Open-Shell uses to pin
folders). If detected, InvokeCommand is swapped for a ShellExecute call
to the target shortcut. Fixes Open-Shell#555, Open-Shell#653, and by extension, Open-Shell#691.
Items can be pinned to directories that require administative privileges
(such as Open-Shell's default installation directory), so long as users
take ownership of the pinned folder. Also adds a command to Open-Shell's
context menu that opens the current pinned folder.

Adds general support for directory-based settings by creating a new
setting type called TYPE_DIRECTORY which uses a new bool added to
BrowseLinkHelper, called bFoldersOnly. START_MENU_PINNED_ROOT
has been removed, and all instances of both it and BrowseLinkHelper
have been adjusted accordingly. To create your own directory-based
settings, use CSetting::TYPE_DIRECTORY. Empty directory paths are
reset to their default value as they can cause unexpected behavior.
@AppVeyorBot
Copy link

@bonzibudd
Copy link
Member

@thisismy-github

These seem like a good amount of useful changes, thank you for taking the time to do this. Everything seems to work as I expected, except for one thing: The "Single-click to open folder shortcuts" option does not seem to be able to differentiate between jump list items and normal sub-menu lists. This causes the app to open directly when clicking a jump list, making those items inaccessible.

Other than that, everything seems to be working as expected, except for some remaining issues with the "Pinned" items location and switching between the pinned folder in the "Programs" list to the standard "Pinned" folder.

If you want to go further into those issues, I would take a look at #532 and #522, which outline some of those problems, mainly when the Use Start Menu folder option is enabled (default in classic styles).

Again, thank you for taking your time to do this (Although I am not a maintainer, I have been using OSM for a while). I will try to post some more information if I find any problems with the custom Pinned folder, or anything else that may cause issues.

@AppVeyorBot
Copy link

Build Open-Shell-Menu 4.4.170-fcjtntlm completed (commit 7ae9386775 by @thisismy-github)

@thisismy-github
Copy link
Author

@bonzibudd Good catch, thank you! Fixed. Also just to be clear for the issues you mentioned about the pinned location, are those specifically problems my changes caused/worsened or are they just related things you wanted me to look into? Because to be honest, I have no idea what causes those problems, and they seem like they may be deceptively complicated or possibly very deep-seated. I'll probably look into those eventually though (assuming they're not my fault and this pull request goes smoothly), after I finish a few other issues and ideas I have lined up.

Also, I wanted to thank you (a second time). The change I did for Fluent-Metro two weeks ago was my first ever pull request, and you merging it (even after how hard I bungled it initially) is what gave me the confidence to try and tackle something as big as this, so really: Thank you. But also... you merging my first pull request indirectly resulted in my second pull request adding global search hint customization, thus making the first one obsolete. A cruel twist of irony, but a worthwhile sacrifice. So thank you (a fourth time).

@blackcrack
Copy link

hmm.. not need to "seals around in the mud" we we are be in the international "land" ;) there is one grateful thank you enough ;)

If you want to go further into those issues, I would take a look at #532 and #522, which outline some of those problems, mainly when the Use Start Menu folder option is enabled (default in classic styles).

a bugfix too of this suggestions ?
best

Copy link

@blackcrack blackcrack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huhh, who have set up the "&&" .. we are not in dos batch..
thy for support our community :))

blackcrack
blackcrack previously approved these changes Aug 21, 2021
@bonzibudd
Copy link
Member

@thisismy-github

From what I can tell so far, those specific issues haven't been worsened. The main reason I brought it up was just because changing those settings may have some unintended consequences regarding issues like that, especially if someone didn't know of the strange behavior beforehand. However, since we haven't found any similar problems at this point, I definitely wouldn't worry about it, unless you had looked into it already.

One more thing: For the Single-click to open folder shortcuts option, I would suggest also excluding the Metro "Apps" folder, which is shown on the classic menu styles. Because of the way that folder works, you can't actually click to open it in a window, which makes the list unusable unless you just hover over it.
image

Again, thank you for the contributions!

Fixed single-click option ignoring split arrows
Fixed Apps folder being clickable
@thisismy-github
Copy link
Author

thisismy-github commented Aug 21, 2021

@bonzibudd Fixed. I noticed that you said the apps folder can't be opened in a window via clicks at all, so on top of fixing the single-click issue, I also added a change to prevent it from opening via double clicks either so you can never accidentally "open" it. It still expands when you click it. I hope I didn't misunderstand you and that this change wasn't obtrusive.

Edit: On second thought, this change might actually be more confusing for users than if double clicking it opened nothing, but I'll leave the change until I get feedback on it.

@AppVeyorBot
Copy link

@blackcrack
Copy link

@ge0rdi common, check it :)

@bonzibudd
Copy link
Member

Sounds good! I'm not at my computer right now, so I can't test the changes immediately, but I'll post an update about the double-clicking behavior when I am able to.

@bonzibudd
Copy link
Member

bonzibudd commented Aug 22, 2021

@thisismy-github

The clicking behavior with the Apps item seems much better now. I personally think it makes the most sense as it is now, as it wouldn't be intuitive to be able to click the item and wait for it to not do anything.

Edit: Also, do you mind explaining what 0c308c7 does in more detail? I have an idea of what it is for, but I'm not sure how to apply it.

@ge0rdi ge0rdi self-requested a review August 23, 2021 17:42
@ge0rdi ge0rdi self-assigned this Aug 23, 2021
@thisismy-github
Copy link
Author

thisismy-github commented Aug 27, 2021

@bonzibudd Sorry for the delay. That commit adds new options to the Controls page for each type of control called "custom command" which allows users to have Open-Shell execute any command they want for that control (similar to the options for running commands when clicking on the user's account picture). For example, I set the default custom command for middle-click to "taskmgr", so if a user has that option set, they can middle-click the start button to open up Task Manager. I made this change because most users only use at most 4 of the 6 controls (sometimes only using 2), always leaving spare controls that are otherwise useless. This gives some extra functionality to those controls, and I'm even considering adding two more (Shift+Middle Click, Shift+Hover).

Also, once this pull request is squared away, I'll be submitting a separate pull request shortly after for a semi-big change I've been working on over the past few days. I'm starting to have second thoughts about it, but I'll save that discussion for when the changes are ready.

@bonzibudd
Copy link
Member

@thisismy-github Any updates on this? I would like to see this eventually pushed, but I understand if you are busy or working on other things.

@coddec
Copy link
Member

coddec commented May 4, 2022

@ge0rdi what's goes on, Covit-19 corpse ?

best

@Ibuprophen ..hmmm ? do you know anything about him ? he's in the net or "past" ? could you mail him ?

Hi @blackcrack
Please be respectful and polite in the community while communicating, no one should be threatened or even made uncomfortable intentionally.
covid is not something fun, it's even worse to use it as a joke against someone.
To answer your question, we are all volunteers, we pretty much have no communication or connection at all out side of this project (Not as far as I know of).
Everyone has their own life and has to make living as well plus other matters to deal with. Maybe that's what @ge0rdi up to.
Thanks for your input again, but such joke and language can be considered unrespectful, impolite or offensive.
Hopefully you can change the way asking.
If continuously making the community feeling offensive, impolite or unrespestful, necessary action will have to be taken. e.g. report to github, block etc.
Wish you all the best and see you around hopefully with polite comments, let's make it a safe and joyful community.
Thanks

@ge0rdi
Copy link
Member

ge0rdi commented May 4, 2022

Thank you, @coddec .

I'm no longer participating in the project because I'm simply not interested in it that much anymore.
I found that I can really get along with standard Windows start menu, so I'd rather keep my energy for other projects.

Though I have no problem to review PRs like this from time to time, or provide some advice (if I can help somehow).

Regarding current PR, I have requested some changes and it is now up to @thisismy-github to implement them or discuss them.

@coddec
Copy link
Member

coddec commented May 4, 2022

Thank you, @coddec .

I'm no longer participating in the project because I'm simply not interested in it that much anymore. I found that I can really get along with standard Windows start menu, so I'd rather keep my energy for other projects.

Though I have no problem to review PRs like this from time to time, or provide some advice (if I can help somehow).

Regarding current PR, I have requested some changes and it is now up to @thisismy-github to implement them or discuss them.

Thanks for your reply @ge0rdi
Totally understandable.

That will be great, as you may still come back from time to time, hope we will see you around the corner :)
Appreciate letting us know.
Wish you the best!

@XenHat
Copy link
Member

XenHat commented Jul 19, 2022

@thisismy-github Are you still planning on working on this?

@Ibuprophen
Copy link
Member

Not to be repetitive @XenHat... LOL!

Just a bit of feedback as to this push have everything it needs to work via the Team. 👍

~Ibuprophen

@Ibuprophen Ibuprophen requested review from blackcrack and ge0rdi and removed request for blackcrack August 13, 2022 14:11
@Ibuprophen Ibuprophen added help wanted Extra attention is needed Enhancement/Feature Request An Enhancement/Feature request by the community low priority Low priority but desired fix awaiting response This issue requires a response or further information from OP. acknowledged by devs This issue has been acknowledged by the Open-Shell team. labels Aug 13, 2022
@Ibuprophen Ibuprophen removed the request for review from ge0rdi August 13, 2022 17:02
@Ibuprophen Ibuprophen merged commit 64259f7 into Open-Shell:master Aug 13, 2022
@ge0rdi
Copy link
Member

ge0rdi commented Sep 9, 2022

@thisismy-github

One of your changes broke menu sorting. See #1111 for details.
I have reverted some of those changes (bFolderLink related) in PR #1128.

Honestly, I don't get what was the point of those changes.
Feel free to get them back, if you think they are really needed. Just make sure it won't break the sorting 😄

ge0rdi added a commit to ge0rdi/Open-Shell-Menu that referenced this pull request Sep 11, 2022
This reverts commit 998d83c.

This change was wrong and it shouldn't get merged in first place.
See Open-Shell#829 (comment) for further explanation.

Fixes Open-Shell#1135.
@ge0rdi
Copy link
Member

ge0rdi commented Sep 11, 2022

@thisismy-github

I have reverted the Auto-detect when setting is back to default value change as it was wrong (see #829 (comment)).
It is unfortunate that this PR got merged without sorting that out 😞

ge0rdi added a commit that referenced this pull request Sep 12, 2022
This reverts commit 998d83c.

This change was wrong and it shouldn't get merged in first place.
See #829 (comment) for further explanation.

Fixes #1135.
@wmjordan
Copy link

wmjordan commented Sep 13, 2022

I appreciate @thisismy-github's commits and contributions. It is nice to have some new features.
Can the text for those new settings be added to the localization template dll file, so they can be localized to other languages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged by devs This issue has been acknowledged by the Open-Shell team. awaiting response This issue requires a response or further information from OP. Enhancement/Feature Request An Enhancement/Feature request by the community help wanted Extra attention is needed low priority Low priority but desired fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.