diff options
author | Sakari Bergen <sakari.bergen@beatwaves.net> | 2009-05-02 20:26:11 +0000 |
---|---|---|
committer | Sakari Bergen <sakari.bergen@beatwaves.net> | 2009-05-02 20:26:11 +0000 |
commit | 7e48118bf16702dc174875510b935f37290d56a7 (patch) | |
tree | 177e5c3e772a399eac11129ac4c16e42ed120427 /libs | |
parent | c7733b443ac6174f3dc795a4c89f4c2c59d1d90e (diff) |
* Fix tooltips in the session import dialog
* Fix arval to run from all directories
git-svn-id: svn://localhost/ardour2/branches/3.0@5028 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/audio_region_importer.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/element_importer.h | 6 | ||||
-rw-r--r-- | libs/ardour/audio_region_importer.cc | 17 |
3 files changed, 14 insertions, 11 deletions
diff --git a/libs/ardour/ardour/audio_region_importer.h b/libs/ardour/ardour/audio_region_importer.h index 03067c465d..ec70627428 100644 --- a/libs/ardour/ardour/audio_region_importer.h +++ b/libs/ardour/ardour/audio_region_importer.h @@ -76,6 +76,7 @@ class AudioRegionImporter : public ElementImporter // Interface implementation string get_info () const; + Session::ImportStatus * get_import_status () { return &status; } // other stuff void add_sources_to_session (); @@ -93,6 +94,7 @@ class AudioRegionImporter : public ElementImporter PBD::ID old_id; PBD::ID id; std::list<string> filenames; + Session::ImportStatus status; bool parse_xml_region (); bool parse_source_xml (); diff --git a/libs/ardour/ardour/element_importer.h b/libs/ardour/ardour/element_importer.h index 0a2d5d3fb3..04f46f7a03 100644 --- a/libs/ardour/ardour/element_importer.h +++ b/libs/ardour/ardour/element_importer.h @@ -27,14 +27,13 @@ #include <sigc++/signal.h> #include "ardour/types.h" +#include "ardour/session.h" using std::string; class XMLTree; namespace ARDOUR { -class Session; - /// Virtual interface class for element importers class ElementImporter { @@ -53,6 +52,9 @@ class ElementImporter */ virtual string get_info () const = 0; + /** Gets import status, if applicable. */ + virtual Session::ImportStatus * get_import_status () { return 0; } + /** Prepares to move element * * @return whther or not the element could be prepared for moving diff --git a/libs/ardour/audio_region_importer.cc b/libs/ardour/audio_region_importer.cc index bea61d81e3..90fc7bac4d 100644 --- a/libs/ardour/audio_region_importer.cc +++ b/libs/ardour/audio_region_importer.cc @@ -336,23 +336,22 @@ AudioRegionImporter::prepare_sources () return; } - Session::ImportStatus status; + status.total = 0; + status.replace_existing_source = false; + status.done = false; + status.cancel = false; + status.freeze = false; + status.progress = 0.0; + status.quality = SrcBest; // TODO other qualities also // Get sources that still need to be imported for (std::list<string>::iterator it = filenames.begin(); it != filenames.end(); ++it) { if (!handler.check_source (*it)) { status.paths.push_back (*it); + status.total++; } } - // Prepare rest of import struct TODO quality - status.replace_existing_source = false; - status.done = false; - status.cancel = false; - status.freeze = false; - status.progress = 0.0; - status.quality = SrcBest; - // import files // TODO: threading & exception handling session.import_audiofiles (status); |