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
[rar] add a callback class for unrarlib rather than calling into guilib #5000
Conversation
Yep, that will do. Thanks. |
Oh, needs testing ofc - I didn't do any at all :p |
OK, will give it a chance around the weekend. |
Looks good and works for me, thanks. Not sure if 200 ms is enough for slower hardware though or if we should make it adjustable to get an consistent UX. @popcornmix what's again the timings for rar stuff on the PI? |
Doesn't seem to calculate percentage correctly. |
My bet is it did it before this change as well? Can't see how the percentage is calculated any differently here at least? |
I was wrong about the negative, I think it's just a "-" used as a separator. Without this PR the progress bar stays up for many seconds and updates from 0 to 100%. Looks like this PR makes the rar extraction fail:
Log without this PR: http://paste.ubuntu.com/7784423/ |
That's weird. I have no such filerar::open issues here. All external (rarred) subs are detected properly. |
} | ||
bool progress(int progress, const char *text) | ||
{ | ||
bool cancel(true); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Defaulting to cancel = false is probably the reason for the failures :) |
Updated - should be all good now. @popcornmix mind testing when you have a few? |
Fails again.
But progress returns true if cancelled. Tested with progress returning "!cancel" and it behaves as desired. |
Ah, I switched the wrong bool. I'll add some doxy about what it's supposed to do then make sure it does it. While paying attention this time :) |
@popcornmix, @mkortstiege updated - pretty confident this time (3rd, 4th times the charm?) |
…ib direct from UnrarXLib
…hread-safe without messing about with graphicscontext
rebased. jenkins build this please |
Works. Jenkins build failure is unrelated.. Android slave has problems as it seems. |
Looks okay to me. |
[rar] add a callback class for unrarlib rather than calling into guilib
We don't want to call into guilib directly from unrarlib, so this does the same as what we were doing (though with a 200ms delay) via a callback class.
@mkortstiege This should be pretty equivalent to what we already have in master. i.e. it is useful as a base from which to make further changes, such as increasing the time before display, or switching to busy dialog etc.