Commit 97782999 authored by bigben's avatar bigben
Browse files

Update the info displayed in the playlist when you change the play mode in the...

Update the info displayed in the playlist when you change the play mode in the menu (had this ever worked ?)

parent e2e0f4d6
......@@ -128,9 +128,9 @@
else
{
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Random Off" ) );
}
}
p_intf->p_sys->b_playlist_update = VLC_TRUE;
p_intf->p_sys->b_playmode_update = VLC_TRUE;
p_intf->p_sys->b_intf_update = VLC_TRUE;
vlc_object_release( p_playlist );
}
......@@ -148,9 +148,9 @@
var_Get( p_playlist, "repeat", &val );
if (!val.b_bool)
{
{
var_Set( p_playlist, "loop", val );
}
}
val.b_bool = !val.b_bool;
var_Set( p_playlist, "repeat", val );
if( val.b_bool )
......@@ -162,7 +162,7 @@
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat Off" ) );
}
p_intf->p_sys->b_playlist_update = VLC_TRUE;
p_intf->p_sys->b_playmode_update = VLC_TRUE;
p_intf->p_sys->b_intf_update = VLC_TRUE;
vlc_object_release( p_playlist );
}
......@@ -192,9 +192,9 @@
else
{
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat Off" ) );
}
}
p_intf->p_sys->b_playlist_update = VLC_TRUE;
p_intf->p_sys->b_playmode_update = VLC_TRUE;
p_intf->p_sys->b_intf_update = VLC_TRUE;
vlc_object_release( p_playlist );
}
......
......@@ -63,6 +63,7 @@ struct intf_sys_t
/* interface update */
vlc_bool_t b_intf_update;
vlc_bool_t b_playlist_update;
vlc_bool_t b_playmode_update;
vlc_bool_t b_current_title_update;
vlc_bool_t b_fullscreen_update;
......
......@@ -179,6 +179,7 @@ int PlaylistChanged( vlc_object_t *p_this, const char *psz_variable,
intf_thread_t * p_intf = VLCIntf;
p_intf->p_sys->b_playlist_update = TRUE;
p_intf->p_sys->b_intf_update = TRUE;
p_intf->p_sys->b_playmode_update = TRUE;
return VLC_SUCCESS;
}
......@@ -876,7 +877,12 @@ static VLCMain *_o_sharedMainInstance = nil;
p_intf->p_sys->b_intf_update = VLC_FALSE;
}
if ( p_intf->p_sys->b_playlist_update )
if( p_intf->p_sys->b_playmode_update )
{
[o_playlist playModeUpdated];
p_intf->p_sys->b_playmode_update = VLC_FALSE;
}
if( p_intf->p_sys->b_playlist_update )
{
[o_playlist playlistUpdated];
p_intf->p_sys->b_playlist_update = VLC_FALSE;
......
......@@ -57,11 +57,11 @@
IBOutlet id o_mi_selectall;
IBOutlet id o_mi_sort_name;
IBOutlet id o_mi_sort_author;
/* "services discovery" menu in the playlist menu */
IBOutlet id o_mi_services;
IBOutlet id o_mu_services;
/* "services discovery" menu in the main menu */
IBOutlet id o_mm_mi_services;
IBOutlet id o_mm_mu_services;
......@@ -85,6 +85,7 @@
- (IBAction)searchItem:(id)sender;
- (void)playlistUpdated;
- (void)playModeUpdated;
- (void)sortNode:(int)i_mode;
- (void)updateRowSelection;
......
......@@ -239,6 +239,38 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[o_outline_view reloadData];
}
- (void)playModeUpdated
{
playlist_t *p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
vlc_value_t val, val2;
if( p_playlist == NULL )
{
return;
}
var_Get( p_playlist, "loop", &val2 );
var_Get( p_playlist, "repeat", &val );
if( val.b_bool == VLC_TRUE )
{
[o_loop_popup selectItemAtIndex: 1];
}
else if( val2.b_bool == VLC_TRUE )
{
[o_loop_popup selectItemAtIndex: 2];
}
else
{
[o_loop_popup selectItemAtIndex: 0];
}
var_Get( p_playlist, "random", &val );
[o_random_ckb setState: val.b_bool];
vlc_object_release( p_playlist );
}
- (void)updateRowSelection
{
int i,i_row;
......
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