|
From: <pst...@us...> - 2008-04-06 22:54:06
|
Revision: 429
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=429&view=rev
Author: pstieber
Date: 2008-04-06 15:54:03 -0700 (Sun, 06 Apr 2008)
Log Message:
-----------
Moved the synthesizer dialog under the Dialogs directory and adjusted the builds
accordingly.
Modified Paths:
--------------
trunk/jazz/src/Makefile.am
trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj
trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
Added Paths:
-----------
trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.cpp
trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.h
Removed Paths:
-------------
trunk/jazz/src/SynthesizerSettingsDialog.cpp
trunk/jazz/src/SynthesizerSettingsDialog.h
Copied: trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.cpp (from rev 427, trunk/jazz/src/SynthesizerSettingsDialog.cpp)
===================================================================
--- trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.cpp (rev 0)
+++ trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.cpp 2008-04-06 22:54:03 UTC (rev 429)
@@ -0,0 +1,166 @@
+//*****************************************************************************
+// The JAZZ++ Midi Sequencer
+//
+// Copyright (C) 2008 Peter J. Stieber, all rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//*****************************************************************************
+
+#include "WxWidgets.h"
+
+#include "SynthesizerSettingsDialog.h"
+#include "../Configuration.h"
+#include "../Globals.h"
+
+using namespace std;
+
+//*****************************************************************************
+//*****************************************************************************
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+BEGIN_EVENT_TABLE(JZSynthesizerDialog, wxDialog)
+
+ EVT_BUTTON(wxID_HELP, JZSynthesizerDialog::OnHelp)
+
+END_EVENT_TABLE()
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+JZSynthesizerDialog::JZSynthesizerDialog(wxWindow* pParent)
+ : wxDialog(pParent, wxID_ANY, wxString("Synthesizer Settings")),
+ mpSynthesizerListbox(0),
+ mpStartListbox(0)
+{
+ mpSynthesizerListbox = new wxListBox(this, wxID_ANY);
+
+ for (
+ vector<pair<string, int> >::const_iterator iPair =
+ gSynthesizerTypes.begin();
+ iPair != gSynthesizerTypes.end();
+ ++iPair)
+ {
+ mpSynthesizerListbox->Append(iPair->first.c_str());
+ }
+
+ mpStartListbox = new wxListBox(this, wxID_ANY);
+
+ mpStartListbox->Append("Never");
+ mpStartListbox->Append("Song Start");
+ mpStartListbox->Append("Start Play");
+
+ wxButton* pOkButton = new wxButton(this, wxID_OK, "&OK");
+ wxButton* pCancelButton = new wxButton(this, wxID_CANCEL, "Cancel");
+ wxButton* pHelpButton = new wxButton(this, wxID_HELP, "Help");
+ pOkButton->SetDefault();
+
+ wxBoxSizer* pTopSizer = new wxBoxSizer(wxVERTICAL);
+ wxBoxSizer* pListControlSizer = new wxBoxSizer(wxHORIZONTAL);
+ wxBoxSizer* pButtonSizer = new wxBoxSizer(wxHORIZONTAL);
+
+ wxBoxSizer* pLeftSizer = new wxBoxSizer(wxVERTICAL);
+ wxBoxSizer* pRightSizer = new wxBoxSizer(wxVERTICAL);
+
+ pLeftSizer->Add(
+ new wxStaticText(this, wxID_ANY, "Synthesizer Type"),
+ 0,
+ wxALL,
+ 2);
+ pLeftSizer->Add(mpSynthesizerListbox, 0, wxGROW | wxALL, 2);
+
+ pRightSizer->Add(
+ new wxStaticText(this, wxID_ANY, "Send MIDI Reset"),
+ 0,
+ wxALL,
+ 2);
+ pRightSizer->Add(mpStartListbox, 0, wxALL, 2);
+
+ pListControlSizer->Add(pLeftSizer, 0, wxALL, 3);
+ pListControlSizer->Add(pRightSizer, 0, wxALL, 3);
+
+ pTopSizer->Add(pListControlSizer, 0, wxCENTER);
+
+ pButtonSizer->Add(pOkButton, 0, wxALL, 5);
+ pButtonSizer->Add(pCancelButton, 0, wxALL, 5);
+ pButtonSizer->Add(pHelpButton, 0, wxALL, 5);
+
+ pTopSizer->Add(pButtonSizer, 0, wxALIGN_CENTER | wxBOTTOM, 6);
+
+ SetAutoLayout(true);
+ SetSizer(pTopSizer);
+
+ pTopSizer->SetSizeHints(this);
+ pTopSizer->Fit(this);
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+bool JZSynthesizerDialog::TransferDataToWindow()
+{
+ int Selection(0), Index(0);
+ for (
+ vector<pair<string, int> >::const_iterator iPair =
+ gSynthesizerTypes.begin();
+ iPair != gSynthesizerTypes.end();
+ ++iPair, ++Index)
+ {
+ if (strcmp(iPair->first.c_str(), gpConfig->StrValue(C_SynthType)) == 0)
+ {
+ mOldSynthTypeName = iPair->first;
+ Selection = Index;
+ }
+ }
+ mpSynthesizerListbox->SetSelection(Selection);
+
+ mpStartListbox->SetSelection(gpConfig->GetValue(C_SendSynthReset));
+
+ return true;
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+bool JZSynthesizerDialog::TransferDataFromWindow()
+{
+ string SynthTypeName(mOldSynthTypeName);
+ wxString SelectionString = mpSynthesizerListbox->GetStringSelection();
+ if (!SelectionString.empty())
+ {
+ SynthTypeName = SelectionString;
+ }
+
+ int Selection = mpStartListbox->GetSelection();
+ if (Selection != wxNOT_FOUND)
+ {
+ gpConfig->Put(C_SendSynthReset, Selection);
+ }
+
+ if (mOldSynthTypeName != SynthTypeName)
+ {
+ gpConfig->Put(C_SynthType, SynthTypeName.c_str());
+
+ ::wxMessageBox(
+ "Restart jazz for the synthesizer type change to take effect",
+ "Info",
+ wxOK);
+ }
+
+ return true;
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZSynthesizerDialog::OnHelp(wxCommandEvent& Event)
+{
+// gpHelpInstance->ShowTopic("Synthesizer Type Settings");
+}
Copied: trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.h (from rev 427, trunk/jazz/src/SynthesizerSettingsDialog.h)
===================================================================
--- trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.h (rev 0)
+++ trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.h 2008-04-06 22:54:03 UTC (rev 429)
@@ -0,0 +1,53 @@
+//*****************************************************************************
+// The JAZZ++ Midi Sequencer
+//
+// Copyright (C) 2008 Peter J. Stieber, all rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//*****************************************************************************
+
+#ifndef JZ_SYNTHESIZERSETTINGDIALOG_H
+#define JZ_SYNTHESIZERSETTINGDIALOG_H
+
+#include <string>
+
+//*****************************************************************************
+//*****************************************************************************
+class JZSynthesizerDialog : public wxDialog
+{
+ public:
+
+ JZSynthesizerDialog(wxWindow* pParent);
+
+ private:
+
+ virtual bool TransferDataToWindow();
+
+ virtual bool TransferDataFromWindow();
+
+ void OnHelp(wxCommandEvent& Event);
+
+ private:
+
+ std::string mOldSynthTypeName;
+
+ wxListBox* mpSynthesizerListbox;
+
+ wxListBox* mpStartListbox;
+
+ DECLARE_EVENT_TABLE();
+};
+
+#endif // !defined(JZ_SYNTHESIZERSETTINGDIALOG_H)
Modified: trunk/jazz/src/Makefile.am
===================================================================
--- trunk/jazz/src/Makefile.am 2008-04-06 22:49:11 UTC (rev 428)
+++ trunk/jazz/src/Makefile.am 2008-04-06 22:54:03 UTC (rev 429)
@@ -19,6 +19,7 @@
DeprecatedWx/propform.cpp \
DeprecatedWx/proplist.cpp \
Dialogs/MetronomeSettingsDialog.cpp \
+Dialogs/SynthesizerSettingsDialog.cpp \
Dialogs.cpp \
DynamicArray.cpp \
ErrorMessage.cpp \
@@ -71,7 +72,6 @@
StandardFile.cpp \
StringReadWrite.cpp \
Synth.cpp \
-SynthesizerSettingsDialog.cpp \
ToolBar.cpp \
Track.cpp \
TrackFrame.cpp \
@@ -94,6 +94,7 @@
DeprecatedWx/proplist.h \
DeprecatedStringUtils.h \
Dialogs/MetronomeSettingsDialog.cpp \
+Dialogs/SynthesizerSettingsDialog.h \
Dialogs.h \
DynamicArray.h \
ErrorMessage.h \
@@ -148,7 +149,6 @@
StandardFile.h \
StringReadWrite.h \
Synth.h \
-SynthesizerSettingsDialog.h \
ToolBar.h \
TrackFrame.h \
Track.h \
Deleted: trunk/jazz/src/SynthesizerSettingsDialog.cpp
===================================================================
--- trunk/jazz/src/SynthesizerSettingsDialog.cpp 2008-04-06 22:49:11 UTC (rev 428)
+++ trunk/jazz/src/SynthesizerSettingsDialog.cpp 2008-04-06 22:54:03 UTC (rev 429)
@@ -1,166 +0,0 @@
-//*****************************************************************************
-// The JAZZ++ Midi Sequencer
-//
-// Copyright (C) 2008 Peter J. Stieber, all rights reserved.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//*****************************************************************************
-
-#include "WxWidgets.h"
-
-#include "SynthesizerSettingsDialog.h"
-#include "Configuration.h"
-#include "Globals.h"
-
-using namespace std;
-
-//*****************************************************************************
-//*****************************************************************************
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(JZSynthesizerDialog, wxDialog)
-
- EVT_BUTTON(wxID_HELP, JZSynthesizerDialog::OnHelp)
-
-END_EVENT_TABLE()
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-JZSynthesizerDialog::JZSynthesizerDialog(wxWindow* pParent)
- : wxDialog(pParent, wxID_ANY, wxString("Synthesizer Settings")),
- mpSynthesizerListbox(0),
- mpStartListbox(0)
-{
- mpSynthesizerListbox = new wxListBox(this, wxID_ANY);
-
- for (
- vector<pair<string, int> >::const_iterator iPair =
- gSynthesizerTypes.begin();
- iPair != gSynthesizerTypes.end();
- ++iPair)
- {
- mpSynthesizerListbox->Append(iPair->first.c_str());
- }
-
- mpStartListbox = new wxListBox(this, wxID_ANY);
-
- mpStartListbox->Append("Never");
- mpStartListbox->Append("Song Start");
- mpStartListbox->Append("Start Play");
-
- wxButton* pOkButton = new wxButton(this, wxID_OK, "&OK");
- wxButton* pCancelButton = new wxButton(this, wxID_CANCEL, "Cancel");
- wxButton* pHelpButton = new wxButton(this, wxID_HELP, "Help");
- pOkButton->SetDefault();
-
- wxBoxSizer* pTopSizer = new wxBoxSizer(wxVERTICAL);
- wxBoxSizer* pListControlSizer = new wxBoxSizer(wxHORIZONTAL);
- wxBoxSizer* pButtonSizer = new wxBoxSizer(wxHORIZONTAL);
-
- wxBoxSizer* pLeftSizer = new wxBoxSizer(wxVERTICAL);
- wxBoxSizer* pRightSizer = new wxBoxSizer(wxVERTICAL);
-
- pLeftSizer->Add(
- new wxStaticText(this, wxID_ANY, "Synthesizer Type"),
- 0,
- wxALL,
- 2);
- pLeftSizer->Add(mpSynthesizerListbox, 0, wxGROW | wxALL, 2);
-
- pRightSizer->Add(
- new wxStaticText(this, wxID_ANY, "Send MIDI Reset"),
- 0,
- wxALL,
- 2);
- pRightSizer->Add(mpStartListbox, 0, wxALL, 2);
-
- pListControlSizer->Add(pLeftSizer, 0, wxALL, 3);
- pListControlSizer->Add(pRightSizer, 0, wxALL, 3);
-
- pTopSizer->Add(pListControlSizer, 0, wxCENTER);
-
- pButtonSizer->Add(pOkButton, 0, wxALL, 5);
- pButtonSizer->Add(pCancelButton, 0, wxALL, 5);
- pButtonSizer->Add(pHelpButton, 0, wxALL, 5);
-
- pTopSizer->Add(pButtonSizer, 0, wxALIGN_CENTER | wxBOTTOM, 6);
-
- SetAutoLayout(true);
- SetSizer(pTopSizer);
-
- pTopSizer->SetSizeHints(this);
- pTopSizer->Fit(this);
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-bool JZSynthesizerDialog::TransferDataToWindow()
-{
- int Selection(0), Index(0);
- for (
- vector<pair<string, int> >::const_iterator iPair =
- gSynthesizerTypes.begin();
- iPair != gSynthesizerTypes.end();
- ++iPair, ++Index)
- {
- if (strcmp(iPair->first.c_str(), gpConfig->StrValue(C_SynthType)) == 0)
- {
- mOldSynthTypeName = iPair->first;
- Selection = Index;
- }
- }
- mpSynthesizerListbox->SetSelection(Selection);
-
- mpStartListbox->SetSelection(gpConfig->GetValue(C_SendSynthReset));
-
- return true;
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-bool JZSynthesizerDialog::TransferDataFromWindow()
-{
- string SynthTypeName(mOldSynthTypeName);
- wxString SelectionString = mpSynthesizerListbox->GetStringSelection();
- if (!SelectionString.empty())
- {
- SynthTypeName = SelectionString;
- }
-
- int Selection = mpStartListbox->GetSelection();
- if (Selection != wxNOT_FOUND)
- {
- gpConfig->Put(C_SendSynthReset, Selection);
- }
-
- if (mOldSynthTypeName != SynthTypeName)
- {
- gpConfig->Put(C_SynthType, SynthTypeName.c_str());
-
- ::wxMessageBox(
- "Restart jazz for the synthesizer type change to take effect",
- "Info",
- wxOK);
- }
-
- return true;
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-void JZSynthesizerDialog::OnHelp(wxCommandEvent& Event)
-{
-// gpHelpInstance->ShowTopic("Synthesizer Type Settings");
-}
Deleted: trunk/jazz/src/SynthesizerSettingsDialog.h
===================================================================
--- trunk/jazz/src/SynthesizerSettingsDialog.h 2008-04-06 22:49:11 UTC (rev 428)
+++ trunk/jazz/src/SynthesizerSettingsDialog.h 2008-04-06 22:54:03 UTC (rev 429)
@@ -1,53 +0,0 @@
-//*****************************************************************************
-// The JAZZ++ Midi Sequencer
-//
-// Copyright (C) 2008 Peter J. Stieber, all rights reserved.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//*****************************************************************************
-
-#ifndef JZ_SYNTHESIZERSETTINGDIALOG_H
-#define JZ_SYNTHESIZERSETTINGDIALOG_H
-
-#include <string>
-
-//*****************************************************************************
-//*****************************************************************************
-class JZSynthesizerDialog : public wxDialog
-{
- public:
-
- JZSynthesizerDialog(wxWindow* pParent);
-
- private:
-
- virtual bool TransferDataToWindow();
-
- virtual bool TransferDataFromWindow();
-
- void OnHelp(wxCommandEvent& Event);
-
- private:
-
- std::string mOldSynthTypeName;
-
- wxListBox* mpSynthesizerListbox;
-
- wxListBox* mpStartListbox;
-
- DECLARE_EVENT_TABLE();
-};
-
-#endif // !defined(JZ_SYNTHESIZERSETTINGDIALOG_H)
Modified: trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj
===================================================================
--- trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj 2008-04-06 22:49:11 UTC (rev 428)
+++ trunk/jazz/vc8/JazzPlusPlus-VC8.vcproj 2008-04-06 22:54:03 UTC (rev 429)
@@ -733,14 +733,6 @@
>
</File>
<File
- RelativePath="..\src\SynthesizerSettingsDialog.cpp"
- >
- </File>
- <File
- RelativePath="..\src\SynthesizerSettingsDialog.h"
- >
- </File>
- <File
RelativePath="..\src\ToolBar.cpp"
>
</File>
@@ -829,6 +821,14 @@
RelativePath="..\src\Dialogs\MetronomeSettingsDialog.h"
>
</File>
+ <File
+ RelativePath="..\src\Dialogs\SynthesizerSettingsDialog.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\src\Dialogs\SynthesizerSettingsDialog.h"
+ >
+ </File>
</Filter>
</Files>
<Globals>
Modified: trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
===================================================================
--- trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2008-04-06 22:49:11 UTC (rev 428)
+++ trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2008-04-06 22:54:03 UTC (rev 429)
@@ -732,14 +732,6 @@
>
</File>
<File
- RelativePath="..\src\SynthesizerSettingsDialog.cpp"
- >
- </File>
- <File
- RelativePath="..\src\SynthesizerSettingsDialog.h"
- >
- </File>
- <File
RelativePath="..\src\ToolBar.cpp"
>
</File>
@@ -828,6 +820,14 @@
RelativePath="..\src\Dialogs\MetronomeSettingsDialog.h"
>
</File>
+ <File
+ RelativePath="..\src\Dialogs\SynthesizerSettingsDialog.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\src\Dialogs\SynthesizerSettingsDialog.h"
+ >
+ </File>
</Filter>
</Files>
<Globals>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|