mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Prepare for FileArchive progress API update
This commit is contained in:
parent
d2b24e8689
commit
b5d3ef68bf
2 changed files with 1 additions and 10 deletions
|
|
@ -174,7 +174,7 @@ LibraryDownloadDialog::install (std::string const & path, Gtk::TreePath const &
|
||||||
std::string destdir = Glib::path_get_dirname (path);
|
std::string destdir = Glib::path_get_dirname (path);
|
||||||
|
|
||||||
inflater = new Inflater (path, destdir);
|
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 */
|
inflater->start (); /* starts unpacking in a thread */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -473,13 +473,6 @@ accept_all_files (string const &, void *)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_set_progress (Progress* p, size_t n, size_t t)
|
|
||||||
{
|
|
||||||
p->set_progress (float (n) / float(t));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TemplateManager::export_all_templates ()
|
TemplateManager::export_all_templates ()
|
||||||
{
|
{
|
||||||
|
|
@ -564,7 +557,6 @@ TemplateManager::export_all_templates ()
|
||||||
|
|
||||||
PBD::FileArchive ar (filename);
|
PBD::FileArchive ar (filename);
|
||||||
PBD::ScopedConnectionList progress_connection;
|
PBD::ScopedConnectionList progress_connection;
|
||||||
ar.progress.connect_same_thread (progress_connection, boost::bind (&_set_progress, this, _1, _2));
|
|
||||||
ar.create (filemap);
|
ar.create (filemap);
|
||||||
|
|
||||||
PBD::remove_directory (tmpdir);
|
PBD::remove_directory (tmpdir);
|
||||||
|
|
@ -593,7 +585,6 @@ TemplateManager::import_template_set ()
|
||||||
|
|
||||||
FileArchive ar (dialog.get_filename ());
|
FileArchive ar (dialog.get_filename ());
|
||||||
PBD::ScopedConnectionList progress_connection;
|
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()) {
|
for (std::string fn = ar.next_file_name(); !fn.empty(); fn = ar.next_file_name()) {
|
||||||
const size_t pos = fn.find (templates_dir_basename ());
|
const size_t pos = fn.find (templates_dir_basename ());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue