From a25ea6338977283f4f1c1dbfa9a21a350100a541 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Tue, 12 Mar 2013 17:45:12 -0700 Subject: [PATCH] Timeline: Report name as non-daw when invoked as such, as non-timeline otherwise. --- timeline/src/Engine/const.h | 2 +- timeline/src/Project.C | 4 ++-- timeline/src/const.h | 6 +++--- timeline/src/main.C | 12 +++++++++--- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/timeline/src/Engine/const.h b/timeline/src/Engine/const.h index 44edea4..623ca48 100644 --- a/timeline/src/Engine/const.h +++ b/timeline/src/Engine/const.h @@ -17,4 +17,4 @@ /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*******************************************************************************/ -#define __MODULE__ "non-daw:engine" +#define __MODULE__ "non-timeline:engine" diff --git a/timeline/src/Project.C b/timeline/src/Project.C index 770e707..1551693 100644 --- a/timeline/src/Project.C +++ b/timeline/src/Project.C @@ -117,8 +117,8 @@ Project::write_info ( void ) else strcpy( s, _created_on ); - fprintf( fp, "created by\n\t%s\ncreated on\n\t%s\nversion\n\t%d\nsample rate\n\t%lu\n", - APP_NAME " " VERSION, + fprintf( fp, "created by\n\t%s %s\ncreated on\n\t%s\nversion\n\t%d\nsample rate\n\t%lu\n", + APP_NAME, VERSION, s, PROJECT_VERSION, (unsigned long)timeline->sample_rate() ); diff --git a/timeline/src/const.h b/timeline/src/const.h index 9d624d4..385b0ce 100644 --- a/timeline/src/const.h +++ b/timeline/src/const.h @@ -17,6 +17,6 @@ /* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*******************************************************************************/ -#define APP_NAME "Non-DAW" -#define APP_TITLE "The Non-DAW" -#define __MODULE__ "non-daw" +extern const char *APP_NAME; +extern const char *APP_TITLE; +#define __MODULE__ "non-timeline" diff --git a/timeline/src/main.C b/timeline/src/main.C index 5223084..0d5bbbb 100644 --- a/timeline/src/main.C +++ b/timeline/src/main.C @@ -71,15 +71,15 @@ char *instance_name = NULL; /* TODO: put these in a header */ #define USER_CONFIG_DIR ".non-daw/" -const char APP_NAME[] = "Non-Timeline"; -const char APP_TITLE[] = "The Non-Timeline"; +const char *APP_NAME = "Non-Timeline"; +const char *APP_TITLE = "The Non-Timeline"; + const char COPYRIGHT[] = "Copyright (C) 2008-2013 Jonathan Moore Liles"; const double NSM_CHECK_INTERVAL = 0.25f; #define PACKAGE "non" - #include "const.h" #include "debug.h" @@ -144,6 +144,12 @@ check_sigterm ( void * ) int main ( int argc, char **argv ) { + if ( !strcmp( argv[0], "non-daw" ) ) + { + /* use old app name and title */ + APP_NAME = "Non-DAW"; + APP_TITLE = "The Non-DAW"; + } printf( "%s %s -- %s\n", APP_TITLE, VERSION, COPYRIGHT );