Commit 9c9ecc53 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

variables: remove useless VLC_VAR_SETTEXT parameter

parent 11717e54
......@@ -733,7 +733,7 @@ vlc_v4l2_ctrl_t *ControlsInit (vlc_object_t *obj, int fd)
var_AddCallback (obj, c->name, ControlSetCallback, c);
text.psz_string = (char *)query.name;
var_Change (obj, c->name, VLC_VAR_SETTEXT, &text, NULL);
var_Change(obj, c->name, VLC_VAR_SETTEXT, &text);
val.i_int = query.id;
text.psz_string = (char *)c->name;
var_Change (obj, "controls", VLC_VAR_ADDCHOICE, &val, &text);
......@@ -768,7 +768,7 @@ vlc_v4l2_ctrl_t *ControlsInit (vlc_object_t *obj, int fd)
var_Create (obj, "reset", VLC_VAR_VOID | VLC_VAR_ISCOMMAND);
val.psz_string = _("Reset defaults");
var_Change (obj, "reset", VLC_VAR_SETTEXT, &val, NULL);
var_Change(obj, "reset", VLC_VAR_SETTEXT, &val);
val.i_int = -1;
text.psz_string = (char *)"reset";
......
......@@ -56,7 +56,7 @@ ThemeRepository::ThemeRepository( intf_thread_t *pIntf ): SkinObject( pIntf )
// Create a variable to add items in wxwindows popup menu
var_Create( pIntf, "intf-skins", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
text.psz_string = _("Select skin");
var_Change( pIntf, "intf-skins", VLC_VAR_SETTEXT, &text, NULL );
var_Change( pIntf, "intf-skins", VLC_VAR_SETTEXT, &text );
// Scan vlt files in the resource path
OSFactory *pOsFactory = OSFactory::instance( pIntf );
......@@ -114,7 +114,7 @@ ThemeRepository::ThemeRepository( intf_thread_t *pIntf ): SkinObject( pIntf )
var_Create( pIntf, "intf-skins-interactive", VLC_VAR_VOID |
VLC_VAR_ISCOMMAND );
text.psz_string = _("Open skin...");
var_Change( pIntf, "intf-skins-interactive", VLC_VAR_SETTEXT, &text, NULL );
var_Change( pIntf, "intf-skins-interactive", VLC_VAR_SETTEXT, &text );
// Set the callback
var_AddCallback( pIntf, "intf-skins-interactive", changeSkin, this );
......
......@@ -199,7 +199,7 @@ static int OpenPostproc( vlc_object_t *p_this )
VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND );
text.psz_string = _("Post processing");
var_Change( p_filter, FILTER_PREFIX "q", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_filter, FILTER_PREFIX "q", VLC_VAR_SETTEXT, &text );
var_Get( p_filter, FILTER_PREFIX "q", &val_orig );
var_Change( p_filter, FILTER_PREFIX "q", VLC_VAR_DELCHOICE, &val_orig );
......
......@@ -318,7 +318,7 @@ static int Open(vlc_object_t *object)
vlc_value_t val;
val.psz_string = _("Desktop");
var_Change(vd, "video-wallpaper", VLC_VAR_SETTEXT, &val, NULL);
var_Change(vd, "video-wallpaper", VLC_VAR_SETTEXT, &val);
var_AddCallback(vd, "video-wallpaper", DesktopCallback, NULL);
/* Setup vout_display now that everything is fine */
......
......@@ -244,7 +244,7 @@ static int Open(vlc_object_t *object)
vlc_value_t val;
val.psz_string = _("Wallpaper");
var_Change(vd, "video-wallpaper", VLC_VAR_SETTEXT, &val, NULL);
var_Change(vd, "video-wallpaper", VLC_VAR_SETTEXT, &val);
var_AddCallback(vd, "video-wallpaper", WallpaperCallback, NULL);
/* Setup vout_display now that everything is fine */
......
......@@ -276,7 +276,7 @@ audio_output_t *aout_New (vlc_object_t *parent)
/* Visualizations */
var_Create (aout, "visual", VLC_VAR_STRING);
text.psz_string = _("Visualizations");
var_Change (aout, "visual", VLC_VAR_SETTEXT, &text, NULL);
var_Change(aout, "visual", VLC_VAR_SETTEXT, &text);
val.psz_string = (char *)"";
text.psz_string = _("Disable");
var_Change (aout, "visual", VLC_VAR_ADDCHOICE, &val, &text);
......@@ -330,20 +330,20 @@ audio_output_t *aout_New (vlc_object_t *parent)
var_Create (aout, "audio-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
var_AddCallback (aout, "audio-filter", FilterCallback, NULL);
text.psz_string = _("Audio filters");
var_Change (aout, "audio-filter", VLC_VAR_SETTEXT, &text, NULL);
var_Change(aout, "audio-filter", VLC_VAR_SETTEXT, &text);
var_Create (aout, "viewpoint", VLC_VAR_ADDRESS );
var_AddCallback (aout, "viewpoint", ViewpointCallback, NULL);
var_Create (aout, "audio-visual", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
text.psz_string = _("Audio visualizations");
var_Change (aout, "audio-visual", VLC_VAR_SETTEXT, &text, NULL);
var_Change(aout, "audio-visual", VLC_VAR_SETTEXT, &text);
/* Replay gain */
var_Create (aout, "audio-replay-gain-mode",
VLC_VAR_STRING | VLC_VAR_DOINHERIT );
text.psz_string = _("Replay gain");
var_Change (aout, "audio-replay-gain-mode", VLC_VAR_SETTEXT, &text, NULL);
var_Change(aout, "audio-replay-gain-mode", VLC_VAR_SETTEXT, &text);
cfg = config_FindConfig("audio-replay-gain-mode");
if (likely(cfg != NULL))
for (unsigned i = 0; i < cfg->list_count; i++)
......@@ -361,7 +361,7 @@ audio_output_t *aout_New (vlc_object_t *parent)
var_AddCallback (aout, "stereo-mode", StereoModeCallback, NULL);
vlc_value_t txt;
txt.psz_string = _("Stereo audio mode");
var_Change (aout, "stereo-mode", VLC_VAR_SETTEXT, &txt, NULL);
var_Change(aout, "stereo-mode", VLC_VAR_SETTEXT, &txt);
/* Equalizer */
var_Create (aout, "equalizer-preamp", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
......
......@@ -150,7 +150,7 @@ void input_ControlVarInit ( input_thread_t *p_input )
/* Bookmark */
var_Create( p_input, "bookmark", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND );
val.psz_string = _("Bookmark");
var_Change( p_input, "bookmark", VLC_VAR_SETTEXT, &val, NULL );
var_Change( p_input, "bookmark", VLC_VAR_SETTEXT, &val );
/* Program */
var_Create( p_input, "program", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
......@@ -158,22 +158,22 @@ void input_ControlVarInit ( input_thread_t *p_input )
if( val.i_int <= 0 )
var_Change( p_input, "program", VLC_VAR_DELCHOICE, &val );
text.psz_string = _("Program");
var_Change( p_input, "program", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "program", VLC_VAR_SETTEXT, &text );
/* Programs */
var_Create( p_input, "programs", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
text.psz_string = _("Programs");
var_Change( p_input, "programs", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "programs", VLC_VAR_SETTEXT, &text );
/* Title */
var_Create( p_input, "title", VLC_VAR_INTEGER );
text.psz_string = _("Title");
var_Change( p_input, "title", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "title", VLC_VAR_SETTEXT, &text );
/* Chapter */
var_Create( p_input, "chapter", VLC_VAR_INTEGER );
text.psz_string = _("Chapter");
var_Change( p_input, "chapter", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "chapter", VLC_VAR_SETTEXT, &text );
/* Delay */
var_Create( p_input, "audio-delay", VLC_VAR_INTEGER );
......@@ -186,19 +186,19 @@ void input_ControlVarInit ( input_thread_t *p_input )
var_Create( p_input, "video-es", VLC_VAR_INTEGER );
var_Change( p_input, "video-es", VLC_VAR_SETVALUE, &val );
text.psz_string = _("Video Track");
var_Change( p_input, "video-es", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "video-es", VLC_VAR_SETTEXT, &text );
/* Audio ES */
var_Create( p_input, "audio-es", VLC_VAR_INTEGER );
var_Change( p_input, "audio-es", VLC_VAR_SETVALUE, &val );
text.psz_string = _("Audio Track");
var_Change( p_input, "audio-es", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "audio-es", VLC_VAR_SETTEXT, &text );
/* Spu ES */
var_Create( p_input, "spu-es", VLC_VAR_INTEGER );
var_Change( p_input, "spu-es", VLC_VAR_SETVALUE, &val );
text.psz_string = _("Subtitle Track");
var_Change( p_input, "spu-es", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "spu-es", VLC_VAR_SETTEXT, &text );
var_Create( p_input, "spu-choice", VLC_VAR_INTEGER );
var_SetInteger( p_input, "spu-choice", -1 );
......@@ -262,28 +262,28 @@ void input_ControlVarNavigation( input_thread_t *p_input )
if( var_Type( p_input, "next-title" ) == 0 ) {
var_Create( p_input, "next-title", VLC_VAR_VOID );
text.psz_string = _("Next title");
var_Change( p_input, "next-title", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "next-title", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_input, "next-title", TitleCallback, NULL );
}
if( var_Type( p_input, "prev-title" ) == 0 ) {
var_Create( p_input, "prev-title", VLC_VAR_VOID );
text.psz_string = _("Previous title");
var_Change( p_input, "prev-title", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "prev-title", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_input, "prev-title", TitleCallback, NULL );
}
if( var_Type( p_input, "menu-title" ) == 0 ) {
var_Create( p_input, "menu-title", VLC_VAR_VOID );
text.psz_string = _("Menu title");
var_Change( p_input, "menu-title", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "menu-title", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_input, "menu-title", TitleCallback, NULL );
}
if( var_Type( p_input, "menu-popup" ) == 0 ) {
var_Create( p_input, "menu-popup", VLC_VAR_VOID );
text.psz_string = _("Menu popup");
var_Change( p_input, "menu-popup", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "menu-popup", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_input, "menu-popup", TitleCallback, NULL );
}
}
......@@ -378,12 +378,12 @@ void input_ControlVarTitle( input_thread_t *p_input, int i_title )
{
var_Create( p_input, "next-chapter", VLC_VAR_VOID );
text.psz_string = _("Next chapter");
var_Change( p_input, "next-chapter", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "next-chapter", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_input, "next-chapter", SeekpointCallback, NULL );
var_Create( p_input, "prev-chapter", VLC_VAR_VOID );
text.psz_string = _("Previous chapter");
var_Change( p_input, "prev-chapter", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_input, "prev-chapter", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_input, "prev-chapter", SeekpointCallback, NULL );
}
......
......@@ -80,7 +80,7 @@ int intf_Create( playlist_t *playlist, const char *chain )
vlc_value_t val, text;
var_Create( p_intf, "intf-add", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
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 );
#if !defined(_WIN32) && defined(HAVE_ISATTY)
if( isatty( 0 ) )
#endif
......
......@@ -110,7 +110,7 @@ void vout_InitInterlacingSupport(vout_thread_t *vout, bool is_interlaced)
int deinterlace_state = var_GetInteger(vout, "deinterlace");
text.psz_string = _("Deinterlace");
var_Change(vout, "deinterlace", VLC_VAR_SETTEXT, &text, NULL);
var_Change(vout, "deinterlace", VLC_VAR_SETTEXT, &text);
const module_config_t *optd = config_FindConfig("deinterlace");
var_Change(vout, "deinterlace", VLC_VAR_CLEARCHOICES, NULL);
......@@ -126,7 +126,7 @@ void vout_InitInterlacingSupport(vout_thread_t *vout, bool is_interlaced)
char *deinterlace_mode = var_GetNonEmptyString(vout, "deinterlace-mode");
text.psz_string = _("Deinterlace mode");
var_Change(vout, "deinterlace-mode", VLC_VAR_SETTEXT, &text, NULL);
var_Change(vout, "deinterlace-mode", VLC_VAR_SETTEXT, &text);
const module_config_t *optm = config_FindConfig("deinterlace-mode");
var_Change(vout, "deinterlace-mode", VLC_VAR_CLEARCHOICES, NULL);
......
......@@ -167,14 +167,14 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Create( p_vout, "autoscale", VLC_VAR_BOOL | VLC_VAR_DOINHERIT
| VLC_VAR_ISCOMMAND );
text.psz_string = _("Autoscale video");
var_Change( p_vout, "autoscale", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_vout, "autoscale", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_vout, "autoscale", AutoScaleCallback, NULL );
var_Create( p_vout, "zoom", VLC_VAR_FLOAT | VLC_VAR_ISCOMMAND |
VLC_VAR_DOINHERIT );
text.psz_string = _("Zoom");
var_Change( p_vout, "zoom", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_vout, "zoom", VLC_VAR_SETTEXT, &text );
for( size_t i = 0; i < ARRAY_SIZE(p_zoom_values); i++ )
{
......@@ -201,7 +201,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
VLC_VAR_DOINHERIT );
text.psz_string = _("Crop");
var_Change( p_vout, "crop", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_vout, "crop", VLC_VAR_SETTEXT, &text );
for( size_t i = 0; i < ARRAY_SIZE(p_crop_values); i++ )
{
......@@ -228,7 +228,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
VLC_VAR_DOINHERIT );
text.psz_string = _("Aspect ratio");
var_Change( p_vout, "aspect-ratio", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_vout, "aspect-ratio", VLC_VAR_SETTEXT, &text );
for( size_t i = 0; i < ARRAY_SIZE(p_aspect_ratio_values); i++ )
{
......@@ -251,7 +251,7 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Create( p_vout, "video-on-top", VLC_VAR_BOOL | VLC_VAR_DOINHERIT
| VLC_VAR_ISCOMMAND );
text.psz_string = _("Always on top");
var_Change( p_vout, "video-on-top", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_vout, "video-on-top", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_vout, "video-on-top", AboveCallback, NULL );
/* Add a variable to indicate if the window should be below all others */
......@@ -266,13 +266,13 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Create( p_vout, "fullscreen",
VLC_VAR_BOOL | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND );
text.psz_string = _("Fullscreen");
var_Change( p_vout, "fullscreen", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_vout, "fullscreen", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_vout, "fullscreen", FullscreenCallback, NULL );
/* Add a snapshot variable */
var_Create( p_vout, "video-snapshot", VLC_VAR_VOID | VLC_VAR_ISCOMMAND );
text.psz_string = _("Snapshot");
var_Change( p_vout, "video-snapshot", VLC_VAR_SETTEXT, &text, NULL );
var_Change( p_vout, "video-snapshot", VLC_VAR_SETTEXT, &text );
var_AddCallback( p_vout, "video-snapshot", SnapshotCallback, NULL );
/* Add a video-filter variable */
......
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