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

Toolbar Customization Does Not Load #164

Closed
mminnick opened this issue May 8, 2018 · 9 comments
Closed

Toolbar Customization Does Not Load #164

mminnick opened this issue May 8, 2018 · 9 comments

Comments

@mminnick
Copy link

mminnick commented May 8, 2018

I cannot get my toolbar customizations to load from the registry, with any solution configuration.

While modifying the toolbar I can see the registry entry update (it's binary, but it does change immediately), so the changes are being saved, but upon restarting Winfile the customizations are not loaded. The customizations do stay in the registry, however.

In tbar.c,:412, the bRestored always returns false when I run it through debug. That's about the limit of my knowledge; I work primarily with .NET so I'm not used to the whole message-sending that C++ does for UI.

Any ideas?

@ZanderBrown
Copy link

Yes C is quite different from the niceties of WinForms (and higher)

At somepoint we seem to have got some registry stuff creep in whilst still using .ini api (which generally just wraps the registry these days) so perhaps something is conflicting

I'm seeing this happen on Wine

@mminnick
Copy link
Author

mminnick commented May 8, 2018

I forgot to mention, I'm on Windows 10 Enterprise 1709.16299.371

And yes, C. My bad, haha. 😜

@craigwi
Copy link
Contributor

craigwi commented Jun 30, 2018

He @RMoDOOM, can you try your toolbar customizations again? I might have gotten lucky and fixed your issue with my recent changes. Let me know.

@mminnick
Copy link
Author

mminnick commented Jul 2, 2018

Unfortunately it doesn't appear to have been fixed. I still can't customize the toolbar.

@craigwi
Copy link
Contributor

craigwi commented Jul 2, 2018

Ok, @RMoDOOM can you share the specific customization you are using? I will try to reproduce the issue.

@mminnick
Copy link
Author

mminnick commented Jul 3, 2018

It's been every customization I've tried. Nothing specific seems to trigger it. I can remove all buttons from the default toolbar, add one button, completely rearrange it, add each button one by one, and whenever I restart the program it's gone (reset to the default).

@craigwi
Copy link
Contributor

craigwi commented Jul 3, 2018

I figured this out; per https://docs.microsoft.com/en-us/windows/desktop/Controls/customize-toolbars the save/restore method changed to use TBN_SAVE/TBN_RESTORE instead of TBN_GETBUTTONINFO. Default behavior of TBN_SAVE writes the "Shell-defined data", but TBN_RESTORE doesn't do anything with it (nor should it). That's why you see the data in the registry, but it is ignored.

I've started on a fix, but the existing code is pretty convoluted due to extensions with toolbars.

@craigwi
Copy link
Contributor

craigwi commented Jul 6, 2018

I implemented the new(er) toolbar save/restore mechanism. @RMoDOOM, your case should work now; if not, let me know.

As a reminder, the current builds are located on:
https://winfilerelease.blob.core.windows.net/craigwi/Win32/Winfile.exe
https://winfilerelease.blob.core.windows.net/craigwi/x64/Winfile.exe

@mminnick
Copy link
Author

mminnick commented Jul 6, 2018

Yep, that seems to have solved my issue. Thanks!

@mminnick mminnick closed this as completed Jul 6, 2018
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

No branches or pull requests

3 participants