Changeset f016819850d9d4896a3944bd0e94b73f648ec85b
- Timestamp:
- 27/03/08 19:03:05
(6 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1206640985 +0200
- git-parent:
[a859dede77cff629f2f98b84ded198f492bc5222]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1206640985 +0200
- Message:
Revert "ActionKeyCB: remove completely."
This reverts commit a859dede77cff629f2f98b84ded198f492bc5222.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| ra859ded |
rf016819 |
|
| 74 | 74 | static int KeyEvent( vlc_object_t *, char const *, |
|---|
| 75 | 75 | vlc_value_t, vlc_value_t, void * ); |
|---|
| | 76 | static int ActionKeyCB( vlc_object_t *, char const *, |
|---|
| | 77 | vlc_value_t, vlc_value_t, void * ); |
|---|
| 76 | 78 | static void PlayBookmark( intf_thread_t *, int ); |
|---|
| 77 | 79 | static void SetBookmark ( intf_thread_t *, int ); |
|---|
| … | … | |
| 147 | 149 | /* Initialize hotkey structure */ |
|---|
| 148 | 150 | for( i = 0; p_hotkeys[i].psz_action != NULL; i++ ) |
|---|
| 149 | | p_hotkeys[i].i_key = config_GetInt( p_intf, p_hotkeys[i].psz_action ); |
|---|
| | 151 | { |
|---|
| | 152 | var_Create( p_intf->p_libvlc, p_hotkeys[i].psz_action, |
|---|
| | 153 | VLC_VAR_HOTKEY | VLC_VAR_DOINHERIT ); |
|---|
| | 154 | |
|---|
| | 155 | var_AddCallback( p_intf->p_libvlc, p_hotkeys[i].psz_action, |
|---|
| | 156 | ActionKeyCB, p_hotkeys + i ); |
|---|
| | 157 | var_Get( p_intf->p_libvlc, p_hotkeys[i].psz_action, &val ); |
|---|
| | 158 | var_Set( p_intf->p_libvlc, p_hotkeys[i].psz_action, val ); |
|---|
| | 159 | } |
|---|
| 150 | 160 | |
|---|
| 151 | 161 | for( vlc_bool_t b_quit = VLC_FALSE ; !b_quit; ) |
|---|
| … | … | |
| 918 | 928 | } |
|---|
| 919 | 929 | |
|---|
| | 930 | static int ActionKeyCB( vlc_object_t *libvlc, char const *psz_var, |
|---|
| | 931 | vlc_value_t oldval, vlc_value_t newval, void *p_data ) |
|---|
| | 932 | { |
|---|
| | 933 | mtime_t i_date; |
|---|
| | 934 | struct hotkey *p_hotkey = p_data; |
|---|
| | 935 | |
|---|
| | 936 | (void)libvlc; (void)psz_var; (void)oldval; |
|---|
| | 937 | |
|---|
| | 938 | p_hotkey->i_key = newval.i_int; |
|---|
| | 939 | |
|---|
| | 940 | /* do hotkey accounting */ |
|---|
| | 941 | i_date = mdate(); |
|---|
| | 942 | if( (p_hotkey->i_delta_date > 0) && |
|---|
| | 943 | (p_hotkey->i_delta_date <= (i_date - p_hotkey->i_last_date) ) ) |
|---|
| | 944 | p_hotkey->i_times = 0; |
|---|
| | 945 | else |
|---|
| | 946 | p_hotkey->i_times++; |
|---|
| | 947 | p_hotkey->i_last_date = i_date; |
|---|
| | 948 | |
|---|
| | 949 | return VLC_SUCCESS; |
|---|
| | 950 | } |
|---|
| | 951 | |
|---|
| 920 | 952 | static void PlayBookmark( intf_thread_t *p_intf, int i_num ) |
|---|
| 921 | 953 | { |
|---|