[vlc-commits] macosx: added option to disable the next/prev feature on the Apple Remote ( close #6508)

Felix Paul Kühne git at videolan.org
Thu Aug 23 11:45:54 CEST 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Aug 23 11:44:13 2012 +0200| [2a6f2da35c2e54069fd6bb67efbf83cca6ab6a16] | committer: Felix Paul Kühne

macosx: added option to disable the next/prev feature on the Apple Remote (close #6508)

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

 NEWS                        |    1 +
 modules/gui/macosx/intf.m   |   10 ++++++++--
 modules/gui/macosx/macosx.m |    4 ++++
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index bdbfde3..371d6d6 100644
--- a/NEWS
+++ b/NEWS
@@ -79,6 +79,7 @@ Mac OS X Interface:
    - This also allows to capture input from a webcam and a mic at the same time.
  * add an option to let the Apple Remote control the system volume instead of
    VLC's internal volume level
+ * add an option to disable skipping to next/previous file with the Apple Remote
  * add an option to show next / previous buttons
  * add an option to hide the shuffle and repeat buttons
  * add optional playlist columns for track number, genre, album, description,
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 9b381d7..5005355 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1041,10 +1041,16 @@ static VLCMain *_o_sharedMainInstance = nil;
                     var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_VOL_DOWN );
             break;
         case kRemoteButtonRight:
-            [[VLCCoreInteraction sharedInstance] next];
+            if (config_GetInt( VLCIntf, "macosx-appleremote-prevnext"))
+                [[VLCCoreInteraction sharedInstance] forward];
+            else
+                [[VLCCoreInteraction sharedInstance] next];
             break;
         case kRemoteButtonLeft:
-            [[VLCCoreInteraction sharedInstance] previous];
+            if (config_GetInt( VLCIntf, "macosx-appleremote-prevnext"))
+                [[VLCCoreInteraction sharedInstance] backward];
+            else
+                [[VLCCoreInteraction sharedInstance] previous];
             break;
         case kRemoteButtonRight_Hold:
         case kRemoteButtonLeft_Hold:
diff --git a/modules/gui/macosx/macosx.m b/modules/gui/macosx/macosx.m
index 799a35e..ca1a964 100644
--- a/modules/gui/macosx/macosx.m
+++ b/modules/gui/macosx/macosx.m
@@ -82,6 +82,9 @@ void WindowClose  ( vout_window_t * );
 #define USE_APPLE_REMOTE_VOLUME_TEXT N_("Control system volume with the Apple Remote")
 #define USE_APPLE_REMOTE_VOLUME_LONGTEXT N_("By default, VLC will control its own volume with the Apple Remote. However, you can choose to control the global system volume instead.")
 
+#define USE_APPLE_REMOTE_PREVNEXT_TEXT N_("Control playlist items with the Apple Remote")
+#define USE_APPLE_REMOTE_PREVNEXT_LONGTEXT N_("By default, VLC will allow you to switch to the next or previous item with the Apple Remote. Remote. You can disable this behavior with this option.")
+
 #define USE_MEDIAKEYS_TEXT N_("Control playback with media keys")
 #define USE_MEDIAKEYS_LONGTEXT N_("By default, VLC can be controlled using the media keys on modern Apple " \
                                   "keyboards.")
@@ -128,6 +131,7 @@ vlc_module_begin ()
     add_bool( "macosx-fspanel", true, FSPANEL_TEXT, FSPANEL_LONGTEXT, false )
     add_bool( "macosx-appleremote", true, USE_APPLE_REMOTE_TEXT, USE_APPLE_REMOTE_LONGTEXT, false )
     add_bool( "macosx-appleremote-sysvol", false, USE_APPLE_REMOTE_VOLUME_TEXT, USE_APPLE_REMOTE_VOLUME_LONGTEXT, false )
+    add_bool( "macosx-appleremote-prevnext", false, USE_APPLE_REMOTE_PREVNEXT_TEXT, USE_APPLE_REMOTE_PREVNEXT_LONGTEXT, false )
     add_bool( "macosx-mediakeys", true, USE_MEDIAKEYS_TEXT, USE_MEDIAKEYS_LONGTEXT, false )
     add_bool( "macosx-interfacestyle", false, INTERFACE_STYLE_TEXT, INTERFACE_STYLE_LONGTEXT, false )
     add_bool( "macosx-nativefullscreenmode", false, NATIVE_FULLSCREEN_MODE_ON_LION_TEXT, NATIVE_FULLSCREEN_MODE_ON_LION_LONGTEXT, false )



More information about the vlc-commits mailing list