From f34496f7032c3c66fbd626c2ffd4e3b4ffcea196 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sun, 4 May 2008 17:20:38 -0500 Subject: [PATCH] Keep VERSION in Makefile --- Makefile | 4 +++- Timeline/Session.H | 3 +++ Timeline/TLE.fl | 38 ++++++++++++++++++++++++++++---------- Timeline/main.C | 2 -- 4 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 65dd8e9..c6bd71a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ +VERSION := 0.5.0 + FLTK_LIBS := `fltk-config --ldflags` JACK_LIBS := `pkg-config --libs jack` SNDFILE_LIBS := `pkg-config --libs sndfile` -CXXFLAGS := -ggdb -Wall -O0 -fno-rtti -fno-exceptions +CXXFLAGS := -DVERSION=\"$(VERSION)\" -ggdb -Wall -O0 -fno-rtti -fno-exceptions all: makedepend FL Timeline Mixer diff --git a/Timeline/Session.H b/Timeline/Session.H index e379bef..27bd4ac 100644 --- a/Timeline/Session.H +++ b/Timeline/Session.H @@ -17,6 +17,9 @@ /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*******************************************************************************/ +const char template_dir[] = "share/non-daw/templates"; +const char user_template_dir[] = "~/.non-daw/templates"; + class Session { diff --git a/Timeline/TLE.fl b/Timeline/TLE.fl index 4d94cae..1a23539 100644 --- a/Timeline/TLE.fl +++ b/Timeline/TLE.fl @@ -128,6 +128,10 @@ free( path );} {} label {&Session} open xywh {0 0 74 25} } { + MenuItem {} { + label {&Info} + xywh {0 0 40 25} deactivate + } MenuItem {} { label {&New} callback {const char *name = new_session_chooser(); @@ -654,7 +658,7 @@ while ( _window->shown() ) } { Fl_Window _window { label {New Session} open - xywh {464 344 550 195} type Double modal visible + xywh {576 340 550 195} type Double modal visible } { Fl_File_Input _name { label {Named:} @@ -662,8 +666,8 @@ while ( _window->shown() ) } Fl_Button {} { label Browse - callback {_directory->value( fl_dir_chooser( "Directory for new session", NULL, 0 ) );} selected - xywh {455 110 80 25} + callback {_directory->value( fl_dir_chooser( "Directory for new session", NULL, 0 ) );} + xywh {455 100 80 35} } Fl_Return_Button {} { label Create @@ -673,17 +677,31 @@ while ( _window->shown() ) snprintf( pat, sizeof( pat ), "%s/%s", _directory->value(), _name->value() ); +// if ( ! fl_filename_exists( pat ) ) + { - if ( ! Session::create( pat, _template->text( _template->value() ) ) ) - fl_alert( "Error opening session!" ); + if ( ! Session::create( pat, _template->text( _template->value() ) ) ) + fl_alert( "Error opening session!" ); - _window->hide(); -}} + _window->hide(); + } +// else +// { +// fl_alert( "A file already exists at that location. Choose a differnt name." ); +// +// } +}} selected xywh {455 140 80 35} } - Fl_Output _directory { + Fl_File_Input _directory { label {Where:} - private xywh {75 110 375 25} labeltype EMBOSSED_LABEL + callback {if ( ! fl_filename_isdir( o->value() ) ) +{ + fl_alert( "Must be a directory" ); + o->value( "" ); +}} + xywh {75 100 375 35} + code0 {\#include } } Fl_Box {} { label {New Session} @@ -691,7 +709,7 @@ while ( _window->shown() ) } Fl_Choice _template { label {Template:} - private xywh {310 70 225 25} down_box BORDER_BOX + private xywh {310 60 225 25} down_box BORDER_BOX } { MenuItem {} { label Default diff --git a/Timeline/main.C b/Timeline/main.C index 333c4f5..018f114 100644 --- a/Timeline/main.C +++ b/Timeline/main.C @@ -55,8 +55,6 @@ Engine *engine; Timeline *timeline; Transport *transport; -#define VERSION "0.5.0" - /* TODO: put these in a header */ #define USER_CONFIG_DIR ".non-daw/"