Add LASH connection indicator to GUI along with --no-lash command line option.

This commit is contained in:
Jonathan Moore Liles 2009-01-11 21:38:30 -06:00
parent 3e86584ad3
commit 8dc6681a53
2 changed files with 33 additions and 4 deletions

View File

@ -24,6 +24,8 @@ comment {//
decl {const float STATUS_UPDATE_FREQ = 0.5f;} {} decl {const float STATUS_UPDATE_FREQ = 0.5f;} {}
decl {\#include "LASH.H"} {}
decl {\#include "Fl_Menu_Settings.H"} {} decl {\#include "Fl_Menu_Settings.H"} {}
decl {\#include "Timeline.H"} {} decl {\#include "Timeline.H"} {}
@ -65,6 +67,9 @@ decl {extern char project_display_name[256];} {global
decl {extern char *user_config_dir;} {global decl {extern char *user_config_dir;} {global
} }
decl {extern LASH *lash;} {selected global
}
class TLE {open class TLE {open
} { } {
decl {Fl_Color system_colors[3];} {} decl {Fl_Color system_colors[3];} {}
@ -606,8 +611,8 @@ ab.run();}
} }
} }
Fl_Box {} { Fl_Box {} {
label {<empty>} selected label {<empty>}
xywh {487 27 258 42} resizable xywh {487 27 203 42} resizable
code0 {o->labeltype( FL_NO_LABEL );} code0 {o->labeltype( FL_NO_LABEL );}
} }
Fl_Group {} {open Fl_Group {} {open
@ -658,6 +663,12 @@ ab.run();}
code0 {\#include "FL/Fl_Blinker.H"} code0 {\#include "FL/Fl_Blinker.H"}
class Fl_Blinker class Fl_Blinker
} }
Fl_Button lash_blinker {
label LASH
xywh {695 30 50 15} box ROUNDED_BOX down_box ROUNDED_BOX color 75 selection_color 86 labelfont 2 labelcolor 39 deactivate
code0 {\#include "FL/Fl_Blinker.H"}
class Fl_Blinker
}
} }
Fl_Progress progress { Fl_Progress progress {
label {0%} label {0%}
@ -759,7 +770,8 @@ if ( engine->zombified() && ! zombie )
} }
solo_blinker->value( Track::soloing() ); solo_blinker->value( Track::soloing() );
rec_blinker->value( transport->rolling && transport->rec_enabled() );} {} rec_blinker->value( transport->rolling && transport->rec_enabled() );
lash_blinker->value( lash->enabled() );} {}
} }
Function {update_cb( void *v )} {open private return_type {static void} Function {update_cb( void *v )} {open private return_type {static void}
} { } {

View File

@ -86,6 +86,17 @@ ensure_dirs ( void )
#include <signal.h> #include <signal.h>
void
shift ( char **argv, int *argc, int n )
{
int i;
for ( i = 0; i < *argc; ++i )
argv[ i ] = argv[ i + n ];
argv[ i ] = 0;
argc -= n;
}
int int
main ( int argc, char **argv ) main ( int argc, char **argv )
@ -137,6 +148,12 @@ main ( int argc, char **argv )
MESSAGE( "Initializing LASH" ); MESSAGE( "Initializing LASH" );
lash = new LASH; lash = new LASH;
if ( argc > 1 && ! strcmp( argv[1], "--no-lash" ) )
{
MESSAGE( "--no-lash specified on command-line: LASH disabled." );
shift( argv, &argc, 1 );
}
else
lash->init( jack_name, APP_TITLE, &argc, &argv ); lash->init( jack_name, APP_TITLE, &argc, &argv );
MESSAGE( "Starting GUI" ); MESSAGE( "Starting GUI" );