|
From: <pst...@us...> - 2008-03-30 12:21:13
|
Revision: 364
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=364&view=rev
Author: pstieber
Date: 2008-03-30 05:21:10 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
1. Fixed some comments.
2. Made cosmetic changes.
3. Added code to set the startup song in OpenSong.
Modified Paths:
--------------
trunk/jazz/src/Project.cpp
Modified: trunk/jazz/src/Project.cpp
===================================================================
--- trunk/jazz/src/Project.cpp 2008-03-30 12:07:02 UTC (rev 363)
+++ trunk/jazz/src/Project.cpp 2008-03-30 12:21:10 UTC (rev 364)
@@ -295,8 +295,8 @@
}
- // Attempt to load the song given on commandline or load "jazz.mid".
- cout << "load song" << endl;
+ // Attempt to load the song given on command line or the file specified in
+ // the configuration file.
opt = GetOptionIndex( "-f" ) + 1;
if (opt && (wxTheApp->argc > opt))
{
@@ -306,7 +306,7 @@
{
gpStartUpSong = mpConfig->StrValue(C_StartUpSong);
}
- FILE *fd = fopen(gpStartUpSong.c_str(), "r");
+ FILE* fd = fopen(gpStartUpSong.c_str(), "r");
if (fd)
{
fclose(fd);
@@ -317,11 +317,6 @@
// lasts = gpStartUpSong;
// }
}
-
-
-
-
-
}
//-----------------------------------------------------------------------------
@@ -500,16 +495,16 @@
mPatternFileName = PatternFileName;
}
-/**
- *
- * Open a midi file. Pass it a wxString containing the path to the file.
- *
- */
+//-----------------------------------------------------------------------------
+// Description:
+// Open a midi file. Pass it a wxString containing the path to the file.
+//-----------------------------------------------------------------------------
void JZProject::OpenSong(const wxString& SongFileName)
{
tStdRead io;
Clear();
Read(io, SongFileName);
+ mpConfig->Put(C_StartUpSong, SongFileName.c_str());
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|