[vlc-devel] commit: Implement 'i' hotkey to show FSC. (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Aug 22 03:58:15 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Aug 21 19:00:34 2008 -0700| [165268ce46a459ed3818a5450848b1b7e03b30e1] | committer: Jean-Baptiste Kempf 

Implement 'i' hotkey to show FSC.

Close #1783 ( rest is 1646 duplicate)

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

 modules/gui/qt4/components/interface_widgets.cpp |    4 ++++
 modules/gui/qt4/dialogs_provider.cpp             |    4 ++--
 modules/gui/qt4/input_manager.hpp                |    7 ++++---
 modules/gui/qt4/main_interface.cpp               |   14 ++++++++++++--
 modules/gui/qt4/main_interface.hpp               |    4 +++-
 5 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 9701c5e..49cda26 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -1110,6 +1110,10 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
 
     switch( event->type() )
     {
+    case FullscreenControlToggle_Type:
+         // FIXME 
+         TOGGLEV( this );
+         break;
     case FullscreenControlShow_Type:
         vlc_mutex_lock( &lock );
         b_fs = b_fullscreen;
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 2bb90cb..19eeeff 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -1,7 +1,7 @@
 /*****************************************************************************
- * main_inteface.cpp : Main interface
+ * dialogs_provider.cpp : Dialog Provider
  *****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright (C) 2006-2008 the VideoLAN team
  * $Id$
  *
  * Authors: Clément Stenac <zorglub at videolan.org>
diff --git a/modules/gui/qt4/input_manager.hpp b/modules/gui/qt4/input_manager.hpp
index 795d034..2218eaa 100644
--- a/modules/gui/qt4/input_manager.hpp
+++ b/modules/gui/qt4/input_manager.hpp
@@ -45,9 +45,10 @@ static int const VolumeChanged_Type      = QEvent::User + IMEventType + 6;
 static int const ItemSpuChanged_Type     = QEvent::User + IMEventType + 7;
 static int const ItemTeletextChanged_Type= QEvent::User + IMEventType + 8;
 
-static int const FullscreenControlShow_Type = QEvent::User + IMEventType + 10;
-static int const FullscreenControlHide_Type = QEvent::User + IMEventType + 11;
-static int const FullscreenControlPlanHide_Type = QEvent::User + IMEventType + 12;
+static int const FullscreenControlToggle_Type = QEvent::User + IMEventType + 10;
+static int const FullscreenControlShow_Type = QEvent::User + IMEventType + 11;
+static int const FullscreenControlHide_Type = QEvent::User + IMEventType + 12;
+static int const FullscreenControlPlanHide_Type = QEvent::User + IMEventType + 13;
 
 class IMEvent : public QEvent
 {
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index ba56fec..2ccaa8c 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -594,10 +594,19 @@ void MainInterface::resizeEvent( QResizeEvent *e )
 }
 #endif
 
+void MainInterface::toggleFSC()
+{
+   if( !fullscreenControls ) return;
+
+   IMEvent *eShow = new IMEvent( FullscreenControlToggle_Type, 0 );
+   QApplication::postEvent( fullscreenControls, static_cast<QEvent *>(eShow) );
+}
+#if 0
 void MainInterface::requestLayoutUpdate()
 {
     emit askUpdate();
 }
+#endif
 
 //FIXME remove me at the end...
 void MainInterface::debug()
@@ -1227,7 +1236,8 @@ static int IntfShowCB( vlc_object_t *p_this, const char *psz_variable,
                        vlc_value_t old_val, vlc_value_t new_val, void *param )
 {
     intf_thread_t *p_intf = (intf_thread_t *)param;
-    p_intf->p_sys->p_mi->requestLayoutUpdate();
+    p_intf->p_sys->p_mi->toggleFSC();
 
-    return VLC_SUCCESS;
+    /* Show event */
+     return VLC_SUCCESS;
 }
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index 3a1ff9b..a003777 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -75,8 +75,9 @@ public:
     void releaseVideo( void * );
     int controlVideo( void *p_window, int i_query, va_list args );
 
+#if 0
     void requestLayoutUpdate();
-
+#endif
     /* Getters */
     QSystemTrayIcon *getSysTray() { return sysTray; };
     QMenu *getSysTrayMenu() { return systrayMenu; };
@@ -151,6 +152,7 @@ public slots:
     void toggleUpdateSystrayMenu();
     void toggleAdvanced();
     void toggleFullScreen();
+    void toggleFSC();
 
     /* Manage the Video Functions from the vout threads */
     void releaseVideoSlot( void * );




More information about the vlc-devel mailing list