]> git.mxchange.org Git - flightgear.git/commitdiff
Declare --props option obsolete and issue a warning message. Rationale:
authormfranz <mfranz>
Sat, 5 May 2007 09:16:59 +0000 (09:16 +0000)
committermfranz <mfranz>
Sat, 5 May 2007 09:16:59 +0000 (09:16 +0000)
- props is easy to mix up with the --prop option (for setting properties)
- the name is unspecific and inconsistent: other option names describe
  the protocol -- the way to get the properties. How is, for example,
  --httpd less about prop(ertie)s?
- two identical options easily confuse people, as can be seen in The
  FlightGear Manual, where --telnet and --props were described differently

src/Main/options.cxx

index 056c185030d3d8077a17ba1206521037b9c20efb..3ac4f869ff7934776ea01ffdf9ada8f556e67232 100644 (file)
@@ -527,12 +527,15 @@ parse_fov( const string& arg ) {
 
 static bool
 add_channel( const string& type, const string& channel_str ) {
-    SG_LOG(SG_GENERAL, SG_INFO, "Channel string = " << channel_str );
+    if (type == "props")
+        SG_LOG(SG_GENERAL, SG_ALERT, "\n"
+             "****************************************************************\n"
+             "* The --props option is obsolete and will be removed in future *\n"
+             "* releases. Please use --telnet instead with the same syntax.  *\n"
+             "****************************************************************");
 
+    SG_LOG(SG_GENERAL, SG_INFO, "Channel string = " << channel_str );
     globals->get_channel_options_list()->push_back( type + "," + channel_str );
-    
-    // cout << "here" << endl;
-
     return true;
 }