return;
}
- if (change == SignalSPL::Change::NAME) {
+ switch (change) {
+ case SignalSPL::Change::NAME:
+ {
int N = 0;
for (auto i: _playlists) {
if (i == playlist) {
}
++N;
}
+ break;
+ }
+ case SignalSPL::Change::CONTENT:
+ if (auto dir = Config::instance()->player_playlist_directory()) {
+ playlist->write(*dir / (playlist->id() + ".xml"));
+ }
+ break;
}
}
_down->Bind (wxEVT_BUTTON, bind(&PlaylistContent::down_clicked, this));
_add->Bind (wxEVT_BUTTON, bind(&PlaylistContent::add_clicked, this));
_remove->Bind (wxEVT_BUTTON, bind(&PlaylistContent::remove_clicked, this));
+
+ setup_sensitivity();
}
wxSizer* sizer ()
_playlist_list->Edit.connect (bind(&DOMFrame::change_playlist, this, _1));
- _playlist_content->set (_playlist_list->first_playlist());
-
Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_exit, this), wxID_EXIT);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::help_about, this), wxID_ABOUT);
Bind (wxEVT_MENU, boost::bind (&DOMFrame::edit_preferences, this), wxID_PREFERENCES);