+2014-08-31 Carl Hetherington <cth@carlh.net>
+
+ * Allow drag-and-drop of files onto the content list (#395).
+
2014-08-29 Carl Hetherington <cth@carlh.net>
* Some improvements to the manual.
_content->Bind (wxEVT_COMMAND_LIST_ITEM_SELECTED, boost::bind (&FilmEditor::content_selection_changed, this));
_content->Bind (wxEVT_COMMAND_LIST_ITEM_DESELECTED, boost::bind (&FilmEditor::content_selection_changed, this));
_content->Bind (wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, boost::bind (&FilmEditor::content_right_click, this, _1));
+ _content->Bind (wxEVT_DROP_FILES, boost::bind (&FilmEditor::content_files_dropped, this, _1));
_content_add_file->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::content_add_file_clicked, this));
_content_add_folder->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::content_add_folder_clicked, this));
_content_remove->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&FilmEditor::content_remove_clicked, this));
_panels.push_back (_subtitle_panel);
_timing_panel = new TimingPanel (this);
_panels.push_back (_timing_panel);
+
+ _content->DragAcceptFiles (true);
}
/** Called when the name widget has been changed */
_frame_rate_sizer->Layout ();
}
+
+void
+FilmEditor::content_files_dropped (wxDropFilesEvent& event)
+{
+ if (!_film) {
+ return;
+ }
+
+ wxString* paths = event.GetFiles ();
+ for (int i = 0; i < event.GetNumberOfFiles(); i++) {
+ _film->examine_and_add_content (content_factory (_film, wx_to_std (paths[i])));
+ }
+}
void content_remove_clicked ();
void content_earlier_clicked ();
void content_later_clicked ();
+ void content_files_dropped (wxDropFilesEvent& event);
void container_changed ();
void dcp_content_type_changed ();
void scaler_changed ();