summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-26 15:58:44 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-26 15:58:44 +0100
commita650e785467a9d7784d2ece4a477acd8cfa9181a (patch)
tree43d5f2c254a437158160f1b93c90a7b5744b17f0 /src/tools
parentf7c9b384e63dd8917b619d1a66b0cc95c3bf5649 (diff)
Try to improve new film a bit.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dvdomatic.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/tools/dvdomatic.cc b/src/tools/dvdomatic.cc
index 01f4cd591..131f0bd71 100644
--- a/src/tools/dvdomatic.cc
+++ b/src/tools/dvdomatic.cc
@@ -29,6 +29,7 @@
#include "wx/job_wrapper.h"
//#include "gtk/dvd_title_dialog.h"
#include "wx/wx_util.h"
+#include "wx/new_film_dialog.h"
#include "lib/film.h"
#include "lib/format.h"
#include "lib/config.h"
@@ -248,20 +249,21 @@ public:
void file_new (wxCommandEvent &)
{
- wxDirDialog* c = new wxDirDialog (this, wxT ("New Film"), wxStandardPaths::Get().GetDocumentsDir());
- int const r = c->ShowModal ();
- c->Destroy ();
+ NewFilmDialog* d = new NewFilmDialog (this);
+ int const r = d->ShowModal ();
if (r == wxID_OK) {
maybe_save_then_delete_film ();
- film = new Film (wx_to_std (c->GetPath ()));
+ film = new Film (d->get_path (), false);
#if BOOST_FILESYSTEM_VERSION == 3
- film->set_name (filesystem::path (wx_to_std (c->GetPath())).filename().generic_string());
+ film->set_name (filesystem::path (d->get_path()).filename().generic_string());
#else
- film->set_name (filesystem::path (wx_to_std (c->GetPath())).filename());
+ film->set_name (filesystem::path (d->get_path()).filename());
#endif
set_film ();
}
+
+ d->Destroy ();
}
void file_open (wxCommandEvent &)