From 6447678a08c23cd14afe8d66782db8537f66c398 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Tue, 12 Feb 2008 12:21:42 -0600 Subject: [PATCH] Add more status line output. --- Makefile | 4 ++-- gui/ui.fl | 19 +++++++++++++------ smf.C | 1 - transport.H | 10 ++++++---- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 52ff318..7c4bdbf 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,9 @@ DOCUMENT_PATH=$(PREFIX)/share/doc/non-sequencer/ USE_LASH=1 # Debugging -# CFLAGS:=-O0 -ggdb -fno-omit-frame-pointer -Wall +CFLAGS:=-O0 -ggdb -fno-omit-frame-pointer -Wall # Production -CFLAGS:=-O3 -fomit-frame-pointer -DNDEBUG +# CFLAGS:=-O3 -fomit-frame-pointer -DNDEBUG CFLAGS+=-DINSTALL_PREFIX=\"$(PREFIX)\" \ -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \ diff --git a/gui/ui.fl b/gui/ui.fl index 378e68d..265949f 100644 --- a/gui/ui.fl +++ b/gui/ui.fl @@ -169,6 +169,9 @@ if ( maybe_save_song() ) update_pattern_widgets(); update_sequence_widgets(); update_phrase_widgets(); + + + gui_status( "New song." ); }} xywh {0 0 40 25} } @@ -180,6 +183,8 @@ if ( name ) { if ( ! load_song( name ) ) fl_alert( "Could not load song!" ); + else + gui_status( "Song opened." ); update_sequence_widgets(); update_pattern_widgets(); @@ -192,7 +197,7 @@ if ( name ) } MenuItem menu_save { label {&Save} - callback {save_dialog( song.filename );} selected + callback {save_dialog( song.filename );} xywh {0 0 40 25} shortcut 0x40073 color 37 deactivate code0 {song.signal_dirty.connect( sigc::mem_fun( o, &Fl_Menu_Item::activate ) );} code1 {song.signal_clean.connect( sigc::mem_fun( o, &Fl_Menu_Item::deactivate ) );} @@ -950,8 +955,8 @@ else } } } - Fl_Output status { - xywh {3 776 861 21} box NO_BOX color 32 labeltype NO_LABEL textcolor 55 + Fl_Output status {selected + xywh {0 776 869 25} box UP_BOX color 32 labeltype NO_LABEL textcolor 55 } } } @@ -1183,7 +1188,7 @@ if ( phrase_c->grid() ) return 0;} {} } - Function {save_dialog( const char *name )} {return_type void + Function {save_dialog( const char *name )} {open return_type void } { code {if ( ! name ) { @@ -1203,7 +1208,9 @@ return 0;} {} } if ( ! save_song( name ) ) - fl_alert( "Could not save song" );} {} + fl_alert( "Could not save song" ); +else + gui_status( "Saved." );} {} } Function {show_help_dialog( const char *file )} {return_type void } { @@ -1222,7 +1229,7 @@ help->show(); // FIXME: need to delete it somehow. // help->show(1, argv);} {} } - Function {maybe_save_song()} {return_type bool + Function {maybe_save_song()} {open return_type bool } { code {if ( song.dirty() ) { diff --git a/smf.C b/smf.C index 97eee0f..c6cd1d4 100644 --- a/smf.C +++ b/smf.C @@ -947,7 +947,6 @@ smf::track_listing ( void ) int i; long where = ftell( _fp ); - MESSAGE( "@ %lu", where ); for ( i = 0; next_track(); ++i ) { diff --git a/transport.H b/transport.H index 06f6297..5b06ead 100644 --- a/transport.H +++ b/transport.H @@ -21,13 +21,15 @@ #include +using namespace sigc; + #include "event.H" // just for tick_t #include typedef double playhead_t; -class Transport : public sigc::trackable { +class Transport : public trackable { double _master_beats_per_minute; unsigned _master_beats_per_bar; @@ -35,9 +37,9 @@ class Transport : public sigc::trackable { public: - sigc::signal signal_tempo_change; - sigc::signal signal_bpb_change; - sigc::signal signal_beat_change; + signal signal_tempo_change; + signal signal_bpb_change; + signal signal_beat_change; bool master; /* are we driving the transport? */ bool rolling;