[vlc-commits] hotkeys: add context menu action
Rémi Denis-Courmont
git at videolan.org
Thu Jan 31 22:25:35 CET 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 31 23:23:55 2013 +0200| [812836afe87b655bfc6f67b6751a14f5cba6529e] | committer: Rémi Denis-Courmont
hotkeys: add context menu action
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=812836afe87b655bfc6f67b6751a14f5cba6529e
---
include/vlc_keys.h | 1 +
modules/control/hotkeys.c | 3 +++
src/config/keys.c | 1 +
src/libvlc-module.c | 6 ++++++
4 files changed, 11 insertions(+)
diff --git a/include/vlc_keys.h b/include/vlc_keys.h
index 2040524..59c6151 100644
--- a/include/vlc_keys.h
+++ b/include/vlc_keys.h
@@ -214,6 +214,7 @@ typedef enum vlc_action {
ACTIONID_RATE_FASTER_FINE,
/* Cycle Through Program Service IDs */
ACTIONID_PROGRAM_SID,
+ ACTIONID_INTF_POPUP_MENU,
} vlc_action_t;
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 7196352..9ae0d75 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -166,6 +166,9 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
case ACTIONID_INTF_BOSS:
var_TriggerCallback( p_intf->p_libvlc, "intf-boss" );
break;
+ case ACTIONID_INTF_POPUP_MENU:
+ var_TriggerCallback( p_intf->p_libvlc, "intf-popupmenu" );
+ break;
/* Playlist actions (including audio) */
case ACTIONID_LOOP:
diff --git a/src/config/keys.c b/src/config/keys.c
index e1a568a..7403aea 100644
--- a/src/config/keys.c
+++ b/src/config/keys.c
@@ -288,6 +288,7 @@ static const struct action actions[] =
{ "frame-next", ACTIONID_FRAME_NEXT, },
{ "incr-scalefactor", ACTIONID_SCALE_UP, },
{ "intf-boss", ACTIONID_INTF_BOSS, },
+ { "intf-popup-menu", ACTIONID_INTF_POPUP_MENU, },
{ "intf-show", ACTIONID_INTF_TOGGLE_FSC, },
{ "jump+extrashort", ACTIONID_JUMP_FORWARD_EXTRASHORT, },
{ "jump+long", ACTIONID_JUMP_FORWARD_LONG, },
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 3afb755..640c3ae 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -1392,6 +1392,8 @@ static const char *const mouse_wheel_texts[] =
#define INTF_HIDE_KEY_LONGTEXT N_("Lower the interface below all other windows.")
#define INTF_BOSS_KEY_TEXT N_("Boss key")
#define INTF_BOSS_KEY_LONGTEXT N_("Hide the interface and pause playback.")
+#define INTF_POPUP_MENU_KEY_TEXT N_("Context menu")
+#define INTF_POPUP_MENU_KEY_LONGTEXT N_("Show the contextual popup menu.")
#define SNAP_KEY_TEXT N_("Take video snapshot")
#define SNAP_KEY_LONGTEXT N_("Takes a video snapshot and writes it to disk.")
@@ -2205,6 +2207,7 @@ vlc_module_begin ()
# define KEY_DEINTERLACE_MODE "Shift+d"
# define KEY_INTF_TOGGLE_FSC "i"
# define KEY_INTF_BOSS NULL
+# define KEY_INTF_POPUP_MENU "Menu"
# define KEY_DISC_MENU "Ctrl+m"
# define KEY_TITLE_PREV "Ctrl+p"
# define KEY_TITLE_NEXT "Ctrl+n"
@@ -2316,6 +2319,7 @@ vlc_module_begin ()
# define KEY_DEINTERLACE_MODE "Shift+d"
# define KEY_INTF_TOGGLE_FSC "i"
# define KEY_INTF_BOSS NULL
+# define KEY_INTF_POPUP_MENU "Menu"
# define KEY_DISC_MENU "Shift+m"
# define KEY_TITLE_PREV "Shift+o"
# define KEY_TITLE_NEXT "Shift+b"
@@ -2485,6 +2489,8 @@ vlc_module_begin ()
add_key( "key-intf-boss", KEY_INTF_BOSS,
INTF_BOSS_KEY_TEXT, INTF_BOSS_KEY_LONGTEXT, true )
+ add_key( "key-intf-popup-menu", KEY_INTF_POPUP_MENU,
+ INTF_POPUP_MENU_KEY_TEXT, INTF_POPUP_MENU_KEY_LONGTEXT, true )
add_key( "key-snapshot", KEY_SNAPSHOT,
SNAP_KEY_TEXT, SNAP_KEY_LONGTEXT, true )
add_key( "key-record", KEY_RECORD,
More information about the vlc-commits
mailing list