From: curt Date: Mon, 18 Nov 2002 21:34:07 +0000 (+0000) Subject: Removed depricated files. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=80e8647330a957e9450daaef0ed9a7949a3b846f;p=flightgear.git Removed depricated files. --- diff --git a/src/GUI/Makefile.am b/src/GUI/Makefile.am index 2d780faec..5ca85815f 100644 --- a/src/GUI/Makefile.am +++ b/src/GUI/Makefile.am @@ -7,7 +7,6 @@ NETWORK_SRCS = endif libGUI_a_SOURCES = \ - apt_dlg.cxx apt_dlg.hxx \ new_gui.cxx new_gui.hxx \ gui.cxx gui.h gui_funcs.cxx \ gui_local.cxx gui_local.hxx \ diff --git a/src/GUI/apt_dlg.cxx b/src/GUI/apt_dlg.cxx deleted file mode 100644 index d751977c7..000000000 --- a/src/GUI/apt_dlg.cxx +++ /dev/null @@ -1,168 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#ifdef HAVE_WINDOWS_H -# include -#endif - -#include - -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include
-#include
-#include
-#include - -#include "gui.h" -#include "gui_local.hxx" - -/// The beginnings of teleportation :-) -// Needs cleaning up but works -// These statics should disapear when this is a class -static puDialogBox *AptDialog = 0; -static puFrame *AptDialogFrame = 0; -static puText *AptDialogMessage = 0; -static puInput *AptDialogInput = 0; - -static char NewAirportId[16]; -static char NewAirportLabel[] = "Enter New Airport ID"; - -static puOneShot *AptDialogOkButton = 0; -static puOneShot *AptDialogCancelButton = 0; -static puOneShot *AptDialogResetButton = 0; - -void AptDialog_Cancel(puObject *) -{ - FG_POP_PUI_DIALOG( AptDialog ); -} - -void AptDialog_OK (puObject *) -{ - static const SGPropertyNode *longitude - = fgGetNode("/position/longitude-deg"); - static const SGPropertyNode *latitude - = fgGetNode("/position/latitude-deg"); - static const SGPropertyNode *master_freeze - = fgGetNode("/sim/freeze/master"); - - SGPath path( globals->get_fg_root() ); - path.append( "Airports" ); - path.append( "simple.mk4" ); - FGAirports airports( path.c_str() ); - - FGAirport a; - - bool freeze = master_freeze->getBoolValue(); - if ( !freeze ) { - fgSetBool("/sim/freeze/master", true); - } - - char *s; - AptDialogInput->getValue(&s); - string AptId(s); - - cout << "AptDialog_OK " << AptId << " " << AptId.length() << endl; - - AptDialog_Cancel( NULL ); - - if ( AptId.length() ) { - // set initial position from airport id - SG_LOG( SG_GENERAL, SG_INFO, - "Attempting to set starting position from airport code " - << AptId ); - - if ( airports.search( AptId, &a ) ) - { - // unbind the current fdm state so property changes - // don't get lost when we subsequently delete this fdm - // and create a new one. - cur_fdm_state->unbind(); - - AptId = a.id.c_str(); /// NHV fix wrong case crash - fgSetString("/sim/presets/airport-id", AptId.c_str() ); - fgSetDouble("/sim/presets/longitude-deg", -9999.0 ); - fgSetDouble("/sim/presets/latitude-deg", -9999.0 ); - fgInitPosition(); - - // BusyCursor(0); - fgReInitSubsystems(); - double visibility_meters = - fgGetDouble("/environment/visibility-m"); - global_tile_mgr.update( longitude->getDoubleValue(), - latitude->getDoubleValue(), - visibility_meters ); - // BusyCursor(1); - } else { - AptId += " not in database."; - mkDialog(AptId.c_str()); - } - } - if ( !freeze ) { - fgSetBool("/sim/freeze/master", false); - } -} - - -void AptDialog_Reset(puObject *) -{ - // strncpy( NewAirportId, fgGetString("/sim/presets/airport-id").c_str(), 16 ); - sprintf( NewAirportId, "%s", fgGetString("/sim/presets/airport-id") ); - AptDialogInput->setValue ( NewAirportId ); - AptDialogInput->setCursor( 0 ) ; -} - -void NewAirport(puObject *cb) -{ - // strncpy( NewAirportId, fgGetString("/sim/presets/airport-id").c_str(), 16 ); - sprintf( NewAirportId, "%s", fgGetString("/sim/presets/airport-id") ); - // cout << "NewAirport " << NewAirportId << endl; - AptDialogInput->setValue( NewAirportId ); - - FG_PUSH_PUI_DIALOG( AptDialog ); -} - -void NewAirportInit(void) -{ - sprintf( NewAirportId, "%s", fgGetString("/sim/presets/airport-id") ); - int len = 150 - - puGetDefaultLabelFont().getStringWidth( NewAirportLabel ) / 2; - - AptDialog = new puDialogBox (150, 50); - { - AptDialogFrame = new puFrame (0,0,350, 150); - AptDialogMessage = new puText (len, 110); - AptDialogMessage -> setLabel (NewAirportLabel); - - AptDialogInput = new puInput (50, 70, 300, 100); - AptDialogInput -> setValue (NewAirportId); - AptDialogInput -> acceptInput(); - - AptDialogOkButton = new puOneShot (50, 10, 110, 50); - AptDialogOkButton -> setLegend (gui_msg_OK); - AptDialogOkButton -> setCallback (AptDialog_OK); - AptDialogOkButton -> makeReturnDefault(TRUE); - - AptDialogCancelButton = new puOneShot (140, 10, 210, 50); - AptDialogCancelButton -> setLegend (gui_msg_CANCEL); - AptDialogCancelButton -> setCallback (AptDialog_Cancel); - - AptDialogResetButton = new puOneShot (240, 10, 300, 50); - AptDialogResetButton -> setLegend (gui_msg_RESET); - AptDialogResetButton -> setCallback (AptDialog_Reset); - } - cout << "NewAirportInit " << NewAirportId << endl; - FG_FINALIZE_PUI_DIALOG( AptDialog ); -} diff --git a/src/GUI/apt_dlg.hxx b/src/GUI/apt_dlg.hxx deleted file mode 100644 index f28c02d81..000000000 --- a/src/GUI/apt_dlg.hxx +++ /dev/null @@ -1,7 +0,0 @@ -#include - -extern void AptDialog_Cancel(puObject *); -extern void AptDialog_OK (puObject *); -extern void AptDialog_Reset(puObject *); -extern void NewAirport(puObject *cb); -extern void NewAirportInit(void);