}
}
- set_directory (result.string ());
+ set_directory (result);
_log.reset (new FileLog (file ("log")));
_playlist->set_sequence_video (_sequence_video);
void
Film::write_metadata () const
{
- if (!boost::filesystem::exists (directory())) {
- boost::filesystem::create_directory (directory());
+ if (!boost::filesystem::exists (directory ())) {
+ boost::filesystem::create_directory (directory ());
}
LocaleGuard lg;
- boost::filesystem::create_directories (directory());
+ boost::filesystem::create_directories (directory ());
xmlpp::Document doc;
xmlpp::Element* root = doc.create_root_node ("Metadata");
void
-Film::set_directory (string d)
+Film::set_directory (boost::filesystem::path d)
{
_directory = d;
_dirty = true;
shared_ptr<const Signer> signer = make_signer ();
/* Find the DCP to make the KDM for */
- string const dir = this->directory ();
+ boost::filesystem::path const dir = this->directory ();
list<boost::filesystem::path> dcps;
for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator(dir); i != boost::filesystem::directory_iterator(); ++i) {
if (
/* GET */
- std::string directory () const {
+ boost::filesystem::path directory () const {
return _directory;
}
/* SET */
- void set_directory (std::string);
+ void set_directory (boost::filesystem::path);
void set_name (std::string);
void set_use_dci_name (bool);
void examine_and_add_content (boost::shared_ptr<Content>);
/** Complete path to directory containing the film metadata;
* must not be relative.
*/
- std::string _directory;
+ boost::filesystem::path _directory;
/** Name for DCP-o-matic */
std::string _name;
set_menu_sensitivity ();
}
- void file_changed (string f)
+ void file_changed (boost::filesystem::path f)
{
stringstream s;
s << wx_to_std (_("DCP-o-matic"));
if (!f.empty ()) {
- s << " - " << f;
+ s << " - " << f.string ();
}
SetTitle (std_to_wx (s.str()));
#else
int r = system ("which nautilus");
if (WEXITSTATUS (r) == 0) {
- r = system (string ("nautilus " + film->directory()).c_str ());
+ r = system (string ("nautilus " + film->directory().string()).c_str ());
if (WEXITSTATUS (r)) {
error_dialog (this, _("Could not show DCP (could not run nautilus)"));
}
} else {
int r = system ("which konqueror");
if (WEXITSTATUS (r) == 0) {
- r = system (string ("konqueror " + film->directory()).c_str ());
+ r = system (string ("konqueror " + film->directory().string()).c_str ());
if (WEXITSTATUS (r)) {
error_dialog (this, _("Could not show DCP (could not run konqueror)"));
}
void set_film (boost::shared_ptr<Film>);
void set_selection (boost::weak_ptr<Content>);
- boost::signals2::signal<void (std::string)> FileChanged;
+ boost::signals2::signal<void (boost::filesystem::path)> FileChanged;
/* Stuff for panels */