]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/intf.m
* share/skins2/skin.catalog: added a default catalog as some platforms don't provide...
[vlc] / modules / gui / macosx / intf.m
index afb213e82f0fde5a36251ff2bca55b4311ac0597..80f1daf202e82b013f7af5ef07f794ac23d2dc90 100644 (file)
@@ -422,6 +422,7 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
 {
     unsigned int i_key = 0;
     intf_thread_t * p_intf = [NSApp getIntf];
+    playlist_t *p_playlist;
     vlc_value_t val;
 
     [self initStrings];
@@ -481,27 +482,22 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
     [o_mi_fullscreen setKeyEquivalent: [NSString stringWithFormat:@"%C", VLCKeyToCocoa( i_key )]];
     [o_mi_fullscreen setKeyEquivalentModifierMask: VLCModifiersToCocoa(i_key)];
 
-    var_Create (p_intf, "fullscreen", VLC_VAR_BOOL );
-    var_Change (p_intf, "fullscreen", VLC_VAR_INHERITVALUE, &val, NULL );
-    [o_btn_fullscreen setState: val.b_bool];
-
-    var_Create(p_intf,"intf-change",VLC_VAR_BOOL );
+    var_Create( p_intf, "intf-change", VLC_VAR_BOOL );
 
     [self setSubmenusEnabled: FALSE];
     [self manageVolumeSlider];
     
-    /* Check if we need to start playing */
-    if( p_intf->b_play )
+    p_playlist = (playlist_t *) vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+
+    if( p_playlist )
     {
-        playlist_t *p_playlist =
-            (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                           FIND_ANYWHERE );
-        if( p_playlist )
+        /* Check if we need to start playing */
+        if( p_intf->b_play )
         {
             playlist_Play( p_playlist );
-            vlc_object_release( p_playlist );
         }
-        
+        [o_btn_fullscreen setState: ( var_Get( p_playlist, "fullscreen", &val )>=0 && val.b_bool )];
+        vlc_object_release( p_playlist );
     }
 }
 
@@ -864,23 +860,18 @@ unsigned int VLCModifiersToCocoa( unsigned int i_key )
         p_intf->p_sys->b_intf_update = VLC_FALSE;
     }
 
-    if (p_intf->p_sys->b_fullscreen_update )
+    ifp_intf->p_sys->b_fullscreen_update )
     {
         vout_thread_t * p_vout;
         vlc_value_t val;
-        if (var_Change (p_intf, "fullscreen", VLC_VAR_INHERITVALUE, &val, NULL)>=0 &&  val.b_bool )
-        {
-            [o_btn_fullscreen setState:VLC_TRUE];
-        }
-        else
-        {
-            [o_btn_fullscreen setState:VLC_FALSE];
-        }
-        p_vout = vlc_object_find(p_intf,VLC_OBJECT_VOUT,FIND_ANYWHERE);
-        if (p_vout != NULL)
+        [o_btn_fullscreen setState: ( var_Get( p_playlist, "fullscreen", &val )>=0 && val.b_bool ) ];
+        
+        p_vout = vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE );
+        if( p_vout != NULL )
         {
             [o_btn_fullscreen setEnabled: VLC_TRUE];
-            vlc_object_release(p_vout);
+            vlc_object_release( p_vout );
         }
         else
         {