diff options
author | Carl Hetherington <carl@carlh.net> | 2011-12-13 00:15:17 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-12-13 00:15:17 +0000 |
commit | 6aaf4ea17a326eb06d81b06cb83048fbdaaa8a52 (patch) | |
tree | 7fe86410ef23a9f65e79b9afa3f74a80e8f62a9b | |
parent | 1deb4fd7adb2c5dc7cbcd4ed76c2515a73090b89 (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
-rw-r--r-- | gtk2_ardour/export_timespan_selector.cc | 24 | ||||
-rw-r--r-- | gtk2_ardour/export_timespan_selector.h | 2 |
2 files changed, 26 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) : diff --git a/gtk2_ardour/export_timespan_selector.h b/gtk2_ardour/export_timespan_selector.h index 8b06b2ee8d..420baa5806 100644 --- a/gtk2_ardour/export_timespan_selector.h +++ b/gtk2_ardour/export_timespan_selector.h @@ -83,6 +83,8 @@ class ExportTimespanSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr void update_range_name (std::string const & path, std::string const & new_text); + void set_selection_state_of_all_timespans (bool); + /*** GUI components ***/ Gtk::HBox option_hbox; |