Commit 8ac46648 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

intf-add: do not list CLI if stdin is not a TTY (fix #4955)

parent 2562696b
...@@ -85,10 +85,12 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module ) ...@@ -85,10 +85,12 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
VLC_VAR_HASCHOICE | VLC_VAR_ISCOMMAND ); VLC_VAR_HASCHOICE | VLC_VAR_ISCOMMAND );
text.psz_string = _("Add Interface"); text.psz_string = _("Add Interface");
var_Change( p_intf, "intf-add", VLC_VAR_SETTEXT, &text, NULL ); var_Change( p_intf, "intf-add", VLC_VAR_SETTEXT, &text, NULL );
if( isatty( 0 ) )
val.psz_string = (char *)"rc"; {
text.psz_string = (char *)_("Console"); val.psz_string = (char *)"rc";
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text ); text.psz_string = (char *)_("Console");
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
}
val.psz_string = (char *)"telnet"; val.psz_string = (char *)"telnet";
text.psz_string = (char *)_("Telnet"); text.psz_string = (char *)_("Telnet");
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text ); var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment