diff --git a/ChangeLog b/ChangeLog index 1170b9a7e..5021e1d74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2005-12-08 Tobias Doerffel + + * src/core/midi_tab_widget.cpp: + - always un-check items in port-menus when disabling receceiving or + sending MIDI-events + - small GUI improvements + + * resources/midi_in.png: + * resources/midi_out.png: + added icons for MIDI-input- and MIDI-output-port-selection + 2005-12-07 Tobias Doerffel * include/midi_alsa_seq.h: diff --git a/TODO b/TODO index 2f1fb8627..a6f1c3e75 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,7 @@ to be done as soon as possible: -- save connections in midi-tab-widget and debug it (when disabling input/output, automatically unsubscribe all ports!) +- do not allow to connect output-port of channel to own input-port! +- save connections in midi-tab-widget - add note-len- and note-alignment-selectbox to piano-roll - make it possible in bb-editor to add single beats to beat-patterns - fix audio/midi-settings stuff/translation diff --git a/configure.in b/configure.in index 3cab35ce2..228710dbd 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT(lmms, 0.1.1-cvs20051207, tobydox/at/users.sourceforge.net) -AM_INIT_AUTOMAKE(lmms, 0.1.1-cvs20051207) +AC_INIT(lmms, 0.1.1-cvs20051208, tobydox/at/users.sourceforge.net) +AM_INIT_AUTOMAKE(lmms, 0.1.1-cvs20051208) AM_CONFIG_HEADER(config.h) diff --git a/resources/midi_in.png b/resources/midi_in.png new file mode 100644 index 000000000..ed2e891e7 Binary files /dev/null and b/resources/midi_in.png differ diff --git a/resources/midi_out.png b/resources/midi_out.png new file mode 100644 index 000000000..708f2169d Binary files /dev/null and b/resources/midi_out.png differ diff --git a/src/core/midi_tab_widget.cpp b/src/core/midi_tab_widget.cpp index 2ff3aa84b..3499bd3b1 100644 --- a/src/core/midi_tab_widget.cpp +++ b/src/core/midi_tab_widget.cpp @@ -52,6 +52,7 @@ #include "tooltip.h" #include "song_editor.h" #include "midi_client.h" +#include "embed.h" @@ -60,7 +61,9 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track, QWidget( _channel_track->tabWidgetParent() ), settings(), m_channelTrack( _channel_track ), - m_midiPort( _port ) + m_midiPort( _port ), + m_readablePorts( NULL ), + m_writeablePorts( NULL ) { m_setupTabWidget = new tabWidget( tr( "MIDI-SETUP FOR THIS CHANNEL" ), this ); @@ -72,7 +75,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track, m_inputChannelSpinBox->addTextForValue( 0, "---" ); m_inputChannelSpinBox->setValue( m_midiPort->inputChannel() + 1 ); m_inputChannelSpinBox->setLabel( tr( "CHANNEL" ) ); - m_inputChannelSpinBox->move( 190, 30 ); + m_inputChannelSpinBox->move( 28, 52 ); connect( m_inputChannelSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( inputChannelChanged( int ) ) ); @@ -81,7 +84,7 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track, m_outputChannelSpinBox->addTextForValue( 0, "---" ); m_outputChannelSpinBox->setValue( m_midiPort->outputChannel() + 1 ); m_outputChannelSpinBox->setLabel( tr( "CHANNEL" ) ); - m_outputChannelSpinBox->move( 190, 90 ); + m_outputChannelSpinBox->move( 28, 112 ); connect( m_outputChannelSpinBox, SIGNAL( valueChanged( int ) ), this, SLOT( outputChannelChanged( int ) ) ); @@ -137,14 +140,18 @@ midiTabWidget::midiTabWidget( channelTrack * _channel_track, writeablePortsChanged(); QToolButton * rp_btn = new QToolButton( m_setupTabWidget ); - rp_btn->setText( tr( "RECEIVE FROM" ) ); - rp_btn->setGeometry( 24, 52, 140, 24 ); + rp_btn->setTextLabel( tr( "MIDI-devices to receive " + "MIDI-events from" ) ); + rp_btn->setIconSet( embed::getIconPixmap( "midi_in" ) ); + rp_btn->setGeometry( 186, 34, 40, 40 ); rp_btn->setPopup( m_readablePorts ); rp_btn->setPopupDelay( 1 ); QToolButton * wp_btn = new QToolButton( m_setupTabWidget ); - wp_btn->setText( tr( "SEND TO" ) ); - wp_btn->setGeometry( 24, 112, 140, 24 ); + wp_btn->setTextLabel( tr( "MIDI-devices to send MIDI-events " + "to" ) ); + wp_btn->setPixmap( embed::getIconPixmap( "midi_out" ) ); + wp_btn->setGeometry( 186, 94, 40, 40 ); wp_btn->setPopup( m_writeablePorts ); wp_btn->setPopupDelay( 1 ); @@ -228,6 +235,29 @@ void midiTabWidget::midiPortModeToggled( bool ) m_midiPort->setMode( modeTable[m_receiveCheckBox->isChecked()] [m_sendCheckBox->isChecked()] ); + // check whether we have to dis-check items in connection-menu + if( m_readablePorts != NULL && m_receiveCheckBox->isChecked() == FALSE ) + { + for( csize i = 0; i < m_readablePorts->count(); ++i ) + { + int id = m_readablePorts->idAt( i ); + if( m_readablePorts->isItemChecked( id ) ) + { + activatedReadablePort( id ); + } + } + } + if( m_writeablePorts != NULL && m_sendCheckBox->isChecked() == FALSE ) + { + for( csize i = 0; i < m_writeablePorts->count(); ++i ) + { + int id = m_writeablePorts->idAt( i ); + if( m_writeablePorts->isItemChecked( id ) ) + { + activatedWriteablePort( id ); + } + } + } songEditor::inst()->setModified(); }