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

Notify on WinSparkle update closed #271

Closed
BrunoBibboVoicemod opened this issue May 10, 2024 · 2 comments
Closed

Notify on WinSparkle update closed #271

BrunoBibboVoicemod opened this issue May 10, 2024 · 2 comments

Comments

@BrunoBibboVoicemod
Copy link

Hi! I have a issue when closing the update dialog once download have finished. I give more context:

Our application do hide it's view if does found an update (we force the user to update to continue using the software). So if the user closes the update dialog when the package was already downloaded instead of click the "install" button, app will not be shown again as we don't receive any other event from WinSparkle.

When the updater finishes (closed by the user or installation starts) we would like run some checks after closing, but I don't see such behavior in this specific case above described.

We are using:

  • WinSparkle V0.8.1
  • Windows 11 Pro - Build 22631.3447

I took the liberty to check how was the "quit" behavior programmed and check how it would fit our needs. I found that in the void UpdateDialog::OnClose(wxCloseEvent&) method, at the end, there's an if preventing ApplicationController::NotifyUpdateCancelled(); to be called if an update was already downloaded. I didn't want to mess with the current behavior of the library so I did just create a new event that will be executed always on WinSparkle update closed (yes, even when it closes successfully). This way I can suscribe to that behavior with a callback and do what I need to do without affecting the rest of usages.

I will submit a PR with the changes, what do you think?

Thanks in advance,
Bruno Bibbó

@vslavik
Copy link
Owner

vslavik commented May 10, 2024

Duplicate of #127.

PRs are always welcome.

@vslavik vslavik closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2024
@BrunoBibboVoicemod
Copy link
Author

You're right, didn't saw the issue. PR submitted with the new callback method suggestion. Thanks!

vslavik added a commit that referenced this issue Jun 20, 2024
Make sure that the callback function set with
win_sparkle_set_update_cancelled_callback() is called even when the user
just closes the window without clicking any button. Previously, this
wouldn't be done.

Do the same for the similar win_sparkle_set_update_dismissed_callback().

Document the difference between the two more clearly.

Fixes #127, fixes #271.
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

2 participants