+void
+Controls::save_clicked ()
+{
+ wxFileDialog* d = new wxFileDialog (
+ this, _("Select playlist file"), wxEmptyString, wxEmptyString, wxT ("XML files (*.xml)|*.xml"),
+ wxFD_SAVE | wxFD_OVERWRITE_PROMPT
+ );
+
+ if (d->ShowModal() == wxID_OK) {
+ _spl.as_xml (boost::filesystem::path(wx_to_std(d->GetPath())));
+ }
+
+ d->Destroy ();
+}
+
+void
+Controls::load_clicked ()
+{
+ wxFileDialog* d = new wxFileDialog (
+ this, _("Select playlist file"), wxEmptyString, wxEmptyString, wxT ("XML files (*.xml)|*.xml")
+ );
+
+ if (d->ShowModal() == wxID_OK) {
+ _spl = SPL (boost::filesystem::path(wx_to_std(d->GetPath())));
+ _spl_view->DeleteAllItems ();
+ BOOST_FOREACH (SPLEntry i, _spl.playlist) {
+ add_cpl_to_list (i.cpl, _spl_view);
+ }
+ SPLChanged (_spl);
+ }
+
+ d->Destroy ();
+}
+