//
// Written by Curtis Olson, started November 2002.
//
-// Copyright (C) 2002 Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2002 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
//
// 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.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
// $Id$
# include <windows.h>
#endif
-#include <simgear/misc/commands.hxx>
+#include <simgear/structure/commands.hxx>
#include <simgear/misc/sg_path.hxx>
#include <Main/fg_props.hxx>
{
char *value;
PresetDialogInput->getValue(&value);
- cout << "setting " << PresetProperty << " = " << value << endl;
+ SG_LOG( SG_GENERAL, SG_DEBUG, "setting " << PresetProperty
+ << " = " << value );
fgSetString( PresetProperty.c_str(), value );
FG_POP_PUI_DIALOG( PresetDialog );
if ( fabs(fgGetDouble("/sim/presets/altitude-ft")) > 0.000001
&& fabs(fgGetDouble("/sim/presets/glideslope-deg")) > 0.000001 ) {
fgSetDouble("/sim/presets/altitude-ft", -9999.0);
- cout << "nuking altitude" << endl;
+ SG_LOG( SG_GENERAL, SG_DEBUG, "nuking altitude" );
}
} else if ( PresetProperty == "/sim/presets/altitude-ft" ) {
if ( fabs(fgGetDouble("/sim/presets/offset-distance")) > 0.000001
&& fabs(fgGetDouble("/sim/presets/glideslope-deg")) > 0.000001 ) {
fgSetDouble("/sim/presets/offset-distance", 0.0);
- cout << "nuking offset distance" << endl;
+ SG_LOG( SG_GENERAL, SG_DEBUG, "nuking offset distance" );
}
} else if ( PresetProperty == "/sim/presets/glideslope-deg" ) {
if ( fabs(fgGetDouble("/sim/presets/offset-distance")) > 0.000001
&& fabs(fgGetDouble("/sim/presets/altitude-ft")) > 0.000001 ) {
fgSetDouble("/sim/presets/altitude-ft", -9999.0);
- cout << "nuking altitude" << endl;
+ SG_LOG( SG_GENERAL, SG_DEBUG, "nuking altitude" );
}
}
}
PresetDialogResetButton -> setLegend (gui_msg_RESET);
PresetDialogResetButton -> setCallback (PresetDialog_Reset);
}
- cout << "PresetInit " << PresetValue << endl;
+ SG_LOG( SG_GENERAL, SG_DEBUG, "PresetInit " << PresetValue );
FG_FINALIZE_PUI_DIALOG( PresetDialog );
}
void fgPresetCommit(puObject *)
{
SGPropertyNode args;
- if ( !globals->get_commands()->execute("presets_commit", &args) )
+ if ( !globals->get_commands()->execute("presets-commit", &args) )
{
- SG_LOG( SG_GENERAL, SG_ALERT, "Command: presets_commit failed.");
+ SG_LOG( SG_GENERAL, SG_ALERT, "Command: presets-commit failed.");
}
}