Qt: give access to fineslower and finefaster in the menus.
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 3 Mar 2009 13:38:50 +0000 (14:38 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 3 Mar 2009 13:38:50 +0000 (14:38 +0100)
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/menus.cpp

index cdefa32..adb58f1 100644 (file)
@@ -28,6 +28,7 @@
 #endif
 
 #include "input_manager.hpp"
+#include <vlc_keys.h>
 
 #include <QApplication>
 
@@ -779,6 +780,16 @@ void InputManager::faster()
         var_SetVoid( p_input, "rate-faster" );
 }
 
+void InputManager::littlefaster()
+{
+    var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_RATE_FASTER_FINE );
+}
+
+void InputManager::littleslower()
+{
+    var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_RATE_SLOWER_FINE );
+}
+
 void InputManager::normalRate()
 {
     if( hasInput() )
index e6729f2..bc478e1 100644 (file)
@@ -144,6 +144,8 @@ public slots:
     void reverse();
     void slower();
     void faster();
+    void littlefaster();
+    void littleslower();
     void normalRate();
     void setRate( int );
     /* Jumping */
index bf69ed8..348a68a 100644 (file)
@@ -747,10 +747,18 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu, intf_thread_t *p_intf )
     action->setIcon( QIcon( ":/faster") );
     action->setData( true );
 
+    action = menu->addAction( qtr( "Faster (fine)" ), THEMIM->getIM(),
+                              SLOT( littlefaster() ) );
+    action->setData( true );
+
     action = menu->addAction( qtr( "N&ormal Speed" ), THEMIM->getIM(),
                               SLOT( normalRate() ) );
     action->setData( true );
 
+    action = menu->addAction( qtr( "Slower (fine)" ), THEMIM->getIM(),
+                              SLOT( littleslower() ) );
+    action->setData( true );
+
     action = menu->addAction( qtr( "Slo&wer" ), THEMIM->getIM(),
                               SLOT( slower() ) );
     action->setIcon( QIcon( ":/slower") );