#include <plib/pu.h>
#include <simgear/debug/logstream.hxx>
-#include <Autopilot/auto_gui.hxx>
#include <Input/input.hxx>
#include <Main/globals.hxx>
-#include <Main/fg_props.hxx>
#include "new_gui.hxx"
#include "menubar.hxx"
}
#endif
-extern void prop_pickerView (puObject *);
-static bool
-do_properties_dialog (const SGPropertyNode * arg)
-{
- prop_pickerView(0);
- return true;
-}
-
-extern void AddWayPoint (puObject *);
-static bool
-do_ap_add_waypoint_dialog (const SGPropertyNode * arg)
-{
- AddWayPoint(0);
- return true;
-}
-
-extern void PopWayPoint (puObject *);
-static bool
-do_ap_pop_waypoint_dialog (const SGPropertyNode * arg)
-{
- PopWayPoint(0);
- return true;
-}
-
-extern void ClearRoute (puObject *);
-static bool
-do_ap_clear_route_dialog (const SGPropertyNode * arg)
-{
- ClearRoute(0);
- return true;
-}
-
-#if 0
-extern void fgAPAdjust (puObject *);
-static bool
-do_ap_adjust_dialog (const SGPropertyNode * arg)
-{
- fgAPAdjust(0);
- return true;
-}
-#endif
-
-extern void fgLatLonFormatToggle (puObject *);
-static bool
-do_lat_lon_format_dialog (const SGPropertyNode * arg)
-{
- fgLatLonFormatToggle(0);
- return true;
-}
-
extern void helpCb (puObject *);
static bool
do_help_dialog (const SGPropertyNode * arg)
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
{ "old-print-dialog", do_print_dialog },
#endif
- { "old-properties-dialog", do_properties_dialog },
- { "old-ap-add-waypoint-dialog", do_ap_add_waypoint_dialog },
- { "old-ap-pop-waypoint-dialog", do_ap_pop_waypoint_dialog },
- { "old-ap-clear-route-dialog", do_ap_clear_route_dialog },
- { "old-lat-lon-format-dialog", do_lat_lon_format_dialog },
{ "old-help-dialog", do_help_dialog },
{ 0, 0 }
};
FGMenuBar::fireItem (puObject * item)
{
const char * name = item->getLegend();
- vector<FGBinding *> &bindings = _bindings[name];
+ vector<SGBinding *> &bindings = _bindings[name];
int nBindings = bindings.size();
for (int i = 0; i < nBindings; i++)
for (unsigned int k = 0; k < bindings.size(); k++) {
unsigned int m = 0;
- SGPropertyNode *binding;
+ SGPropertyNode_ptr binding;
while (dest->getChild("binding", m))
m++;
binding = dest->getChild("binding", m, true);
copyProperties(bindings[k], binding);
- _bindings[items[j]].push_back(new FGBinding(binding));
+ _bindings[items[j]].push_back(new SGBinding(binding, globals->get_props()));
}
}
// Delete all those bindings
SG_LOG(SG_GENERAL, SG_INFO, "Deleting bindings");
- map<string,vector<FGBinding *> >::iterator it;
- it = _bindings.begin();
+ map<string,vector<SGBinding *> >::iterator it;
for (it = _bindings.begin(); it != _bindings.end(); it++) {
SG_LOG(SG_GENERAL, SG_INFO, "Deleting bindings for " << it->first);
for ( i = 0; i < it->second.size(); i++ )