Hi,

recently a patch [1] from me has been merged which allows also automatic
loading of dialog files from the aircraft directory (if located in a
subdirectory gui/dialogs).

If this directory doesn't exist a warning message is produced. The
attached patch prevents the message from beeing emitted.

Please, someone can commit the patch.

Thanks,
Tom

[1] https://gitorious.org/fg/flightgear/merge_requests/1563

-- 
Thomas Geymayer  www.tomprogs.at / C-Forum und Tutorial: www.proggen.org
------------------------------------------------------------------------
      Student of Computer Science @ Graz University of Technology
------------------------------- Austria --------------------------------
diff --git src/GUI/new_gui.cxx src/GUI/new_gui.cxx
index 4f9485e..08bb1c7 100644
--- src/GUI/new_gui.cxx
+++ src/GUI/new_gui.cxx
@@ -68,8 +68,13 @@ NewGUI::init ()
     setStyle();
     SGPath p(globals->get_fg_root(), "gui/dialogs");
     readDir(p);
-    const std::string aircraft_dir(fgGetString("/sim/aircraft-dir"));
-    readDir( SGPath(aircraft_dir, "gui/dialogs") );
+    SGPath aircraft_dialogs
+    (
+      std::string(fgGetString("/sim/aircraft-dir")),
+      "gui/dialogs"
+    );
+    if( aircraft_dialogs.exists() )
+      readDir( aircraft_dialogs );
     _menubar->init();
 }
 
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to