]> git.sesse.net Git - vlc/commitdiff
hotkeys: move mouse wheel setting to core with other hotkey stuff
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 31 Jan 2013 21:16:10 +0000 (23:16 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 31 Jan 2013 21:25:30 +0000 (23:25 +0200)
modules/control/hotkeys.c
src/libvlc-module.c

index b454e030d980e9bf5965818cf4651c7714c748e0..e9348e3c2a014a51d09c13b0901c01a17b9926c3 100644 (file)
@@ -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 ()
 
 /*****************************************************************************
index 5345cf24f2f98a410c3ff387bdd4e42c9f83f0c0..3afb755b4887a885fca3ad6c57c346e93b277c2a 100644 (file)
@@ -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 */