Project directory structure
Jef Driesen
jefdriesen at telenet.be
Thu Apr 4 05:26:21 PDT 2013
On 2013-04-03 23:01, Thiago Macieira wrote:
> I assumed above that the progress would go from 0 to 100 (percent).
> Another
> way of doing this is to go from 0 to the number of dives. In that
> case, the
> constructor would set a dummy maximum. The real maximum would be set
> later.
>
> We can make it more complex if we want to, if we need to wait for the
> thread
> to tell us how many dives there are.
This isn't possible. The actual number of dives is only known after the
download has finished. This is by design. Many dive computer
communication protocols simply don't support retrieving the number of
dives in advance. However the libdivecomputer progress events are as
accurate as the protocol allows, so the best option is to just rely on
those for showing a progress bar.
Jef
More information about the subsurface
mailing list