#include "ardour/export_format_specification.h"
#include "ardour/export_profile_manager.h"
-#include "ardour/session.h"
#include "i18n.h"
/* Format combo */
format_list = Gtk::ListStore::create (format_cols);
+ format_list->set_sort_column (format_cols.label, Gtk::SORT_ASCENDING);
format_combo.set_model (format_list);
format_combo.pack_start (format_cols.label);
format_combo.set_active (0);
void
ExportFormatSelector::set_state (ARDOUR::ExportProfileManager::FormatStatePtr const state_, ARDOUR::Session * session_)
{
- session = session_;
+ SessionHandlePtr::set_session (session_);
+
state = state_;
update_format_list ();
tree_it->set_value (format_cols.label, (*it)->description());
}
- if (format_combo.get_active_row_number() == -1) {
+ if (format_combo.get_active_row_number() == -1 && format_combo.get_model()->children().size() > 0) {
format_combo.set_active (0);
}
ExportFormatSelector::open_edit_dialog (bool new_dialog)
{
ExportFormatDialog dialog (state->format, new_dialog);
- dialog.set_session (session);
+ dialog.set_session (_session);
Gtk::ResponseType response = (Gtk::ResponseType) dialog.run();
if (response == Gtk::RESPONSE_APPLY) {
update_format_description ();