mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-29 01:47:43 +01:00
Implement FileArchive progress/cancel
* Use PBD::Progress API * Allow to cancel extraction and compression * Fix querying download size
This commit is contained in:
parent
2cb4e8a6ca
commit
c9929698ee
4 changed files with 82 additions and 69 deletions
|
|
@ -27,7 +27,7 @@
|
|||
using namespace PBD;
|
||||
|
||||
Inflater::Inflater (std::string const & ap, std::string const & dd)
|
||||
: FileArchive (ap)
|
||||
: FileArchive (ap, this)
|
||||
, thread (0)
|
||||
, _status (-1) /* means "unknown" */
|
||||
, archive_path (ap)
|
||||
|
|
@ -51,8 +51,6 @@ Inflater::start ()
|
|||
void
|
||||
Inflater::threaded_inflate ()
|
||||
{
|
||||
require_progress ();
|
||||
|
||||
try {
|
||||
std::string pwd (Glib::get_current_dir ());
|
||||
|
||||
|
|
@ -72,6 +70,11 @@ Inflater::threaded_inflate ()
|
|||
* set to be >= 0
|
||||
*/
|
||||
|
||||
progress (1, 1);
|
||||
set_progress (1);
|
||||
}
|
||||
|
||||
void
|
||||
Inflater::set_overall_progress (float p)
|
||||
{
|
||||
Progress (p); /* EMIT SIGNAL */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue