[vlc-devel] commit: macosx: Use var_GetBool. (Pierre d'Herbemont )

git version control git at videolan.org
Sun Jun 15 22:03:44 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sun Jun 15 22:02:57 2008 +0200| [d716c3db4433414d4d83c99d8bb4e6d85b14f348]

macosx: Use var_GetBool.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d716c3db4433414d4d83c99d8bb4e6d85b14f348
---

 modules/gui/macosx/playlist.m |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index cbae24b..7450e9b 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -92,7 +92,6 @@
 
 @end
 
-
 /*****************************************************************************
  * VLCPlaylistCommon implementation
  *
@@ -485,22 +484,15 @@
 - (void)playModeUpdated
 {
     playlist_t *p_playlist = pl_Yield( VLCIntf );
-    vlc_value_t val, val2;
 
-    var_Get( p_playlist, "loop", &val2 );
-    var_Get( p_playlist, "repeat", &val );
-    if( val.b_bool == true )
-    {
+    bool loop = var_GetBool( p_playlist, "loop" );
+    bool repeat = var_GetBool( p_playlist, "repeat" );
+    if( repeat )
         [[[VLCMain sharedInstance] getControls] repeatOne];
-   }
-    else if( val2.b_bool == true )
-    {
+    else if( loop )
         [[[VLCMain sharedInstance] getControls] repeatAll];
-    }
     else
-    {
         [[[VLCMain sharedInstance] getControls] repeatOff];
-    }
 
     [[[VLCMain sharedInstance] getControls] shuffle];
 




More information about the vlc-devel mailing list