diff --git a/gtk2_ardour/library_download_dialog.cc b/gtk2_ardour/library_download_dialog.cc index ad39a4cf2d..940de8367b 100644 --- a/gtk2_ardour/library_download_dialog.cc +++ b/gtk2_ardour/library_download_dialog.cc @@ -174,12 +174,12 @@ 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, path, treepath), gui_context()); inflater->start (); /* starts unpacking in a thread */ } void -LibraryDownloadDialog::install_progress (size_t nread, size_t total, std::string path, Gtk::TreePath treepath) +LibraryDownloadDialog::install_progress (float p, std::string path, Gtk::TreePath treepath) { Gtk::TreeModel::iterator row = _model->get_iter (treepath); @@ -192,7 +192,7 @@ LibraryDownloadDialog::install_progress (size_t nread, size_t total, std::string return; } - (*row)[_columns.progress] = (int) round ((double) nread / total); + (*row)[_columns.progress] = (int) round (100.0 * p); } void diff --git a/gtk2_ardour/library_download_dialog.h b/gtk2_ardour/library_download_dialog.h index afe7444b2b..d32beb5f6d 100644 --- a/gtk2_ardour/library_download_dialog.h +++ b/gtk2_ardour/library_download_dialog.h @@ -112,7 +112,7 @@ class LibraryDownloadDialog : public ArdourDialog PBD::Inflater* inflater; void install (std::string const & path, Gtk::TreePath const & treepath); - void install_progress (size_t, size_t, std::string, Gtk::TreePath); + void install_progress (float, std::string, Gtk::TreePath); void install_finished (Gtk::TreeModel::iterator row, std::string path, int status); PBD::ScopedConnection install_connection; diff --git a/gtk2_ardour/template_dialog.cc b/gtk2_ardour/template_dialog.cc index 2ddb3eef68..9e26a2ee18 100644 --- a/gtk2_ardour/template_dialog.cc +++ b/gtk2_ardour/template_dialog.cc @@ -555,7 +555,7 @@ TemplateManager::export_all_templates () _current_action = _("Exporting templates"); - PBD::FileArchive ar (filename); + PBD::FileArchive ar (filename, this); PBD::ScopedConnectionList progress_connection; ar.create (filemap); @@ -583,7 +583,7 @@ TemplateManager::import_template_set () _current_action = _("Importing templates"); - FileArchive ar (dialog.get_filename ()); + FileArchive ar (dialog.get_filename (), this); PBD::ScopedConnectionList progress_connection; for (std::string fn = ar.next_file_name(); !fn.empty(); fn = ar.next_file_name()) {