Closed shawnwildermuth closed 4 years ago
Sorry not sure what you're referring to in this huge block of code.
My bad. Chanaged the signature to include the parent:
public async Task<bool> SendPost(WeblogInfo weblogInfo, bool sendAsDraft = false, WeblogForm parent)
Then I added the parent parameter to each of the MessageBox's to deal with the error window being parented by the OS instead of the App. For example:
MessageBox.Show(parent,
"Invalid Weblog configuration selected.",
"Weblog Posting Failed",
MessageBoxButton.OK, MessageBoxImage.Exclamation);
I couldn't test it (or I would have done a PR) as I couldn't build and run the source code. (Any hints there would be great).
Can you file a separate bug for the non-building?
Tests are integration tests so they won't run and not fail (paths and dependencies), but the project should build. Error info would be useful.
To be honest I haven't checked in some time to build clean, but not sure why that would fail now.
Thanks...
Yup.
I think we don't need the parameter. You can get the form from:
WeblogForm
// or
WebLogAddinModel.Addin.WeblogForm
I'll fix this here. Thanks.
Oddly I've never run into this particular problem and I tend to publish a lot (but maybe I don't get a lot of errors). When do you see this undercut happening?
I always get errors when I setup a new machine and have to hunt for hte message box (as it's usually parented by the Desktop)
When posting, the error messagebox isn't correctly parented so it goes away. I would have done a PR but I can't get my fork to build and test. But this is how I tried to test it: