mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-21 14:02:57 +02:00
Add GetInfo Preferences.
This commit is contained in:
@@ -63,7 +63,7 @@ void CommandMessageTarget::AddItem(const wxString &value, const wxString &name){
|
||||
mCounts.Last() += 1;
|
||||
}
|
||||
void CommandMessageTarget::AddBool(const bool value, const wxString &name){
|
||||
Update( wxString::Format( "%s%s%s%s", (mCounts.Last()>0)?", ":"", name, !name.IsEmpty()?":":"",value?"True":"False"));
|
||||
Update( wxString::Format( "%s%s%s\"%s\"", (mCounts.Last()>0)?", ":"", name, !name.IsEmpty()?":":"",value?"true":"false"));
|
||||
mCounts.Last() += 1;
|
||||
}
|
||||
void CommandMessageTarget::AddItem(const double value, const wxString &name){
|
||||
|
@@ -39,10 +39,14 @@ This class now lists
|
||||
#include "../ShuttleGui.h"
|
||||
#include "CommandContext.h"
|
||||
|
||||
#include "../prefs/PrefsDialog.h"
|
||||
#include "../ShuttleGui.h"
|
||||
|
||||
enum {
|
||||
kCommands,
|
||||
kCommandsPlus,
|
||||
kMenus,
|
||||
kPreferences,
|
||||
kTracks,
|
||||
kClips,
|
||||
kEnvelopes,
|
||||
@@ -56,6 +60,7 @@ static const wxString kTypes[nTypes] =
|
||||
XO("Commands"),
|
||||
XO("Commands+"),
|
||||
XO("Menus"),
|
||||
XO("Preferences"),
|
||||
XO("Tracks"),
|
||||
XO("Clips"),
|
||||
XO("Envelopes"),
|
||||
@@ -133,6 +138,7 @@ bool GetInfoCommand::ApplyInner(const CommandContext &context)
|
||||
case kCommands : return SendCommands( context, 0 );
|
||||
case kCommandsPlus : return SendCommands( context, 1 );
|
||||
case kMenus : return SendMenus( context );
|
||||
case kPreferences : return SendPreferences( context );
|
||||
case kTracks : return SendTracks( context );
|
||||
case kClips : return SendClips( context );
|
||||
case kEnvelopes : return SendEnvelopes( context );
|
||||
@@ -171,6 +177,19 @@ bool GetInfoCommand::SendMenus(const CommandContext &context)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GetInfoCommand::SendPreferences(const CommandContext &context)
|
||||
{
|
||||
context.StartArray();
|
||||
GlobalPrefsDialog dialog( context.GetProject() );
|
||||
// wxCommandEvent Evt;
|
||||
//dialog.Show();
|
||||
wxWindow * pWin = context.GetProject();
|
||||
ShuttleGuiGetDefinition S(pWin, *((context.pOutput)->mStatusTarget) );
|
||||
dialog.ShuttleAll( S );
|
||||
context.EndArray();
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
Send the list of commands.
|
||||
*/
|
||||
|
@@ -49,6 +49,7 @@ public:
|
||||
private:
|
||||
bool SendCommands(const CommandContext & context, int flags);
|
||||
bool SendMenus(const CommandContext & context);
|
||||
bool SendPreferences(const CommandContext & context);
|
||||
bool SendTracks(const CommandContext & context);
|
||||
bool SendLabels(const CommandContext & context);
|
||||
bool SendClips(const CommandContext & context);
|
||||
|
Reference in New Issue
Block a user