projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update processor Lua bindings
[ardour.git]
/
gtk2_ardour
/
io_selector.cc
diff --git
a/gtk2_ardour/io_selector.cc
b/gtk2_ardour/io_selector.cc
index fea21ced0f369cd5bc7ada867f80793e49c79ab9..6d0ede316c7a4240e1b0ebc1f57d39259d3701d3 100644
(file)
--- a/
gtk2_ardour/io_selector.cc
+++ b/
gtk2_ardour/io_selector.cc
@@
-17,29
+17,26
@@
*/
*/
-#include <gtkmm/messagedialog.h>
+#include <stdint.h>
+
#include <glibmm/objectbase.h>
#include <gtkmm2ext/doi.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/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/data_type.h"
+#include "ardour/io.h"
#include "ardour/port.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 "io_selector.h"
#include "utils.h"
#include "gui_thread.h"
-#include "i18n.h"
+#include "
pbd/
i18n.h"
using namespace ARDOUR;
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)
using namespace Gtk;
IOSelector::IOSelector (Gtk::Window* p, ARDOUR::Session* session, boost::shared_ptr<ARDOUR::IO> io)
@@
-119,7
+116,7
@@
IOSelector::setup_ports (int dim)
if (dim == _other) {
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 {
} else {
@@
-145,9
+142,13
@@
IOSelector::set_state (ARDOUR::BundleChannel c[2], bool s)
}
if (s) {
}
if (s) {
- _io->connect (f, *j, 0);
+ if (!f->connected_to (*j)) {
+ _io->connect (f, *j, 0);
+ }
} else {
} else {
- _io->disconnect (f, *j, 0);
+ if (f->connected_to (*j)) {
+ _io->disconnect (f, *j, 0);
+ }
}
}
}
}
}
}
@@
-204,27
+205,25
@@
IOSelector::list_is_global (int dim) const
return (dim == _other);
}
return (dim == _other);
}
-string
+st
d::st
ring
IOSelector::disassociation_verb () const
{
return _("Disconnect");
}
IOSelector::disassociation_verb () const
{
return _("Disconnect");
}
-string
+st
d::st
ring
IOSelector::channel_noun () const
{
return _("port");
}
IOSelectorWindow::IOSelectorWindow (ARDOUR::Session* session, boost::shared_ptr<ARDOUR::IO> io, bool /*can_cancel*/)
IOSelector::channel_noun () const
{
return _("port");
}
IOSelectorWindow::IOSelectorWindow (ARDOUR::Session* session, boost::shared_ptr<ARDOUR::IO> io, bool /*can_cancel*/)
- : Ardour
Dialog
(_("I/O selector"))
-
, _selector (this, session, io)
+ : Ardour
Window
(_("I/O selector"))
+ , _selector (this, session, io)
{
set_name ("IOSelectorWindow2");
{
set_name ("IOSelectorWindow2");
- get_vbox()->pack_start (_selector);
-
- set_position (Gtk::WIN_POS_MOUSE);
+ add (_selector);
io_name_changed (this);
io_name_changed (this);
@@
-237,8
+236,7
@@
bool
IOSelectorWindow::wm_delete (GdkEventAny* /*event*/)
{
_selector.Finished (IOSelector::Accepted);
IOSelectorWindow::wm_delete (GdkEventAny* /*event*/)
{
_selector.Finished (IOSelector::Accepted);
- hide ();
- return true;
+ return false;
}
}
@@
-253,7
+251,7
@@
void
IOSelectorWindow::on_show ()
{
Gtk::Window::on_show ();
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);
}
resize_window_to_proportion_of_monitor (this, pm_max.first, pm_max.second);
}
@@
-262,7
+260,7
@@
IOSelectorWindow::io_name_changed (void*)
{
ENSURE_GUI_THREAD (*this, &IOSelectorWindow::io_name_changed, src)
{
ENSURE_GUI_THREAD (*this, &IOSelectorWindow::io_name_changed, src)
- string title;
+ st
d::st
ring title;
if (!_selector.find_inputs_for_io_outputs()) {
title = string_compose(_("%1 input"), _selector.io()->name());
if (!_selector.find_inputs_for_io_outputs()) {
title = string_compose(_("%1 input"), _selector.io()->name());