Make it optional (Options/Behavior/...) wether or not stopping the transport disables global record.

This commit is contained in:
Jonathan Moore Liles 2010-01-29 14:12:24 -06:00
parent 60e54068b3
commit b0b5a1f510
3 changed files with 31 additions and 11 deletions

View File

@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0108
version 1.0110
header_name {.H}
code_name {.C}
comment {//
@ -144,9 +144,7 @@ Fl::lock();
}
Function {TLE()} {open
} {
code {
Fl::visual( FL_DOUBLE | FL_RGB8 );
code {Fl::visual( FL_DOUBLE | FL_RGB8 );
make_window();
@ -575,6 +573,21 @@ Fl::scheme( Fl::scheme() );}
}
}
}
Submenu {} {
label {&Behavior} open
xywh {0 0 74 25}
} {
Submenu {} {
label {&Transport} open
xywh {0 0 74 25}
} {
MenuItem {} {
label {Stop Disables Record}
callback {transport->stop_disables_record( ((Fl_Menu_*)o)->mvalue()->flags & FL_MENU_VALUE );} selected
xywh {5 5 40 25} type Toggle value 1
}
}
}
}
Submenu {} {
label {&Help} open
@ -800,8 +813,7 @@ if ( engine->zombified() && ! zombie )
solo_blinker->value( Track::soloing() );
rec_blinker->value( transport->rolling && transport->rec_enabled() );
lash_blinker->value( lash->enabled() );
selected_blinker->value( timeline->nselected() );} {selected
}
selected_blinker->value( timeline->nselected() );} {}
}
Function {update_cb( void *v )} {open private return_type {static void}
} {

View File

@ -34,6 +34,7 @@ Transport::Transport ( int X, int Y, int W, int H, const char *L )
{
recording = false;
rolling = false;
_stop_disables_record = true;
const int bw = W / 3;
@ -96,12 +97,12 @@ Transport::update_record_state ( void )
* should begin or end on the next frame */
if ( rolling )
{
if ( w->value() )
if ( ! recording && w->value() )
{
timeline->record();
recording = true;
}
else
else if ( recording )
{
timeline->stop();
recording = false;
@ -190,7 +191,9 @@ Transport::stop ( void )
// MESSAGE( "Stopping transport" );
if ( _record_button->value() )
{
_record_button->value( 0 );
if ( _stop_disables_record )
_record_button->value( 0 );
update_record_state();
}

View File

@ -35,6 +35,8 @@ struct Transport : public jack_position_t, public Fl_Pack
private:
bool _stop_disables_record;
static void cb_button ( Fl_Widget *w, void *arg );
void cb_button ( Fl_Widget *w );
@ -55,6 +57,9 @@ public:
bool rec_enabled ( void ) const;
void stop_disables_record ( bool b ) { _stop_disables_record = b; }
bool stop_disables_record ( void ) const { return _stop_disables_record; }
void toggle_record ( void );
int handle ( int m );