]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/controls.m
* don't use tabs here as well
[vlc] / modules / gui / macosx / controls.m
index 8ec38f0edf1b04da2cb716a57b7fe53a02f1e781..6c0cd9c58b1f0aaed22fc8ee2f49c91c1788e907 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * controls.m: MacOS X interface module
  *****************************************************************************
- * Copyright (C) 2002-2005 VideoLAN
+ * Copyright (C) 2002-2005 the VideoLAN team
  * $Id$
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
     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 );
 }
 
     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 )
     {
-        vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat All" ) );
+        vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat One" ) );
     }
     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 );
 }
     var_Set( p_playlist, "loop", val );
     if( val.b_bool )
     {
-        vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat One" ) );
+        vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat All" ) );
     }
     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 );
 }
     intf_thread_t * p_intf = VLCIntf;
     val.i_int = config_GetInt( p_intf, "key-vol-up" );
     var_Set( p_intf->p_vlc, "key-pressed", val );
-    [self updateVolumeSlider];
+    /* Manage volume status */
+    [o_main manageVolumeSlider];
 }
 
 - (IBAction)volumeDown:(id)sender
     intf_thread_t * p_intf = VLCIntf;
     val.i_int = config_GetInt( p_intf, "key-vol-down" );
     var_Set( p_intf->p_vlc, "key-pressed", val );
-    [self updateVolumeSlider];
+    /* Manage volume status */
+    [o_main manageVolumeSlider];
 }
 
 - (IBAction)mute:(id)sender
     intf_thread_t * p_intf = VLCIntf;
     val.i_int = config_GetInt( p_intf, "key-vol-mute" );
     var_Set( p_intf->p_vlc, "key-pressed", val );
-    [self updateVolumeSlider];
+    /* Manage volume status */
+    [o_main manageVolumeSlider];
 }
 
 - (IBAction)volumeSliderUpdated:(id)sender
     intf_thread_t * p_intf = VLCIntf;
     audio_volume_t i_volume = (audio_volume_t)[sender intValue];
     aout_VolumeSet( p_intf, i_volume * AOUT_VOLUME_STEP );
-    [self updateVolumeSlider];
-}
-
-- (void)updateVolumeSlider
-{
-    NSString * o_text;
-    intf_thread_t * p_intf = VLCIntf;
-    audio_volume_t i_volume;
-
-    aout_VolumeGet( p_intf, &i_volume );
-
-    o_text = [NSString stringWithFormat: @"Volume: %d", i_volume * 200 / AOUT_VOLUME_MAX];
-    [o_main setScrollField:o_text stopAfter:1000000];
-    
-    [o_volumeslider setFloatValue: (float)(i_volume / AOUT_VOLUME_STEP)];
+    /* Manage volume status */
+    [o_main manageVolumeSlider];
 }
 
 - (IBAction)windowAction:(id)sender
 - (void)dealloc
 {
     free( psz_name );
+    [super dealloc];
 }
 
 - (char *)name