Update codec-quality display when ExportFormat changes
[ardour.git] / gtk2_ardour / io_selector.cc
index d7b65dc58b68354e5ca05e882ecaeeb46bd90814..99050cc34ba0a5a75c728d2cf1da11cdd6004b1c 100644 (file)
 
 */
 
+#include <stdint.h>
+
 #include <glibmm/objectbase.h>
 
 #include <gtkmm2ext/doi.h>
 
-#include "ardour/port_insert.h"
-#include "ardour/session.h"
-#include "ardour/io.h"
 #include "ardour/audioengine.h"
-#include "ardour/track.h"
-#include "ardour/audio_track.h"
-#include "ardour/midi_track.h"
-#include "ardour/mtdm.h"
+#include "ardour/bundle.h"
 #include "ardour/data_type.h"
+#include "ardour/io.h"
 #include "ardour/port.h"
-#include "ardour/bundle.h"
+#include "ardour/session.h"
 
 #include "io_selector.h"
 #include "utils.h"
 #include "gui_thread.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 using namespace Gtk;
 
 IOSelector::IOSelector (Gtk::Window* p, ARDOUR::Session* session, boost::shared_ptr<ARDOUR::IO> io)
@@ -118,7 +116,7 @@ IOSelector::setup_ports (int dim)
 
        if (dim == _other) {
 
-               _ports[_other].gather (_session, type(), _find_inputs_for_io_outputs, false);
+               _ports[_other].gather (_session, type(), _find_inputs_for_io_outputs, false, show_only_bundles ());
 
        } else {
 
@@ -143,15 +141,15 @@ IOSelector::set_state (ARDOUR::BundleChannel c[2], bool s)
                                return;
                        }
 
-                        if (s) {
+                       if (s) {
                                if (!f->connected_to (*j)) {
                                        _io->connect (f, *j, 0);
                                }
-                        } else {
+                       } else {
                                if (f->connected_to (*j)) {
                                        _io->disconnect (f, *j, 0);
                                }
-                        }
+                       }
                }
        }
 }
@@ -207,13 +205,13 @@ IOSelector::list_is_global (int dim) const
        return (dim == _other);
 }
 
-string
+std::string
 IOSelector::disassociation_verb () const
 {
        return _("Disconnect");
 }
 
-string
+std::string
 IOSelector::channel_noun () const
 {
        return _("port");
@@ -227,8 +225,6 @@ IOSelectorWindow::IOSelectorWindow (ARDOUR::Session* session, boost::shared_ptr<
 
        add (_selector);
 
-       set_position (Gtk::WIN_POS_MOUSE);
-
        io_name_changed (this);
 
        show_all ();
@@ -240,8 +236,7 @@ bool
 IOSelectorWindow::wm_delete (GdkEventAny* /*event*/)
 {
        _selector.Finished (IOSelector::Accepted);
-       hide ();
-       return true;
+       return false;
 }
 
 
@@ -256,7 +251,7 @@ void
 IOSelectorWindow::on_show ()
 {
        Gtk::Window::on_show ();
-       pair<uint32_t, uint32_t> const pm_max = _selector.max_size ();
+       std::pair<uint32_t, uint32_t> const pm_max = _selector.max_size ();
        resize_window_to_proportion_of_monitor (this, pm_max.first, pm_max.second);
 }
 
@@ -265,7 +260,7 @@ IOSelectorWindow::io_name_changed (void*)
 {
        ENSURE_GUI_THREAD (*this, &IOSelectorWindow::io_name_changed, src)
 
-       string title;
+       std::string title;
 
        if (!_selector.find_inputs_for_io_outputs()) {
                title = string_compose(_("%1 input"), _selector.io()->name());