[vlc-devel] [PATCH 05/13] hotkey in the interface
Rémi Denis-Courmont
remi at remlab.net
Fri Sep 18 17:24:34 CEST 2015
Le 2015-09-16 16:49, Aaron Wang a écrit :
> ---
> src/libvlc-module.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/src/libvlc-module.c b/src/libvlc-module.c
> index a13093d..d2096cd 100644
> --- a/src/libvlc-module.c
> +++ b/src/libvlc-module.c
> @@ -574,6 +574,7 @@ static const char *const
> ppsz_clock_descriptions[] =
> "(from 0 to n).")
>
> #define INPUT_SUBTRACK_TEXT N_("Subtitle track")
> +#define INPUT_SUBTRACK2_TEXT N_("2nd Subtitle track")
> #define INPUT_SUBTRACK_LONGTEXT N_( \
> "Stream number of the subtitle track to use " \
> "(from 0 to n).")
> @@ -1336,8 +1337,10 @@ static const char *const mouse_wheel_texts[] =
> {
> #define AUDIO_TRACK_KEY_TEXT N_("Cycle audio track")
> #define AUDIO_TRACK_KEY_LONGTEXT N_("Cycle through the available
> audio tracks(languages).")
> #define SUBTITLE_TRACK_KEY_TEXT N_("Cycle subtitle track")
> +#define SUBTITLE_TRACK2_KEY_TEXT N_("Cycle 2nd subtitle track")
> #define SUBTITLE_TRACK_KEY_LONGTEXT N_("Cycle through the available
> subtitle tracks.")
> #define SUBTITLE_TOGGLE_KEY_TEXT N_("Toggle subtitles")
> +#define SUBTITLE2_TOGGLE_KEY_TEXT N_("Toggle 2nd subtitles")
> #define SUBTITLE_TOGGLE_KEY_LONGTEXT N_("Toggle subtitle track
> visibility.")
> #define PROGRAM_SID_NEXT_KEY_TEXT N_("Cycle next program Service
> ID")
> #define PROGRAM_SID_NEXT_KEY_LONGTEXT N_("Cycle through the
> available next program Service IDs (SIDs).")
> @@ -1658,6 +1661,9 @@ vlc_module_begin ()
> add_integer( "sub-track", -1,
> INPUT_SUBTRACK_TEXT, INPUT_SUBTRACK_LONGTEXT, true
> )
> change_safe ()
> + add_integer( "sub-track2", -1,
> + INPUT_SUBTRACK2_TEXT, INPUT_SUBTRACK_LONGTEXT, true
> )
> + change_safe ()
> add_string( "audio-language", "",
> INPUT_AUDIOTRACK_LANG_TEXT,
> INPUT_AUDIOTRACK_LANG_LONGTEXT,
> false )
> @@ -2297,7 +2303,9 @@ vlc_module_begin ()
>
> # define KEY_AUDIO_TRACK "b"
> # define KEY_SUBTITLE_TRACK "v"
> -# define KEY_SUBTITLE_TOGGLE "Shift+v"
> +# define KEY_SUBTITLE_TOGGLE NULL
> +# define KEY_SUBTITLE_TRACK2 "Shift+v"
> +# define KEY_SUBTITLE_TOGGLE2 NULL
Hmm, I am afraid changing the behaviour of Shift+V will annoy a lot of
existing users.
> # define KEY_PROGRAM_SID_NEXT "x"
> # define KEY_PROGRAM_SID_PREV "Shift+x"
> # define KEY_ASPECT_RATIO "a"
> @@ -2470,6 +2478,11 @@ vlc_module_begin ()
> SUBTITLE_TRACK_KEY_TEXT, SUBTITLE_TRACK_KEY_LONGTEXT,
> false )
> add_key( "key-subtitle-toggle", KEY_SUBTITLE_TOGGLE,
> SUBTITLE_TOGGLE_KEY_TEXT, SUBTITLE_TOGGLE_KEY_LONGTEXT,
> false )
> + add_key( "key-subtitle-track2", KEY_SUBTITLE_TRACK2,
> + SUBTITLE_TRACK2_KEY_TEXT, SUBTITLE_TRACK_KEY_LONGTEXT,
> false )
> + add_key( "key-subtitle2-toggle", KEY_SUBTITLE_TOGGLE2,
> + SUBTITLE2_TOGGLE_KEY_TEXT,
> SUBTITLE_TOGGLE_KEY_LONGTEXT, false )
> +
This needs to be squashed with patches 2 and 3 to avoid run-time errors
in sequential builds.
> add_key( "key-program-sid-next", KEY_PROGRAM_SID_NEXT,
> PROGRAM_SID_NEXT_KEY_TEXT,
> PROGRAM_SID_NEXT_KEY_LONGTEXT, false )
> add_key( "key-program-sid-prev", KEY_PROGRAM_SID_PREV,
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list