]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/actions_manager.cpp
Qt: fix semantics and behaviour for chapters buttons
[vlc] / modules / gui / qt4 / actions_manager.cpp
index c3d8423d36acf259e469e5fa5eef85b7f0275200..93a346c230f4f35240011b9d02ad8af020db8f50 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Controller.cpp : Controller for the main interface
+ * actions_manager.cpp : Controller for the main interface
  ****************************************************************************
  * Copyright (C) 2006-2008 the VideoLAN team
  * $Id$
 #endif
 
 #include <vlc_vout.h>
-#include <vlc_aout.h>
+#include <vlc_aout_intf.h>
 #include <vlc_keys.h>
 
 #include "actions_manager.hpp"
 #include "dialogs_provider.hpp" /* Opening Dialogs */
 #include "input_manager.hpp"
 #include "main_interface.hpp" /* Show playlist */
+#include "components/controller.hpp" /* Toggle FSC controller width */
 
 ActionsManager * ActionsManager::instance = NULL;
 
@@ -80,12 +81,10 @@ void ActionsManager::doAction( int id_action )
         case REVERSE_ACTION:
             THEMIM->getIM()->reverse(); break;
         case SKIP_BACK_ACTION:
-            var_SetInteger( p_intf->p_libvlc, "key-action",
-                    ACTIONID_JUMP_BACKWARD_SHORT );
+            skipBackward();
             break;
         case SKIP_FW_ACTION:
-            var_SetInteger( p_intf->p_libvlc, "key-action",
-                    ACTIONID_JUMP_FORWARD_SHORT );
+            skipForward();
             break;
         case QUIT_ACTION:
             THEDP->quit();  break;
@@ -93,6 +92,12 @@ void ActionsManager::doAction( int id_action )
             THEMIM->toggleRandom(); break;
         case INFO_ACTION:
             THEDP->mediaInfoDialog(); break;
+        case OPEN_SUB_ACTION:
+            THEDP->loadSubtitlesFile(); break;
+        case FULLWIDTH_ACTION:
+            if( p_intf->p_sys->p_mi )
+                p_intf->p_sys->p_mi->getFullscreenControllerWidget()->toggleFullwidth();
+            break;
         default:
             msg_Dbg( p_intf, "Action: %i", id_action );
             break;
@@ -159,7 +164,7 @@ void ActionsManager::record()
 
             char *psz = input_item_GetURI( p_item );
             if( psz )
-                THEDP->streamingDialog( NULL, psz, true );
+                THEDP->streamingDialog( NULL, qfu(psz), true );
         }
 #endif
     }
@@ -187,3 +192,13 @@ void ActionsManager::AudioDown()
     aout_VolumeDown( THEPL, 1, NULL );
 }
 
+void ActionsManager::skipForward()
+{
+    THEMIM->getIM()->jumpFwd();
+}
+
+void ActionsManager::skipBackward()
+{
+    THEMIM->getIM()->jumpBwd();
+}
+