Skip to content

Commit 610164b

Browse files
committed
Add input-only MIDI activity widget to Group channels
1 parent f7814b0 commit 610164b

File tree

5 files changed

+34
-31
lines changed

5 files changed

+34
-31
lines changed

src/gui/elems/mainWindow/keyboard/groupChannel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ geGroupChannel::geGroupChannel(c::channel::Data d)
6868
playButton = new geImageButton(graphics::channelPlayOff, graphics::channelPlayOn);
6969
arm = new geImageButton(graphics::armOff, graphics::armOn);
7070
mainButton = new geGroupChannelButton(m_channel);
71-
midiActivity = new geMidiActivity();
71+
midiActivity = new geMidiActivity(/*hasOut=*/false);
7272
mute = new geImageButton(graphics::muteOff, graphics::muteOn);
7373
solo = new geImageButton(graphics::soloOff, graphics::soloOn);
7474
fx = new geImageButton(graphics::fxOff, graphics::fxOn);
@@ -84,7 +84,7 @@ geGroupChannel::geGroupChannel(c::channel::Data d)
8484
end();
8585

8686
playButton->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_PLAY));
87-
midiActivity->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_MIDIACTIVITY));
87+
midiActivity->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_MIDIACTIVITY_INONLY));
8888
mute->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_MUTE));
8989
solo->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_SOLO));
9090
fx->copy_tooltip(g_ui->getI18Text(LangMap::MAIN_CHANNEL_LABEL_FX));

src/gui/elems/midiActivity.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@ void geMidiLed::lit()
6969
/* -------------------------------------------------------------------------- */
7070
/* -------------------------------------------------------------------------- */
7171

72-
geMidiActivity::geMidiActivity()
72+
geMidiActivity::geMidiActivity(bool hasOut)
7373
: geFlex(Direction::VERTICAL, G_GUI_INNER_MARGIN)
7474
{
7575
out = new geMidiLed();
7676
in = new geMidiLed();
77-
addWidget(out);
77+
if (hasOut)
78+
addWidget(out);
7879
addWidget(in);
7980
end();
8081
}

src/gui/elems/midiActivity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class geMidiLed : public Fl_Button
4949
class geMidiActivity : public geFlex
5050
{
5151
public:
52-
geMidiActivity();
52+
geMidiActivity(bool hasOut = true);
5353

5454
geMidiLed* out;
5555
geMidiLed* in;

src/gui/langMapper.cpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -143,20 +143,21 @@ LangMap::LangMap()
143143
m_data[MAIN_TRACK_BUTTON_REMOVE_TRACK] = "Remove track";
144144
m_data[MAIN_TRACK_BUTTON_ADD_TRACK] = "Add track";
145145

146-
m_data[MAIN_CHANNEL_NOSAMPLE] = "-- no sample --";
147-
m_data[MAIN_CHANNEL_SAMPLENOTFOUND] = "* file not found! *";
148-
m_data[MAIN_CHANNEL_LABEL_PLAY] = "Play/stop";
149-
m_data[MAIN_CHANNEL_LABEL_ARM] = "Arm for recording";
150-
m_data[MAIN_CHANNEL_LABEL_STATUS] = "Progress bar";
151-
m_data[MAIN_CHANNEL_LABEL_READACTIONS] = "Read actions\n\nToggles playback of pre-recorded "
152-
"actions (key press, key release, ...).";
153-
m_data[MAIN_CHANNEL_LABEL_MODEBOX] = "Mode";
154-
m_data[MAIN_CHANNEL_LABEL_MUTE] = "Mute";
155-
m_data[MAIN_CHANNEL_LABEL_SOLO] = "Solo";
156-
m_data[MAIN_CHANNEL_LABEL_FX] = "Plug-ins";
157-
m_data[MAIN_CHANNEL_LABEL_VOLUME] = "Volume";
158-
m_data[MAIN_CHANNEL_LABEL_MIDIACTIVITY] = "MIDI I/O activity\n\nNotifies MIDI messages sent (top) or "
159-
"received (bottom) by this channel.";
146+
m_data[MAIN_CHANNEL_NOSAMPLE] = "-- no sample --";
147+
m_data[MAIN_CHANNEL_SAMPLENOTFOUND] = "* file not found! *";
148+
m_data[MAIN_CHANNEL_LABEL_PLAY] = "Play/stop";
149+
m_data[MAIN_CHANNEL_LABEL_ARM] = "Arm for recording";
150+
m_data[MAIN_CHANNEL_LABEL_STATUS] = "Progress bar";
151+
m_data[MAIN_CHANNEL_LABEL_READACTIONS] = "Read actions\n\nToggles playback of pre-recorded "
152+
"actions (key press, key release, ...).";
153+
m_data[MAIN_CHANNEL_LABEL_MODEBOX] = "Mode";
154+
m_data[MAIN_CHANNEL_LABEL_MUTE] = "Mute";
155+
m_data[MAIN_CHANNEL_LABEL_SOLO] = "Solo";
156+
m_data[MAIN_CHANNEL_LABEL_FX] = "Plug-ins";
157+
m_data[MAIN_CHANNEL_LABEL_VOLUME] = "Volume";
158+
m_data[MAIN_CHANNEL_LABEL_MIDIACTIVITY] = "MIDI I/O activity\n\nNotifies MIDI messages sent (top) or "
159+
"received (bottom) by this channel.";
160+
m_data[MAIN_CHANNEL_LABEL_MIDIACTIVITY_INONLY] = "MIDI I/O activity\n\nNotifies MIDI messages received by this channel.";
160161

161162
m_data[MAIN_CHANNEL_MENU_INPUTMONITOR] = "Input monitor";
162163
m_data[MAIN_CHANNEL_MENU_OVERDUBPROTECTION] = "Overdub protection";

src/gui/langMapper.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,18 +145,19 @@ class LangMap
145145
static constexpr auto MAIN_TRACK_BUTTON_REMOVE_TRACK = "main_track_button_removeTrack";
146146
static constexpr auto MAIN_TRACK_BUTTON_ADD_TRACK = "main_track_button_addTrack";
147147

148-
static constexpr auto MAIN_CHANNEL_NOSAMPLE = "main_channel_noSample";
149-
static constexpr auto MAIN_CHANNEL_SAMPLENOTFOUND = "main_channel_sampleNotFound";
150-
static constexpr auto MAIN_CHANNEL_LABEL_PLAY = "main_channel_label_play";
151-
static constexpr auto MAIN_CHANNEL_LABEL_ARM = "main_channel_label_arm";
152-
static constexpr auto MAIN_CHANNEL_LABEL_STATUS = "main_channel_label_status";
153-
static constexpr auto MAIN_CHANNEL_LABEL_READACTIONS = "main_channel_label_readActions";
154-
static constexpr auto MAIN_CHANNEL_LABEL_MODEBOX = "main_channel_label_modeBox";
155-
static constexpr auto MAIN_CHANNEL_LABEL_MUTE = "main_channel_label_mute";
156-
static constexpr auto MAIN_CHANNEL_LABEL_SOLO = "main_channel_label_solo";
157-
static constexpr auto MAIN_CHANNEL_LABEL_FX = "main_channel_label_fx";
158-
static constexpr auto MAIN_CHANNEL_LABEL_VOLUME = "main_channel_label_volume";
159-
static constexpr auto MAIN_CHANNEL_LABEL_MIDIACTIVITY = "main_channel_label_midiActivity";
148+
static constexpr auto MAIN_CHANNEL_NOSAMPLE = "main_channel_noSample";
149+
static constexpr auto MAIN_CHANNEL_SAMPLENOTFOUND = "main_channel_sampleNotFound";
150+
static constexpr auto MAIN_CHANNEL_LABEL_PLAY = "main_channel_label_play";
151+
static constexpr auto MAIN_CHANNEL_LABEL_ARM = "main_channel_label_arm";
152+
static constexpr auto MAIN_CHANNEL_LABEL_STATUS = "main_channel_label_status";
153+
static constexpr auto MAIN_CHANNEL_LABEL_READACTIONS = "main_channel_label_readActions";
154+
static constexpr auto MAIN_CHANNEL_LABEL_MODEBOX = "main_channel_label_modeBox";
155+
static constexpr auto MAIN_CHANNEL_LABEL_MUTE = "main_channel_label_mute";
156+
static constexpr auto MAIN_CHANNEL_LABEL_SOLO = "main_channel_label_solo";
157+
static constexpr auto MAIN_CHANNEL_LABEL_FX = "main_channel_label_fx";
158+
static constexpr auto MAIN_CHANNEL_LABEL_VOLUME = "main_channel_label_volume";
159+
static constexpr auto MAIN_CHANNEL_LABEL_MIDIACTIVITY = "main_channel_label_midiActivity";
160+
static constexpr auto MAIN_CHANNEL_LABEL_MIDIACTIVITY_INONLY = "main_channel_label_midiActivity_inOnly";
160161

161162
static constexpr auto MAIN_CHANNEL_MENU_INPUTMONITOR = "main_channel_menu_inputMonitor";
162163
static constexpr auto MAIN_CHANNEL_MENU_OVERDUBPROTECTION = "main_channel_menu_overdubProtection";

0 commit comments

Comments
 (0)