mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
merge changes to libmidi++ API from 2.0-ongoing
git-svn-id: svn://localhost/ardour2/trunk@2256 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
684ef0eb7a
commit
b9b6ba8be4
25 changed files with 614 additions and 195 deletions
55
gtk2_ardour/midi_port_dialog.cc
Normal file
55
gtk2_ardour/midi_port_dialog.cc
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#include <string>
|
||||
#include <sigc++/bind.h>
|
||||
#include <gtkmm/stock.h>
|
||||
|
||||
#include <pbd/convert.h>
|
||||
#include <gtkmm2ext/utils.h>
|
||||
|
||||
#include "midi_port_dialog.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace PBD;
|
||||
using namespace Gtk;
|
||||
using namespace Gtkmm2ext;
|
||||
using namespace sigc;
|
||||
|
||||
static const char* mode_strings[] = { "duplex", "output", "input", (char*) 0 };
|
||||
|
||||
MidiPortDialog::MidiPortDialog ()
|
||||
: ArdourDialog ("midi_port_dialog"),
|
||||
port_label (_("Port name"))
|
||||
|
||||
{
|
||||
vector<string> str = internationalize (PACKAGE, mode_strings);
|
||||
set_popdown_strings (port_mode_combo, str);
|
||||
port_mode_combo.set_active_text (str.front());
|
||||
|
||||
hpacker.pack_start (port_label);
|
||||
hpacker.pack_start (port_name);
|
||||
hpacker.pack_start (port_mode_combo);
|
||||
|
||||
port_label.show ();
|
||||
port_name.show ();
|
||||
port_mode_combo.show ();
|
||||
hpacker.show ();
|
||||
|
||||
get_vbox()->pack_start (hpacker);
|
||||
|
||||
port_name.signal_activate().connect (mem_fun (*this, &MidiPortDialog::entry_activated));
|
||||
|
||||
add_button (Stock::ADD, RESPONSE_ACCEPT);
|
||||
add_button (Stock::CANCEL, RESPONSE_CANCEL);
|
||||
}
|
||||
|
||||
void
|
||||
MidiPortDialog::entry_activated ()
|
||||
{
|
||||
response (RESPONSE_ACCEPT);
|
||||
}
|
||||
|
||||
MidiPortDialog::~MidiPortDialog ()
|
||||
{
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue