summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_timespan_selector.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-13 00:15:17 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-13 00:15:17 +0000
commit6aaf4ea17a326eb06d81b06cb83048fbdaaa8a52 (patch)
tree7fe86410ef23a9f65e79b9afa3f74a80e8f62a9b /gtk2_ardour/export_timespan_selector.cc
parent1deb4fd7adb2c5dc7cbcd4ed76c2515a73090b89 (diff)
Add select all / deselect all to timespan section of export dialogue (#4273).
git-svn-id: svn://localhost/ardour2/branches/3.0@10994 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/export_timespan_selector.cc')
-rw-r--r--gtk2_ardour/export_timespan_selector.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/gtk2_ardour/export_timespan_selector.cc b/gtk2_ardour/export_timespan_selector.cc
index 8080c02862..41257e1248 100644
--- a/gtk2_ardour/export_timespan_selector.cc
+++ b/gtk2_ardour/export_timespan_selector.cc
@@ -51,6 +51,22 @@ ExportTimespanSelector::ExportTimespanSelector (ARDOUR::Session * session, Profi
option_hbox.pack_start (time_format_label, false, false, 0);
option_hbox.pack_start (time_format_combo, false, false, 6);
+ Gtk::Button* b = manage (new Gtk::Button (_("Select All")));
+ b->signal_clicked().connect (
+ sigc::bind (
+ sigc::mem_fun (*this, &ExportTimespanSelector::set_selection_state_of_all_timespans), true
+ )
+ );
+ option_hbox.pack_start (*b, false, false, 6);
+
+ b = manage (new Gtk::Button (_("Deselect All")));
+ b->signal_clicked().connect (
+ sigc::bind (
+ sigc::mem_fun (*this, &ExportTimespanSelector::set_selection_state_of_all_timespans), false
+ )
+ );
+ option_hbox.pack_start (*b, false, false, 6);
+
range_scroller.add (range_view);
pack_start (option_hbox, false, false, 0);
@@ -317,6 +333,14 @@ ExportTimespanSelector::update_range_name (std::string const & path, std::string
CriticalSelectionChanged();
}
+void
+ExportTimespanSelector::set_selection_state_of_all_timespans (bool s)
+{
+ for (Gtk::ListStore::Children::iterator it = range_list->children().begin(); it != range_list->children().end(); ++it) {
+ it->set_value (range_cols.selected, s);
+ }
+}
+
/*** ExportTimespanSelectorSingle ***/
ExportTimespanSelectorSingle::ExportTimespanSelectorSingle (ARDOUR::Session * session, ProfileManagerPtr manager, std::string range_id) :