LesFerch / WinSetView

Globally Set Explorer Folder Views
MIT License
1.08k stars 46 forks source link

Uncheck all, Remember WinSetView and Explorer window size+pos, Copy+paste view settings, Easier way to rearrange columns, Dark theme #41

Closed Owyn closed 1 year ago

Owyn commented 2 years ago

Use case: - I just want to manually edit settings for image search results (since you can't do that in win10 without apps or regedits)

Current situation: - I have to manually uncheck like 30+ checkboxes to do that

Owyn commented 2 years ago
LesFerch commented 2 years ago

"General items" can be unchecked. Do you mean "Global"? If so, it doesn't have a check box because it doesn't need one. If you have unchecked everything, except "Pictures Search Results" then the settings for Global are going to do absolutely nothing.

So, go ahead and set "Pictures Search Results" with everything else unchecked and ignore "Global". You will get the result you seek. However, you are defeating most of the purpose of the program. Without setting defaults for all folder types, you are susceptible to getting reverted back to Windows defaults if something goes awry with a Windows update. If you set the defaults, and experience a situation like that, your folder views will revert to your preferred defaults.

Owyn commented 2 years ago

However, you are defeating most of the purpose of the program.

Well, this is pretty much the only program which can do what I want (editing "picture search results" settings - I just want biggest thumbs there and it gives me medium sized currently even tho picture type folders have biggest size by default)

Owyn commented 2 years ago

> So, go ahead and set "Pictures Search Results" with everything else unchecked and ignore "Global".

thx for the advice but... that wiped all my folder settings everywhere :-( even thought I unchecked everything except picture search results even my saved explorer window size

LesFerch commented 2 years ago

In order to set new defaults for any folder type, all individual per folder settings must be cleared. However, under the "Advanced" interface, there is a checkbox in the Options screen to "Keep Apply to Folders" settings. If checked, this will retain your defaults for the five major folder types.

You can restore your previous settings using the Restore button and try again with that option checked.

But seriously, it's easier to just set your preferred defaults using WinSetView.

Owyn commented 2 years ago

"Keep Apply to Folders" settings

I seriously wouldn't have guessed what it's for if not the explanation now... maybe rename it to what it actually does ("don't reset unchecked") and put a warning that everything will be RESET when you press "submit"?

But seriously, it's easier to just set your preferred defaults using WinSetView.

In notepad (on saved settings ini) it's even easier since I can copy-paste settings from one to another, e.g. from [videos] to [vidoes search results] etc

Owyn commented 2 years ago

There's a "reset views to win default" checkbox btw, and I did NOT check it so I thought... it wouldn't reset?

Why reset the explorer window size and position btw? can it maybe be kept somehow or carried over?

LesFerch commented 2 years ago

It's named correctly. See the manual for details. It doesn't really work the way you're thinking even if the result is what you want. It's under "Advanced" for a reason (again see manual for details).

You wouldn't need to be editing the INI file if you use it as intended. Set all the defaults as you like for the major categories and then only uncheck Inherit to override a folder type (like your Pictures search results).

Owyn commented 2 years ago

if you use it as intended.

Well, I want one view for pictures & videos & library, and other for documents & general & etc, and there's only one global setting, how else can I copy in groups if not with notepad? I'm trying to figure out how to use it as intended...

LesFerch commented 2 years ago

Nope. The per folder settings are in the Bags/BagMRU registry keys. They're obscure, binary, weirdly indexed and prone to corruption. Those keys have to be cleared to reset any defaults. I spent hundreds of hours on this. If there were a more elegant way to do it, I would have found it.

LesFerch commented 2 years ago

You would need to set approximately the same number of defaults as you would using File Explorer. That is, you would set your preferred view for Pictures and all the other Pictures type folders will inherit from there. Same for Videos and Documents.

It sounds like you want General to be the same as Documents, so set your Global setting to that preferred view and leave Inherit checked for General and Documents.

Since you want Pictures the same as Videos, that's one where you can save some clicking by editing the INI file

Maybe, when I have some spare time, I'll add a "clone" button to copy settings from one folder type to another.

Owyn commented 2 years ago

Cloning would be nice,

I had to look at the manual to find a way to rearrange details columns... but it seems impossible to put anything before filename because filename can't be unchecked - a simpler way to rearrange columns would be nice - e.g. drag & drop here maybe (or just a [left] \ [right] buttons to change order for column headers).

LesFerch commented 2 years ago

Ahh, I hadn't considered that someone might want something other than Name as the first column. That's a pickle. Name is required (File Explorer also won't let you remove it) but it doesn't necessarily have to be the first column. I'm not sure what I can do for a fix. A column drag type interface, like File Explorer provides, is outside the scope of this project. Maybe in a future rewrite in C#, but not as an HTA. Left Right buttons would have to be under each column heading, so that's also really complicated to implement. I'll look into it and see what's feasible. Thanks for pointing out the deficiency.

LesFerch commented 2 years ago

A quick fix may be to allow Name to be unchecked but require it to be checked before leaving that page. The problem with that idea is that a message box would be required and I really try to avoid adding messages because there are over 30 languages to support.

Owyn commented 2 years ago

Left Right buttons would have to be under each column heading

Like this then perhaps?

see my well-drawn clickable red arrows image

Dhyfer1 commented 2 years ago

image

@Owyn I'm using the latest version, but in WinSetView I don't see any option to have it with dark theme. How come yours appears like this?

Owyn commented 2 years ago

@Dhyfer1 windows contrast theme does that for all apps

Dhyfer1 commented 2 years ago

@Dhyfer1 windows contrast theme does that for all apps

Ok, I understand. I always leave the default contrast values, but it looks good winsetview with dark theme.

@LesFerch can you create a dark theme for winsetview?

LesFerch commented 2 years ago

@LesFerch can you create a dark theme for winsetview?

@Dhyfer1 I think so. I'll put that on the To Do list.

LesFerch commented 2 years ago

Like this then perhaps?

@Owyn I looked at that. Very difficult to implement. And it's only useful for small changes. Doing a total rearrangement is a lot of clicks with an interface like that. The best option is a drag sort, but that appears to be impossible using MSHTML 11. I'll keep looking for a simple solution (easy to program and easy to use).

Dhyfer1 commented 2 years ago

@Dhyfer1 I think so. I'll put that on the To Do list.

Great! hope to see it soon 😃

LesFerch commented 2 years ago

There are actually several requests in this issue thread, many of which will be addressed in version 2.50 (I'll probably release a Beta first)...

Uncheck all button: This is actually very easy to implement. However, I think the request was based on the idea that the views for any unchecked folder types would not be affected. If that were true, then I could see the value in unchecking everything expect the view you want to update, but, as previously discussed, it doesn't work that way. In order to effectively update any view, the individual folder view settings must be cleared.

I did some testing of your particular scenario to see what would happen if I added an option to NOT clear the current per-folder settings (i.e. don't delete the Bags/BagMRU keys). The results were... unpredictable. For example, I did a search within Pictures and set the search results view to List and then did the same to a C:\Photos folder. I then updated the default view for Pictures Search Results to Details with a specific set of column headings, but left the Bags/BagMRU keys intact. A search on the C:\Photos folder resulted in the new view being displayed (which actually I didn't expect) but a search on Pictures resulted in a Details view with the Windows default column headings for General items (weird). Running the same test with the usual steps (i.e. clear the Bags/BagMRU keys) the Pictures Search Results were the correct new default view everywhere.

So, that was a long winded way of saying that I could add an uncheck all button, but I think it's not really useful and may lead users to incorrectly assume that they can "protect" existing views that way.

Why reset the explorer window size and position? Since that's also stored with the Bags key, it gets whacked along with the per-folder settings. But I can just backup and restore the subkey where the size and position is saved (HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags\AllFolders\Shell), apparently, without breaking anything. This will be in 2.50.

Cloning would be nice: Working on it.

Rearrange details columns: I've implemented a little pop-up drag sort for the column headings for version 2.50. This greatly reduces the clicking required to rearrange columns and lets you select any order (i.e. Name does not have to be first).

@Dhyfer1 Dark theme: So far, I've added a selector to choose a Light or Dark theme. I'm working on extending this to make the theme file external and user-editable (so you can edit existing themes or add your own).

Dhyfer1 commented 2 years ago

@Dhyfer1 Dark theme: So far, I've added a selector to choose a Light or Dark theme. I'm working on extending this to make the theme file external and user-editable (so you can edit existing themes or add your own).

Great, I hope the next version will have the theme selector you mention. 😊

By the way, when the file explorer is in the Details view, by default the text in the column headers is aligned to the left. Can you make winsetview able to change the position of the text to leave it in the center?

LesFerch commented 2 years ago

By the way, when the file explorer is in the Details view, by default the text in the column headers is aligned to the left. Can you make winsetview able to change the position of the text to leave it in the center?

AFAIK, File Explorer provides no method (controls or registry settings) to change the column headers to center or right justified. If I missed something, please let me know. Thanks.

Dhyfer1 commented 2 years ago

Well, it was just an idea, I don't know either. And I don't know if this can be useful, however I will keep looking to see if I can find something else.

LesFerch commented 1 year ago

WinSetView 2.50 beta is now available to download. It includes the following improvements:

Uncheck/Recheck all button: Added to the Advanced interface as it could be useful for someone who wants to keep the majority of the folder type views set to Windows defaults.

Remember File Explorer's Size and Position: The File Explorer window size and position is now retained.

Remember WinSetView's Size and Position: The WinSetView window size and position is now remembered. There is also now a "Re-center" button to center the app on the primary display.

Copy and Paste Folder View Settings: There are now Copy and Paste buttons for easy copying of view settings from one folder type to another.

Column Rearranging Feature: There is now an easy drag sort dialog for rearranging column headings.

Dark Theme: There's now an extendable Theme menu with light and dark themes.

Ascending and Descending Order for Grouping: The Grouping column heading button now has ascending and descending order options.

More Granular File Dialog View Settings: Separate views for File Open/Save dialogs can now be set on a per folder type basis.

Note: The built-in Help button will bring up the web page for the released (i.e. older) version. Go to the GitHub beta branch to see the updated manual, or click this link.

I expect to move this beta to full release pretty quickly, but would like to get some feedback to ensure everything is okay. There are a lot of code changes in this update.

LesFerch commented 1 year ago

@Dhyfer1 and @Owyn please try the new beta (see message above) and let me know how it goes. Thanks.

Owyn commented 1 year ago

@LasFerch I clicked "Options" and it's empty.

Copy - paste works, it's nice.

Also, language, fonts, and theme settings aren't saved and are reset each program start.

LesFerch commented 1 year ago

That means Modal.hta is missing. How did you download? I just tested the download link I provided and it's complete and works fine.

Re. language, fonts, theme setting: Those settings are all stored in the INI file which is only updated when you click Submit or use Save Settings. The window size and position is saved automatically to the registry, so that it's not a portable setting (since we can't count on screen coordinates being the same on another machine, especially when multiple monitors are involved).

Owyn commented 1 year ago

Modal.hta is there in AppParts folder.

I just downloaded your archive and extracted everything from it to the old WinSetView folder with replace

LesFerch commented 1 year ago

Right. If Modal.hta were missing, the dialog wouldn't even have a title. This is bizarre. I can't imagine what's causing this behavior. Maybe something to do with your high contrast theme. But then, the dialog isn't even sized correctly, which indicates that there are no elements at all in the dialog. This makes no sense. Do you have any other machine (even a VM) to test on? Maybe if it works one place, we can figure out what's different that's breaking it.

LesFerch commented 1 year ago

Nothing to do with high contrast. Tested that on Windows 10 and 11. Running out of ideas. What happens when you double-click Modal.hta? It should display this: image

Owyn commented 1 year ago

I switched off high contrast to test it, same result.

I just have one machine with no VMs

modal.hta: image

LesFerch commented 1 year ago

Font, font size, and a scale factor is passed to the dialog. I can see you just have the default font and size, so that leaves scale. What is your computer's screen scaling set to?

Owyn commented 1 year ago

Font, font size, and a scale factor is passed to the dialog. I can see you just have the default font and size, so that leaves scale. What is your computer's screen scaling set to?

125% for text and 125% for all elements

LesFerch commented 1 year ago

Nothing unusual there. I already tested with 125% and 150% settings. I was worried about something more extreme like 300% on an 8K monitor (which should still work just fine). I'm at a loss here. Windows 10 I presume? Multiple monitors?

Owyn commented 1 year ago

Windows 10 22H2 single 1080p (16:10) monitor

Maybe just don't use pop-ups and show everything in original window?

LesFerch commented 1 year ago

The same window could work ok for the file dialog view options (with dozens of hours of work) but would be pretty awful for the column rearranging (blank the screen, show rearrange dialog, redisplay screen). There's got to be some fix for this. Maybe some debugging code in Modal.hta will tell us something. Oh, I wish I was sitting in front of your computer. I love a challenge, but it's painful doing it step by step remotely (especially when it involves a lot of trial and error).

LesFerch commented 1 year ago

Let's find out if this is a machine or user profile issue. Please test with another local user account, preferably a newly created account that just has default settings. The account doesn't need to be administrator, but it would probably be more convenient if it is (i.e. easier access to the same files).

Owyn commented 1 year ago

I tried it on my GUEST account - said access denied on line 83 "getObject" and didn't run at all 🤷🏻

LesFerch commented 1 year ago

Your Guest account appears to be more locked down than a standard user. Line 83 sets up an object to read registry values. WinSetView does work with a standard (i.e. non-administrator) user. I just tested the 2.50 beta to be sure and, yup, still works for a standard user on my machines.

LesFerch commented 1 year ago

Is your Windows 10 22H2 Home or Pro? If Pro, there may be group policies involved in all this.

Owyn commented 1 year ago

Pro, perhaps it's group policies or something alike cuz a new user account works fine (home supports group policies the same way btw, just without a built-in handy menu to manage them)

btw, an option window with a single option inside is kinda ridiculous... (separate views for open\save dialogues) - just make a checkbox there with a tooltip for that

LesFerch commented 1 year ago

Ahh, good to hear it's something in your profile. It would be nice to know what that "something" is, so I'd love to find a way to replicate the issue. Maybe if I could get an export of your user profile policy settings or maybe an entire copy of your profile? If you find a way to replicate the issue on another account, then maybe that will narrow it down to something you can send to me.

And yes, I know the one option is a bit silly, but I tried all kinds of layouts to have it on the main screen and it was just too cluttered (and potentially confusing for the less-technical users). I've learned from feedback that keeping as little as possible on the main screen is important. That's why "Load Settings" and "Save Settings" are under Advanced. Users were unclear regarding settings in an INI file versus folder view settings applied to the registry. And, hey, someday there may be a second option in that menu. 😉

LesFerch commented 1 year ago

BTW, I noticed some minor display issues with the high contrast modes. The background colour for hover does not change (makes the column rearranging tool a little less user-friendly) and the path items, that are supposed to be in blue, are not. I'll see f I can find some workarounds for these issues. Not sure if I can detect the high contrast theme. Maybe it's a registry value I can read...

Owyn commented 1 year ago

(used https://community.spiceworks.com/how_to/108867-transfer-all-group-policy-settings-from-one-system-to-another guide)

Here are my group policies but... they are all for machine and not for user it seems 🤔 not sure if that's it

Owyn commented 1 year ago

Extract to C:\Windows\System32\GroupPolicy\Machine.

LesFerch commented 1 year ago

Ahh. thanks. It's been about a dozen years since I did anything with group policies. I don't have a Windows 10 Pro machine set up at the moment, so I copied the files to Windows 10 Home and Windows 11 Pro machines and rebooted. Nothing changed. WinSetView still worked fine on both machines.

Owyn commented 1 year ago

Well, since it's a machine policy and it works fine for my other user I don't think it's due to group policies...

LesFerch commented 1 year ago

Agreed. Nothing there of interest.