mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
NO-OP: clang-indent
This commit is contained in:
parent
f0cb8e54c3
commit
08b169f17b
2 changed files with 133 additions and 140 deletions
|
|
@ -33,19 +33,16 @@
|
||||||
|
|
||||||
using namespace ARDOUR;
|
using namespace ARDOUR;
|
||||||
|
|
||||||
ExportFilenameSelector::ExportFilenameSelector () :
|
ExportFilenameSelector::ExportFilenameSelector ()
|
||||||
include_label ("", Gtk::ALIGN_LEFT),
|
: include_label ("", Gtk::ALIGN_LEFT)
|
||||||
|
, label_label (_("Label:"), Gtk::ALIGN_LEFT)
|
||||||
label_label (_("Label:"), Gtk::ALIGN_LEFT),
|
, timespan_checkbox (_("Timespan Name"))
|
||||||
timespan_checkbox (_("Timespan Name")),
|
, revision_checkbox (_("Revision:"))
|
||||||
revision_checkbox (_("Revision:")),
|
, path_label (_("Folder:"), Gtk::ALIGN_LEFT)
|
||||||
|
, browse_button (_("Browse"))
|
||||||
path_label (_("Folder:"), Gtk::ALIGN_LEFT),
|
, open_button (_("Open Folder"))
|
||||||
browse_button (_("Browse")),
|
, example_filename_label ("", Gtk::ALIGN_LEFT)
|
||||||
open_button (_("Open Folder")),
|
, _require_timespan (false)
|
||||||
|
|
||||||
example_filename_label ("", Gtk::ALIGN_LEFT),
|
|
||||||
_require_timespan (false)
|
|
||||||
{
|
{
|
||||||
include_label.set_markup (_("Build filename(s) from these components:"));
|
include_label.set_markup (_("Build filename(s) from these components:"));
|
||||||
|
|
||||||
|
|
@ -87,7 +84,7 @@ ExportFilenameSelector::ExportFilenameSelector () :
|
||||||
date_format_combo.set_model (date_format_list);
|
date_format_combo.set_model (date_format_list);
|
||||||
date_format_combo.pack_start (date_format_cols.label);
|
date_format_combo.pack_start (date_format_cols.label);
|
||||||
|
|
||||||
date_format_combo.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_date_format));
|
date_format_combo.signal_changed ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_date_format));
|
||||||
|
|
||||||
/* Time */
|
/* Time */
|
||||||
|
|
||||||
|
|
@ -95,7 +92,7 @@ ExportFilenameSelector::ExportFilenameSelector () :
|
||||||
time_format_combo.set_model (time_format_list);
|
time_format_combo.set_model (time_format_list);
|
||||||
time_format_combo.pack_start (time_format_cols.label);
|
time_format_combo.pack_start (time_format_cols.label);
|
||||||
|
|
||||||
time_format_combo.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_time_format));
|
time_format_combo.signal_changed ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_time_format));
|
||||||
|
|
||||||
/* Revision */
|
/* Revision */
|
||||||
|
|
||||||
|
|
@ -106,23 +103,22 @@ ExportFilenameSelector::ExportFilenameSelector () :
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
|
|
||||||
label_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_label));
|
label_entry.signal_changed ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_label));
|
||||||
path_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_folder));
|
path_entry.signal_changed ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_folder));
|
||||||
path_entry.signal_activate().connect (sigc::mem_fun (*this, &ExportFilenameSelector::check_folder), false);
|
path_entry.signal_activate ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::check_folder), false);
|
||||||
|
|
||||||
session_snap_name.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_session_selection));
|
session_snap_name.signal_changed ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_session_selection));
|
||||||
timespan_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_timespan_selection));
|
timespan_checkbox.signal_toggled ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_timespan_selection));
|
||||||
|
|
||||||
revision_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_revision_selection));
|
revision_checkbox.signal_toggled ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_revision_selection));
|
||||||
revision_spinbutton.signal_value_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_revision_value));
|
revision_spinbutton.signal_value_changed ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_revision_value));
|
||||||
|
|
||||||
browse_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportFilenameSelector::open_browse_dialog));
|
browse_button.signal_clicked ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::open_browse_dialog));
|
||||||
open_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportFilenameSelector::open_folder));
|
open_button.signal_clicked ().connect (sigc::mem_fun (*this, &ExportFilenameSelector::open_folder));
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportFilenameSelector::~ExportFilenameSelector ()
|
ExportFilenameSelector::~ExportFilenameSelector ()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -132,7 +128,7 @@ ExportFilenameSelector::load_state ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
label_entry.set_text (filename->include_label ? filename->get_label() : "");
|
label_entry.set_text (filename->include_label ? filename->get_label () : "");
|
||||||
if (filename->include_session) {
|
if (filename->include_session) {
|
||||||
if (filename->use_session_snapshot_name) {
|
if (filename->use_session_snapshot_name) {
|
||||||
session_snap_name.set_active (2);
|
session_snap_name.set_active (2);
|
||||||
|
|
@ -144,26 +140,26 @@ ExportFilenameSelector::load_state ()
|
||||||
}
|
}
|
||||||
timespan_checkbox.set_active (filename->include_timespan);
|
timespan_checkbox.set_active (filename->include_timespan);
|
||||||
revision_checkbox.set_active (filename->include_revision);
|
revision_checkbox.set_active (filename->include_revision);
|
||||||
revision_spinbutton.set_value (filename->get_revision());
|
revision_spinbutton.set_value (filename->get_revision ());
|
||||||
path_entry.set_text (filename->get_folder());
|
path_entry.set_text (filename->get_folder ());
|
||||||
|
|
||||||
Gtk::TreeModel::Children::iterator it;
|
Gtk::TreeModel::Children::iterator it;
|
||||||
|
|
||||||
for (it = date_format_list->children().begin(); it != date_format_list->children().end(); ++it) {
|
for (it = date_format_list->children ().begin (); it != date_format_list->children ().end (); ++it) {
|
||||||
if (it->get_value (date_format_cols.format) == filename->get_date_format()) {
|
if (it->get_value (date_format_cols.format) == filename->get_date_format ()) {
|
||||||
date_format_combo.set_active (it);
|
date_format_combo.set_active (it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (it = time_format_list->children().begin(); it != time_format_list->children().end(); ++it) {
|
for (it = time_format_list->children ().begin (); it != time_format_list->children ().end (); ++it) {
|
||||||
if (it->get_value (time_format_cols.format) == filename->get_time_format()) {
|
if (it->get_value (time_format_cols.format) == filename->get_time_format ()) {
|
||||||
time_format_combo.set_active (it);
|
time_format_combo.set_active (it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ExportFilenameSelector::set_state (ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session * session_)
|
ExportFilenameSelector::set_state (ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session* session_)
|
||||||
{
|
{
|
||||||
SessionHandlePtr::set_session (session_);
|
SessionHandlePtr::set_session (session_);
|
||||||
|
|
||||||
|
|
@ -172,60 +168,59 @@ ExportFilenameSelector::set_state (ARDOUR::ExportProfileManager::FilenameStatePt
|
||||||
/* Fill combo boxes */
|
/* Fill combo boxes */
|
||||||
|
|
||||||
Gtk::TreeModel::iterator iter;
|
Gtk::TreeModel::iterator iter;
|
||||||
Gtk::TreeModel::Row row;
|
Gtk::TreeModel::Row row;
|
||||||
|
|
||||||
/* Dates */
|
/* Dates */
|
||||||
|
|
||||||
date_format_list->clear();
|
date_format_list->clear ();
|
||||||
|
|
||||||
iter = date_format_list->append();
|
iter = date_format_list->append ();
|
||||||
row = *iter;
|
row = *iter;
|
||||||
row[date_format_cols.format] = ExportFilename::D_None;
|
row[date_format_cols.format] = ExportFilename::D_None;
|
||||||
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_None);
|
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_None);
|
||||||
|
|
||||||
iter = date_format_list->append();
|
iter = date_format_list->append ();
|
||||||
row = *iter;
|
row = *iter;
|
||||||
row[date_format_cols.format] = ExportFilename::D_ISO;
|
row[date_format_cols.format] = ExportFilename::D_ISO;
|
||||||
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_ISO);
|
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_ISO);
|
||||||
|
|
||||||
iter = date_format_list->append();
|
iter = date_format_list->append ();
|
||||||
row = *iter;
|
row = *iter;
|
||||||
row[date_format_cols.format] = ExportFilename::D_ISOShortY;
|
row[date_format_cols.format] = ExportFilename::D_ISOShortY;
|
||||||
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_ISOShortY);
|
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_ISOShortY);
|
||||||
|
|
||||||
iter = date_format_list->append();
|
iter = date_format_list->append ();
|
||||||
row = *iter;
|
row = *iter;
|
||||||
row[date_format_cols.format] = ExportFilename::D_BE;
|
row[date_format_cols.format] = ExportFilename::D_BE;
|
||||||
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_BE);
|
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_BE);
|
||||||
|
|
||||||
iter = date_format_list->append();
|
iter = date_format_list->append ();
|
||||||
row = *iter;
|
row = *iter;
|
||||||
row[date_format_cols.format] = ExportFilename::D_BEShortY;
|
row[date_format_cols.format] = ExportFilename::D_BEShortY;
|
||||||
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_BEShortY);
|
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_BEShortY);
|
||||||
|
|
||||||
/* Times */
|
/* Times */
|
||||||
|
|
||||||
time_format_list->clear();
|
time_format_list->clear ();
|
||||||
|
|
||||||
iter = time_format_list->append();
|
iter = time_format_list->append ();
|
||||||
row = *iter;
|
row = *iter;
|
||||||
row[time_format_cols.format] = ExportFilename::T_None;
|
row[time_format_cols.format] = ExportFilename::T_None;
|
||||||
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_None);
|
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_None);
|
||||||
|
|
||||||
iter = time_format_list->append();
|
iter = time_format_list->append ();
|
||||||
row = *iter;
|
row = *iter;
|
||||||
row[time_format_cols.format] = ExportFilename::T_NoDelim;
|
row[time_format_cols.format] = ExportFilename::T_NoDelim;
|
||||||
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_NoDelim);
|
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_NoDelim);
|
||||||
|
|
||||||
iter = time_format_list->append();
|
iter = time_format_list->append ();
|
||||||
row = *iter;
|
row = *iter;
|
||||||
row[time_format_cols.format] = ExportFilename::T_Delim;
|
row[time_format_cols.format] = ExportFilename::T_Delim;
|
||||||
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_Delim);
|
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_Delim);
|
||||||
|
|
||||||
/* Load state */
|
/* Load state */
|
||||||
|
|
||||||
load_state();
|
load_state ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -234,7 +229,7 @@ ExportFilenameSelector::set_example_filename (std::string filename)
|
||||||
if (filename == "") {
|
if (filename == "") {
|
||||||
example_filename_label.set_markup (_("<small><i>Sorry, no example filename can be shown at the moment</i></small>"));
|
example_filename_label.set_markup (_("<small><i>Sorry, no example filename can be shown at the moment</i></small>"));
|
||||||
} else {
|
} else {
|
||||||
example_filename_label.set_markup (string_compose(_("<i>Current (approximate) filename</i>: \"%1\""), filename));
|
example_filename_label.set_markup (string_compose (_("<i>Current (approximate) filename</i>: \"%1\""), filename));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -245,10 +240,10 @@ ExportFilenameSelector::update_label ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
filename->set_label (label_entry.get_text());
|
filename->set_label (label_entry.get_text ());
|
||||||
|
|
||||||
filename->include_label = !label_entry.get_text().empty();
|
filename->include_label = !label_entry.get_text ().empty ();
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -258,8 +253,8 @@ ExportFilenameSelector::update_folder ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
filename->set_folder (path_entry.get_text());
|
filename->set_folder (path_entry.get_text ());
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -269,13 +264,14 @@ ExportFilenameSelector::check_folder ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Glib::file_test (path_entry.get_text(), Glib::FILE_TEST_IS_DIR|Glib::FILE_TEST_EXISTS)) {
|
if (!Glib::file_test (path_entry.get_text (), Glib::FILE_TEST_IS_DIR | Glib::FILE_TEST_EXISTS)) {
|
||||||
Gtk::MessageDialog msg (string_compose (_("%1: this is only the directory/folder name, not the filename.\n\
|
Gtk::MessageDialog msg (string_compose (_("%1: this is only the directory/folder name, not the filename.\n"
|
||||||
The filename will be chosen from the information just above the folder selector."), path_entry.get_text()));
|
"The filename will be chosen from the information just above the folder selector."),
|
||||||
|
path_entry.get_text ()));
|
||||||
msg.run ();
|
msg.run ();
|
||||||
path_entry.set_text (Glib::path_get_dirname (path_entry.get_text()));
|
path_entry.set_text (Glib::path_get_dirname (path_entry.get_text ()));
|
||||||
filename->set_folder (path_entry.get_text());
|
filename->set_folder (path_entry.get_text ());
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -286,9 +282,9 @@ ExportFilenameSelector::change_date_format ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DateFormat format = date_format_combo.get_active()->get_value (date_format_cols.format);
|
DateFormat format = date_format_combo.get_active ()->get_value (date_format_cols.format);
|
||||||
filename->set_date_format (format);
|
filename->set_date_format (format);
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -298,9 +294,9 @@ ExportFilenameSelector::change_time_format ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TimeFormat format = time_format_combo.get_active()->get_value (time_format_cols.format);
|
TimeFormat format = time_format_combo.get_active ()->get_value (time_format_cols.format);
|
||||||
filename->set_time_format (format);
|
filename->set_time_format (format);
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -315,27 +311,18 @@ ExportFilenameSelector::update_timespan_sensitivity ()
|
||||||
{
|
{
|
||||||
bool implicit = _require_timespan;
|
bool implicit = _require_timespan;
|
||||||
|
|
||||||
if (!implicit
|
if (!implicit && !filename->include_session && !filename->include_label && !filename->include_revision && !filename->include_channel_config && !filename->include_channel && !filename->include_date && !filename->include_format_name) {
|
||||||
&& !filename->include_session
|
|
||||||
&& !filename->include_label
|
|
||||||
&& !filename->include_revision
|
|
||||||
&& !filename->include_channel_config
|
|
||||||
&& !filename->include_channel
|
|
||||||
&& !filename->include_date
|
|
||||||
&& !filename->include_format_name) {
|
|
||||||
implicit = true;
|
implicit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remember prev state, force enable if implicit active.
|
// remember prev state, force enable if implicit active.
|
||||||
if (implicit && !timespan_checkbox.get_inconsistent()) {
|
if (implicit && !timespan_checkbox.get_inconsistent ()) {
|
||||||
timespan_checkbox.set_inconsistent (true);
|
timespan_checkbox.set_inconsistent (true);
|
||||||
filename->include_timespan = true;
|
filename->include_timespan = true;
|
||||||
}
|
} else if (!implicit && timespan_checkbox.get_inconsistent ()) {
|
||||||
else if (!implicit && timespan_checkbox.get_inconsistent()) {
|
filename->include_timespan = timespan_checkbox.get_active ();
|
||||||
filename->include_timespan = timespan_checkbox.get_active();
|
|
||||||
timespan_checkbox.set_inconsistent (false);
|
timespan_checkbox.set_inconsistent (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -344,12 +331,12 @@ ExportFilenameSelector::change_timespan_selection ()
|
||||||
if (!filename) {
|
if (!filename) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (timespan_checkbox.get_inconsistent()) {
|
if (timespan_checkbox.get_inconsistent ()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
filename->include_timespan = timespan_checkbox.get_active();
|
filename->include_timespan = timespan_checkbox.get_active ();
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -361,19 +348,19 @@ ExportFilenameSelector::change_session_selection ()
|
||||||
|
|
||||||
switch (session_snap_name.get_active_row_number ()) {
|
switch (session_snap_name.get_active_row_number ()) {
|
||||||
case 1:
|
case 1:
|
||||||
filename->include_session = true;
|
filename->include_session = true;
|
||||||
filename->use_session_snapshot_name = false;
|
filename->use_session_snapshot_name = false;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
filename->include_session = true;
|
filename->include_session = true;
|
||||||
filename->use_session_snapshot_name = true;
|
filename->use_session_snapshot_name = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
filename->include_session = false;
|
filename->include_session = false;
|
||||||
filename->use_session_snapshot_name = false;
|
filename->use_session_snapshot_name = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -383,11 +370,11 @@ ExportFilenameSelector::change_revision_selection ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool selected = revision_checkbox.get_active();
|
bool selected = revision_checkbox.get_active ();
|
||||||
filename->include_revision = selected;
|
filename->include_revision = selected;
|
||||||
|
|
||||||
revision_spinbutton.set_sensitive (selected);
|
revision_spinbutton.set_sensitive (selected);
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -397,15 +384,15 @@ ExportFilenameSelector::change_revision_value ()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
filename->set_revision ((uint32_t) revision_spinbutton.get_value_as_int());
|
filename->set_revision ((uint32_t)revision_spinbutton.get_value_as_int ());
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ExportFilenameSelector::open_folder ()
|
ExportFilenameSelector::open_folder ()
|
||||||
{
|
{
|
||||||
const std::string& dir (path_entry.get_text());
|
const std::string& dir (path_entry.get_text ());
|
||||||
if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR|Glib::FILE_TEST_EXISTS)) {
|
if (!Glib::file_test (dir, Glib::FILE_TEST_IS_DIR | Glib::FILE_TEST_EXISTS)) {
|
||||||
Gtk::MessageDialog msg (string_compose (_("%1: this is not a valid directory/folder."), dir));
|
Gtk::MessageDialog msg (string_compose (_("%1: this is not a valid directory/folder."), dir));
|
||||||
msg.run ();
|
msg.run ();
|
||||||
return;
|
return;
|
||||||
|
|
@ -416,28 +403,29 @@ ExportFilenameSelector::open_folder ()
|
||||||
void
|
void
|
||||||
ExportFilenameSelector::open_browse_dialog ()
|
ExportFilenameSelector::open_browse_dialog ()
|
||||||
{
|
{
|
||||||
Gtk::FileChooserDialog dialog(_("Choose export folder"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
Gtk::FileChooserDialog dialog (_("Choose export folder"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER);
|
||||||
Gtkmm2ext::add_volume_shortcuts (dialog);
|
Gtkmm2ext::add_volume_shortcuts (dialog);
|
||||||
//dialog.set_transient_for(*this);
|
//dialog.set_transient_for(*this);
|
||||||
dialog.set_filename (path_entry.get_text());
|
dialog.set_filename (path_entry.get_text ());
|
||||||
|
|
||||||
dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
|
dialog.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
|
||||||
dialog.add_button(Gtk::Stock::OK, Gtk::RESPONSE_OK);
|
dialog.add_button (Gtk::Stock::OK, Gtk::RESPONSE_OK);
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
int result = dialog.run();
|
int result = dialog.run ();
|
||||||
|
|
||||||
if (result == Gtk::RESPONSE_OK) {
|
if (result == Gtk::RESPONSE_OK) {
|
||||||
std::string filename = dialog.get_filename();
|
std::string filename = dialog.get_filename ();
|
||||||
|
|
||||||
if (!Glib::file_test (filename, Glib::FILE_TEST_IS_DIR|Glib::FILE_TEST_EXISTS)) {
|
if (!Glib::file_test (filename, Glib::FILE_TEST_IS_DIR | Glib::FILE_TEST_EXISTS)) {
|
||||||
Gtk::MessageDialog msg (string_compose (_("%1: this is only the directory/folder name, not the filename.\n\
|
Gtk::MessageDialog msg (string_compose (_("%1: this is only the directory/folder name, not the filename.\n"
|
||||||
The filename will be chosen from the information just above the folder selector."), filename));
|
"The filename will be chosen from the information just above the folder selector."),
|
||||||
|
filename));
|
||||||
msg.run ();
|
msg.run ();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filename.length()) {
|
if (filename.length ()) {
|
||||||
path_entry.set_text (filename);
|
path_entry.set_text (filename);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -445,5 +433,5 @@ The filename will be chosen from the information just above the folder selector.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged ();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@
|
||||||
#include <gtkmm/spinbutton.h>
|
#include <gtkmm/spinbutton.h>
|
||||||
#include <gtkmm/treemodel.h>
|
#include <gtkmm/treemodel.h>
|
||||||
|
|
||||||
#include "ardour/export_profile_manager.h"
|
|
||||||
#include "ardour/export_filename.h"
|
#include "ardour/export_filename.h"
|
||||||
|
#include "ardour/export_profile_manager.h"
|
||||||
#include "ardour/session_handle.h"
|
#include "ardour/session_handle.h"
|
||||||
|
|
||||||
class ExportFilenameSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr
|
class ExportFilenameSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr
|
||||||
|
|
@ -45,7 +45,7 @@ public:
|
||||||
ExportFilenameSelector ();
|
ExportFilenameSelector ();
|
||||||
~ExportFilenameSelector ();
|
~ExportFilenameSelector ();
|
||||||
|
|
||||||
void set_state (ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session * session_);
|
void set_state (ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session* session_);
|
||||||
void set_example_filename (std::string filename);
|
void set_example_filename (std::string filename);
|
||||||
void require_timespan (bool);
|
void require_timespan (bool);
|
||||||
|
|
||||||
|
|
@ -54,7 +54,6 @@ public:
|
||||||
sigc::signal<void> CriticalSelectionChanged;
|
sigc::signal<void> CriticalSelectionChanged;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void load_state ();
|
void load_state ();
|
||||||
|
|
||||||
void update_label ();
|
void update_label ();
|
||||||
|
|
@ -76,38 +75,41 @@ private:
|
||||||
|
|
||||||
Glib::RefPtr<Gtk::SizeGroup> label_sizegroup;
|
Glib::RefPtr<Gtk::SizeGroup> label_sizegroup;
|
||||||
|
|
||||||
Gtk::Label include_label;
|
Gtk::Label include_label;
|
||||||
|
|
||||||
Gtk::HBox include_hbox;
|
Gtk::HBox include_hbox;
|
||||||
|
|
||||||
Gtk::Label label_label;
|
Gtk::Label label_label;
|
||||||
Gtk::Entry label_entry;
|
Gtk::Entry label_entry;
|
||||||
|
|
||||||
Gtk::ComboBoxText session_snap_name;
|
Gtk::ComboBoxText session_snap_name;
|
||||||
Gtk::CheckButton timespan_checkbox;
|
Gtk::CheckButton timespan_checkbox;
|
||||||
|
|
||||||
Gtk::CheckButton revision_checkbox;
|
Gtk::CheckButton revision_checkbox;
|
||||||
Gtk::SpinButton revision_spinbutton;
|
Gtk::SpinButton revision_spinbutton;
|
||||||
|
|
||||||
Gtk::HBox path_hbox;
|
Gtk::HBox path_hbox;
|
||||||
|
|
||||||
Gtk::Label path_label;
|
Gtk::Label path_label;
|
||||||
Gtk::Entry path_entry;
|
Gtk::Entry path_entry;
|
||||||
Gtk::Button browse_button;
|
Gtk::Button browse_button;
|
||||||
Gtk::Button open_button;
|
Gtk::Button open_button;
|
||||||
Gtk::Label example_filename_label;
|
Gtk::Label example_filename_label;
|
||||||
|
|
||||||
/* Date combo */
|
/* Date combo */
|
||||||
|
|
||||||
typedef ARDOUR::ExportFilename::DateFormat DateFormat;
|
typedef ARDOUR::ExportFilename::DateFormat DateFormat;
|
||||||
|
|
||||||
struct DateFormatCols : public Gtk::TreeModelColumnRecord
|
struct DateFormatCols : public Gtk::TreeModelColumnRecord {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
Gtk::TreeModelColumn<DateFormat> format;
|
Gtk::TreeModelColumn<DateFormat> format;
|
||||||
Gtk::TreeModelColumn<std::string> label;
|
Gtk::TreeModelColumn<std::string> label;
|
||||||
|
|
||||||
DateFormatCols () { add(format); add(label); }
|
DateFormatCols ()
|
||||||
|
{
|
||||||
|
add (format);
|
||||||
|
add (label);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
DateFormatCols date_format_cols;
|
DateFormatCols date_format_cols;
|
||||||
Glib::RefPtr<Gtk::ListStore> date_format_list;
|
Glib::RefPtr<Gtk::ListStore> date_format_list;
|
||||||
|
|
@ -117,13 +119,16 @@ private:
|
||||||
|
|
||||||
typedef ARDOUR::ExportFilename::TimeFormat TimeFormat;
|
typedef ARDOUR::ExportFilename::TimeFormat TimeFormat;
|
||||||
|
|
||||||
struct TimeFormatCols : public Gtk::TreeModelColumnRecord
|
struct TimeFormatCols : public Gtk::TreeModelColumnRecord {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
Gtk::TreeModelColumn<TimeFormat> format;
|
Gtk::TreeModelColumn<TimeFormat> format;
|
||||||
Gtk::TreeModelColumn<std::string> label;
|
Gtk::TreeModelColumn<std::string> label;
|
||||||
|
|
||||||
TimeFormatCols () { add(format); add(label); }
|
TimeFormatCols ()
|
||||||
|
{
|
||||||
|
add (format);
|
||||||
|
add (label);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
TimeFormatCols time_format_cols;
|
TimeFormatCols time_format_cols;
|
||||||
Glib::RefPtr<Gtk::ListStore> time_format_list;
|
Glib::RefPtr<Gtk::ListStore> time_format_list;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue