13
0

Prepare for FileArchive progress API update

This commit is contained in:
Robin Gareus 2023-05-18 20:51:33 +02:00
parent d2b24e8689
commit b5d3ef68bf
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 1 additions and 10 deletions

View File

@ -174,7 +174,7 @@ LibraryDownloadDialog::install (std::string const & path, Gtk::TreePath const &
std::string destdir = Glib::path_get_dirname (path);
inflater = new Inflater (path, destdir);
inflater->progress.connect (install_connection, invalidator(*this), boost::bind (&LibraryDownloadDialog::install_progress, this, _1, _2, path, treepath), gui_context());
//inflater->progress.connect (install_connection, invalidator(*this), boost::bind (&LibraryDownloadDialog::install_progress, this, _1, _2, path, treepath), gui_context());
inflater->start (); /* starts unpacking in a thread */
}

View File

@ -473,13 +473,6 @@ accept_all_files (string const &, void *)
return true;
}
static void
_set_progress (Progress* p, size_t n, size_t t)
{
p->set_progress (float (n) / float(t));
}
void
TemplateManager::export_all_templates ()
{
@ -564,7 +557,6 @@ TemplateManager::export_all_templates ()
PBD::FileArchive ar (filename);
PBD::ScopedConnectionList progress_connection;
ar.progress.connect_same_thread (progress_connection, boost::bind (&_set_progress, this, _1, _2));
ar.create (filemap);
PBD::remove_directory (tmpdir);
@ -593,7 +585,6 @@ TemplateManager::import_template_set ()
FileArchive ar (dialog.get_filename ());
PBD::ScopedConnectionList progress_connection;
ar.progress.connect_same_thread (progress_connection, boost::bind (&_set_progress, this, _1, _2));
for (std::string fn = ar.next_file_name(); !fn.empty(); fn = ar.next_file_name()) {
const size_t pos = fn.find (templates_dir_basename ());