Convert some uses of key-pressed to key-action.
authorDerk-Jan Hartman <hartman@videolan.org>
Fri, 5 Jun 2009 20:04:16 +0000 (22:04 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Fri, 5 Jun 2009 20:04:16 +0000 (22:04 +0200)
modules/control/rc.c
modules/gui/macosx/intf.m

index 843096d..b2134cb 100644 (file)
@@ -1059,8 +1059,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
     /* Parse commands that only require an input */
     if( !strcmp( psz_cmd, "pause" ) )
     {
     /* Parse commands that only require an input */
     if( !strcmp( psz_cmd, "pause" ) )
     {
-        val.i_int = config_GetInt( p_intf, "key-play-pause" );
-        var_Set( p_intf->p_libvlc, "key-pressed", val );
+        var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE );
         vlc_object_release( p_input );
         return VLC_SUCCESS;
     }
         vlc_object_release( p_input );
         return VLC_SUCCESS;
     }
@@ -1090,8 +1089,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
         }
         else
         {
         }
         else
         {
-            val.i_int = config_GetInt( p_intf, "key-jump+extrashort" );
-            var_Set( p_intf->p_libvlc, "key-pressed", val );
+            var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_JUMP_FORWARD_EXTRASHORT );
         }
         vlc_object_release( p_input );
         return VLC_SUCCESS;
         }
         vlc_object_release( p_input );
         return VLC_SUCCESS;
@@ -1106,8 +1104,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
         }
         else
         {
         }
         else
         {
-            val.i_int = config_GetInt( p_intf, "key-jump-extrashort" );
-            var_Set( p_intf->p_libvlc, "key-pressed", val );
+            var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_JUMP_BACKWARD_EXTRASHORT );
         }
         vlc_object_release( p_input );
         return VLC_SUCCESS;
         }
         vlc_object_release( p_input );
         return VLC_SUCCESS;
@@ -1569,10 +1566,7 @@ static int Volume( vlc_object_t *p_this, char const *psz_cmd,
         {
             if( i_volume == AOUT_VOLUME_MIN )
             {
         {
             if( i_volume == AOUT_VOLUME_MIN )
             {
-                vlc_value_t keyval;
-
-                keyval.i_int = config_GetInt( p_intf, "key-vol-mute" );
-                var_Set( p_intf->p_libvlc, "key-pressed", keyval );
+                var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_VOL_MUTE );
             }
             i_error = aout_VolumeSet( p_this, i_volume );
             osd_Volume( p_this );
             }
             i_error = aout_VolumeSet( p_this, i_volume );
             osd_Volume( p_this );
index 0c21694..ddc4b1f 100644 (file)
@@ -1020,9 +1020,7 @@ static NSString * VLCToolbarMediaControl     = @"VLCToolbarMediaControl";
     /* Pause */
     if( p_intf->p_sys->i_play_status == PLAYING_S )
     {
     /* Pause */
     if( p_intf->p_sys->i_play_status == PLAYING_S )
     {
-        vlc_value_t val;
-        val.i_int = config_GetInt( p_intf, "key-play-pause" );
-        var_Set( p_intf->p_libvlc, "key-pressed", val );
+        var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE );
     }
 }
 
     }
 }