[vlc-devel] commit: Convert some uses of key-pressed to key-action. (Derk-Jan Hartman )

git version control git at videolan.org
Fri Jun 5 22:04:36 CEST 2009


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Fri Jun  5 22:04:16 2009 +0200| [c185d2a894ef29e70f09255c63256afa9ef785a2] | committer: Derk-Jan Hartman 

Convert some uses of key-pressed to key-action.

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

 modules/control/rc.c      |   14 ++++----------
 modules/gui/macosx/intf.m |    4 +---
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/modules/control/rc.c b/modules/control/rc.c
index 843096d..b2134cb 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -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" ) )
     {
-        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;
     }
@@ -1090,8 +1089,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
         }
         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;
@@ -1106,8 +1104,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
         }
         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;
@@ -1569,10 +1566,7 @@ static int Volume( vlc_object_t *p_this, char const *psz_cmd,
         {
             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 );
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 0c21694..ddc4b1f 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1020,9 +1020,7 @@ static NSString * VLCToolbarMediaControl     = @"VLCToolbarMediaControl";
     /* 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 );
     }
 }
 




More information about the vlc-devel mailing list