Commit b3d9857b authored by Victorien Le Couviour--Tuffet's avatar Victorien Le Couviour--Tuffet Committed by Jean-Baptiste Kempf

macosx: duplicate video filters options in the playlist

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 53d8e4be
......@@ -799,6 +799,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
{
NSArray<NSValue *> *vouts = getVouts();
intf_thread_t *p_intf = getIntf();
playlist_t *p_playlist = pl_Get(p_intf);
if (!p_intf)
return;
int i_type;
......@@ -819,13 +820,25 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
i_type &= VLC_VAR_CLASS;
if (i_type == VLC_VAR_BOOL)
{
var_SetBool(p_playlist, psz_property, value.b_bool);
config_PutInt(p_intf, psz_property, (int64_t)value.b_bool);
}
else if (i_type == VLC_VAR_INTEGER)
{
var_SetInteger(p_playlist, psz_property, value.i_int);
config_PutInt(p_intf, psz_property, value.i_int);
}
else if (i_type == VLC_VAR_FLOAT)
{
config_PutFloat(p_intf, psz_property, value.f_float);
var_SetFloat(p_playlist, psz_property, value.f_float);
}
else if (i_type == VLC_VAR_STRING)
{
config_PutPsz(p_intf, psz_property, EnsureUTF8(value.psz_string));
var_SetString(p_playlist, psz_property, EnsureUTF8(value.psz_string));
}
else
{
msg_Err(p_intf,
......
......@@ -267,6 +267,7 @@
- (void)setWidgetValue: (id)widget forOption: (char *)psz_option enabled: (bool)b_state
{
intf_thread_t *p_intf = getIntf();
playlist_t *p_playlist = pl_Get(p_intf);
vlc_value_t val;
int i_type = config_GetType(p_intf, psz_option) & VLC_VAR_CLASS;
......@@ -274,18 +275,16 @@
{
case VLC_VAR_BOOL:
case VLC_VAR_INTEGER:
val.i_int = config_GetInt(p_intf, psz_option);
break;
case VLC_VAR_FLOAT:
val.f_float = config_GetFloat(p_intf, psz_option);
break;
case VLC_VAR_STRING:
val.psz_string = config_GetPsz(p_intf, psz_option);
break;
default:
msg_Err(p_intf, "%s variable is of an unsupported type (%d)", psz_option, i_type);
return;
}
if (var_Create(p_playlist, psz_option, i_type | VLC_VAR_DOINHERIT) ||
var_GetChecked(p_playlist, psz_option, i_type, &val))
return;
if (i_type == VLC_VAR_BOOL || i_type == VLC_VAR_INTEGER)
{
......
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