[vlc-commits] hotkeys: move mouse wheel setting to core with other hotkey stuff

Rémi Denis-Courmont git at videolan.org
Thu Jan 31 22:25:34 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jan 31 23:16:10 2013 +0200| [a0cb1c29ce36162c4142350926345321840e7f06] | committer: Rémi Denis-Courmont

hotkeys: move mouse wheel setting to core with other hotkey stuff

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

 modules/control/hotkeys.c |   18 ------------------
 src/libvlc-module.c       |   18 ++++++++++++++++++
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index b454e03..e9348e3 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -84,18 +84,6 @@ static void ClearChannels  ( intf_thread_t *, vout_thread_t * );
  * Module descriptor
  *****************************************************************************/
 
-enum{
-    MOUSEWHEEL_VOLUME,
-    MOUSEWHEEL_POSITION,
-    NO_MOUSEWHEEL,
-};
-
-static const int i_mode_list[] =
-    { MOUSEWHEEL_VOLUME, MOUSEWHEEL_POSITION, NO_MOUSEWHEEL };
-
-static const char *const psz_mode_list_text[] =
-    { N_("Volume Control"), N_("Position Control"), N_("Ignore") };
-
 vlc_module_begin ()
     set_shortname( N_("Hotkeys") )
     set_description( N_("Hotkeys management interface") )
@@ -104,12 +92,6 @@ vlc_module_begin ()
     set_category( CAT_INTERFACE )
     set_subcategory( SUBCAT_INTERFACE_HOTKEYS )
 
-    add_integer( "hotkeys-mousewheel-mode", MOUSEWHEEL_VOLUME,
-                 N_("MouseWheel up-down axis Control"),
-                 N_("The MouseWheel up-down (vertical) axis can control volume, position or "
-                    "mousewheel event can be ignored"), false )
-            change_integer_list( i_mode_list, psz_mode_list_text )
-
 vlc_module_end ()
 
 /*****************************************************************************
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 5345cf2..3afb755 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -1202,6 +1202,20 @@ static const char *const ppsz_albumart_descriptions[] =
 #define HOTKEY_CAT_LONGTEXT N_( "These settings are the global VLC key " \
     "bindings, known as \"hotkeys\"." )
 
+enum{
+    MOUSEWHEEL_VOLUME,
+    MOUSEWHEEL_POSITION,
+    NO_MOUSEWHEEL,
+};
+
+static const int mouse_wheel_values[] = { 2, 0, 1 };
+static const char *const mouse_wheel_texts[] =
+    { N_("Ignore"), N_("Volume Control"), N_("Position Control") };
+
+#define MOUSE_WHEEL_MODE_TEXT N_("MouseWheel up-down axis Control")
+#define MOUSE_WHEEL_MODE_LONGTEXT N_( \
+   "The MouseWheel up-down (vertical) axis can control volume, position or " \
+   "mousewheel event can be ignored")
 #define TOGGLE_FULLSCREEN_KEY_TEXT N_("Fullscreen")
 #define TOGGLE_FULLSCREEN_KEY_LONGTEXT N_("Select the hotkey to use to swap fullscreen state.")
 #define LEAVE_FULLSCREEN_KEY_TEXT N_("Exit fullscreen")
@@ -2104,6 +2118,10 @@ vlc_module_begin ()
     set_subcategory( SUBCAT_INTERFACE_HOTKEYS )
     add_category_hint( N_("Hot keys"), HOTKEY_CAT_LONGTEXT , false )
 
+    add_integer( "hotkeys-mousewheel-mode", 0, MOUSE_WHEEL_MODE_TEXT,
+                 MOUSE_WHEEL_MODE_LONGTEXT, false )
+        change_integer_list( mouse_wheel_values, mouse_wheel_texts )
+
 #if defined(__APPLE__)
 /* Don't use the following combo's */
 



More information about the vlc-commits mailing list