skip LV2 ports on GUI according to port-properties: notOnGUI and reportsLatency
[ardour.git] / gtk2_ardour / export_timespan_selector.cc
index 78e92a22a637507eff68bc5d3b729f4cd3549ad1..a96ea69b6d6f0c9ddbb3fd38299945c66188b59f 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "ardour_ui.h"
 
-#include "ardour/tempo.h"
 #include "ardour/location.h"
 #include "ardour/types.h"
 #include "ardour/session.h"
@@ -51,6 +50,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 +332,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) :
@@ -326,12 +349,6 @@ ExportTimespanSelectorSingle::ExportTimespanSelectorSingle (ARDOUR::Session * se
        range_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER);
        range_view.append_column_editable (_("Range"), range_cols.name);
 
-       // Adjust selector height
-       int x_offset, y_offset, width, height;
-       Gtk::CellRenderer * renderer = *range_view.get_column(0)->get_cell_renderers().begin();
-       renderer->get_size (range_view, x_offset, y_offset, width, height);
-       range_scroller.set_size_request (-1, height);
-
        if (Gtk::CellRendererText * renderer = dynamic_cast<Gtk::CellRendererText *> (range_view.get_column_cell_renderer (0))) {
                renderer->signal_edited().connect (sigc::mem_fun (*this, &ExportTimespanSelectorSingle::update_range_name));
        }