summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_filename_selector.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
committerDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
commitbb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch)
treee52977d3eae6ff07b856088041a080a2fa3e5b79 /gtk2_ardour/export_filename_selector.cc
parent8c4ce1e2ce35571aed5a686671431fdfffae7f8c (diff)
Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/export_filename_selector.cc')
-rw-r--r--gtk2_ardour/export_filename_selector.cc94
1 files changed, 47 insertions, 47 deletions
diff --git a/gtk2_ardour/export_filename_selector.cc b/gtk2_ardour/export_filename_selector.cc
index a78c0e7890..30a7fbce7f 100644
--- a/gtk2_ardour/export_filename_selector.cc
+++ b/gtk2_ardour/export_filename_selector.cc
@@ -43,7 +43,7 @@ ExportFilenameSelector::ExportFilenameSelector () :
pack_start (include_label, false, false, 6);
pack_start (include_hbox, false, false, 0);
pack_start (path_hbox, false, false, 12);
-
+
include_hbox.pack_start (label_label, false, false, 3);
include_hbox.pack_start (label_entry, false, false, 3);
include_hbox.pack_start (session_checkbox, false, false, 3);
@@ -51,53 +51,53 @@ ExportFilenameSelector::ExportFilenameSelector () :
include_hbox.pack_start (time_format_combo, false, false, 3);
include_hbox.pack_start (revision_checkbox, false, false, 3);
include_hbox.pack_start (revision_spinbutton, false, false, 3);
-
+
path_hbox.pack_start (path_label, false, false, 3);
path_hbox.pack_start (path_entry, true, true, 3);
path_hbox.pack_start (browse_button, false, false, 3);
-
+
date_format_combo.set_name ("PaddedButton");
time_format_combo.set_name ("PaddedButton");
browse_button.set_name ("PaddedButton");
-
+
label_sizegroup = Gtk::SizeGroup::create (Gtk::SIZE_GROUP_HORIZONTAL);
label_sizegroup->add_widget (label_label);
label_sizegroup->add_widget (path_label);
-
+
/* Date */
-
+
date_format_list = Gtk::ListStore::create (date_format_cols);
date_format_combo.set_model (date_format_list);
date_format_combo.pack_start (date_format_cols.label);
-
+
date_format_combo.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_date_format));
-
+
/* Time */
-
+
time_format_list = Gtk::ListStore::create (time_format_cols);
time_format_combo.set_model (time_format_list);
time_format_combo.pack_start (time_format_cols.label);
-
+
time_format_combo.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_time_format));
-
+
/* Revision */
-
+
revision_spinbutton.set_digits (0);
revision_spinbutton.set_increments (1, 10);
revision_spinbutton.set_range (1, 1000);
revision_spinbutton.set_sensitive (false);
-
+
/* Signals */
-
+
label_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_label));
path_entry.signal_changed().connect (sigc::mem_fun (*this, &ExportFilenameSelector::update_folder));
-
+
session_checkbox.signal_toggled().connect (sigc::mem_fun (*this, &ExportFilenameSelector::change_session_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));
-
- 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));
}
ExportFilenameSelector::~ExportFilenameSelector ()
@@ -117,15 +117,15 @@ ExportFilenameSelector::load_state ()
revision_checkbox.set_active (filename->include_revision);
revision_spinbutton.set_value (filename->get_revision());
path_entry.set_text (filename->get_folder());
-
+
Gtk::TreeModel::Children::iterator 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()) {
date_format_combo.set_active (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()) {
time_format_combo.set_active (it);
@@ -137,57 +137,57 @@ void
ExportFilenameSelector::set_state (ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session * session_)
{
session = session_;
-
+
filename = state_->filename;
-
+
/* Fill combo boxes */
-
+
Gtk::TreeModel::iterator iter;
Gtk::TreeModel::Row row;
-
+
/* Dates */
-
+
date_format_list->clear();
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_None;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_None);
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_ISO;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_ISO);
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_ISOShortY;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_ISOShortY);
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_BE;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_BE);
-
+
iter = date_format_list->append();
row = *iter;
row[date_format_cols.format] = ExportFilename::D_BEShortY;
row[date_format_cols.label] = filename->get_date_format_str (ExportFilename::D_BEShortY);
-
+
/* Times */
-
+
time_format_list->clear();
-
+
iter = time_format_list->append();
row = *iter;
row[time_format_cols.format] = ExportFilename::T_None;
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_None);
-
+
iter = time_format_list->append();
row = *iter;
row[time_format_cols.format] = ExportFilename::T_NoDelim;
row[time_format_cols.label] = filename->get_time_format_str (ExportFilename::T_NoDelim);
-
+
iter = time_format_list->append();
row = *iter;
row[time_format_cols.format] = ExportFilename::T_Delim;
@@ -205,9 +205,9 @@ ExportFilenameSelector::update_label ()
if (!filename) {
return;
}
-
+
filename->set_label (label_entry.get_text());
-
+
filename->include_label = !label_entry.get_text().empty();
CriticalSelectionChanged();
}
@@ -218,7 +218,7 @@ ExportFilenameSelector::update_folder ()
if (!filename) {
return;
}
-
+
filename->set_folder (path_entry.get_text());
CriticalSelectionChanged();
}
@@ -229,7 +229,7 @@ ExportFilenameSelector::change_date_format ()
if (!filename) {
return;
}
-
+
DateFormat format = date_format_combo.get_active()->get_value (date_format_cols.format);
filename->set_date_format (format);
CriticalSelectionChanged();
@@ -241,7 +241,7 @@ ExportFilenameSelector::change_time_format ()
if (!filename) {
return;
}
-
+
TimeFormat format = time_format_combo.get_active()->get_value (time_format_cols.format);
filename->set_time_format (format);
CriticalSelectionChanged();
@@ -253,7 +253,7 @@ ExportFilenameSelector::change_session_selection ()
if (!filename) {
return;
}
-
+
filename->include_session = session_checkbox.get_active();
CriticalSelectionChanged();
}
@@ -264,10 +264,10 @@ ExportFilenameSelector::change_revision_selection ()
if (!filename) {
return;
}
-
+
bool selected = revision_checkbox.get_active();
filename->include_revision = selected;
-
+
revision_spinbutton.set_sensitive (selected);
CriticalSelectionChanged();
}
@@ -278,7 +278,7 @@ ExportFilenameSelector::change_revision_value ()
if (!filename) {
return;
}
-
+
filename->set_revision ((uint32_t) revision_spinbutton.get_value_as_int());
CriticalSelectionChanged();
}
@@ -297,11 +297,11 @@ ExportFilenameSelector::open_browse_dialog ()
if (result == Gtk::RESPONSE_OK) {
Glib::ustring filename = dialog.get_filename();
-
+
if (filename.length()) {
path_entry.set_text (filename);
}
}
-
+
CriticalSelectionChanged();
}