From 516c6168fed63a5970f7f51669081253a7530438 Mon Sep 17 00:00:00 2001 From: Sakari Bergen Date: Sat, 11 Oct 2008 14:37:01 +0000 Subject: [PATCH] * Region export dialog does not lose export settings (Do not serialize into instant xml) * Remove old export related files git-svn-id: svn://localhost/ardour2/branches/3.0@3924 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/export_region_dialog.cc | 76 --------------------------- gtk2_ardour/export_region_dialog.h | 43 --------------- gtk2_ardour/export_session_dialog.cc | 57 -------------------- gtk2_ardour/export_session_dialog.h | 37 ------------- libs/ardour/export_profile_manager.cc | 2 + 5 files changed, 2 insertions(+), 213 deletions(-) delete mode 100644 gtk2_ardour/export_region_dialog.cc delete mode 100644 gtk2_ardour/export_region_dialog.h delete mode 100644 gtk2_ardour/export_session_dialog.cc delete mode 100644 gtk2_ardour/export_session_dialog.h diff --git a/gtk2_ardour/export_region_dialog.cc b/gtk2_ardour/export_region_dialog.cc deleted file mode 100644 index f73b990880..0000000000 --- a/gtk2_ardour/export_region_dialog.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Author: Andre Raue - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include - -#include -#include - -#include "export_region_dialog.h" - -#include "i18n.h" - - -ExportRegionDialog::ExportRegionDialog (PublicEditor& editor, boost::shared_ptr reg) - : ExportDialog(editor) - , region(reg) -{ - assert(region); - - set_title (_("Ardour: Export Region")); - file_frame.set_label (_("Export to File")), - - do_not_allow_track_and_master_selection(); - do_not_allow_channel_count_selection(); -} - - -void -ExportRegionDialog::export_data() -{ - pthread_t thr; - pthread_create_and_store ("region export", &thr, 0, ExportRegionDialog::_export_region_thread, this); - - gtk_main_iteration (); - while (spec.running) { - if (gtk_events_pending()) { - gtk_main_iteration (); - } else { - usleep (10000); - } - } -} - - -void* -ExportRegionDialog::_export_region_thread (void *arg) -{ - PBD::ThreadCreated (pthread_self(), X_("Export Region")); - - static_cast(arg)->export_region (); - return 0; -} - -void -ExportRegionDialog::export_region () -{ - region->exportme (getSession(), spec); -} - diff --git a/gtk2_ardour/export_region_dialog.h b/gtk2_ardour/export_region_dialog.h deleted file mode 100644 index 95c721bed0..0000000000 --- a/gtk2_ardour/export_region_dialog.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright (C) 2006 Andre Raue - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __export_region_dialog_h__ -#define __export_region_dialog_h__ - -#include "ardour_ui.h" -#include "export_dialog.h" - - -class ExportRegionDialog : public ExportDialog -{ - public: - ExportRegionDialog (PublicEditor&, boost::shared_ptr); - - static void* _export_region_thread (void *); - void export_region (); - - protected: - void export_data(); - - private: - boost::shared_ptr region; -}; - - -#endif // __export_region_dialog_h__ diff --git a/gtk2_ardour/export_session_dialog.cc b/gtk2_ardour/export_session_dialog.cc deleted file mode 100644 index 4226a7e7ee..0000000000 --- a/gtk2_ardour/export_session_dialog.cc +++ /dev/null @@ -1,57 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - Author: Andre Raue - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "ardour_ui.h" -#include "export_session_dialog.h" - -#include "i18n.h" - -ExportSessionDialog::ExportSessionDialog (PublicEditor& editor) - : ExportDialog(editor) -{ - file_frame.set_label (_("Export to File")); -} - -void -ExportSessionDialog::export_data () -{ - if (getSession().start_export (spec)) { - return; - } - - gtk_main_iteration (); - while (spec.running) { - if (gtk_events_pending()) { - gtk_main_iteration (); - } else { - usleep (10000); - } - } -} - - -void -ExportSessionDialog::set_range (nframes_t start, nframes_t end) -{ - ExportDialog::set_range (start, end); - - // XXX: this is a hack until we figure out what is really wrong - getSession().request_locate (spec.start_frame, false); -} diff --git a/gtk2_ardour/export_session_dialog.h b/gtk2_ardour/export_session_dialog.h deleted file mode 100644 index a6e118fc85..0000000000 --- a/gtk2_ardour/export_session_dialog.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (C) 2006 Andre Raue - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __export_session_dialog_h__ -#define __export_session_dialog_h__ - -#include "export_dialog.h" - - -class ExportSessionDialog : public ExportDialog -{ - public: - ExportSessionDialog (PublicEditor&); - void set_range (nframes_t start, nframes_t end); - - protected: - void export_data(); -}; - - -#endif // __export_session_dialog_h__ diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc index 86b586d8e0..1d1c66665f 100644 --- a/libs/ardour/export_profile_manager.cc +++ b/libs/ardour/export_profile_manager.cc @@ -94,6 +94,8 @@ ExportProfileManager::ExportProfileManager (Session & s) : ExportProfileManager::~ExportProfileManager () { + if (single_range_mode) { return; } + XMLNode * instant_xml (new XMLNode ("ExportProfile")); serialize_profile (*instant_xml); session.add_instant_xml (*instant_xml, false);