]> git.sesse.net Git - vlc/commitdiff
Implement 'i' hotkey to show FSC.
authorJean-Baptiste Kempf <jb@videolan.org>
Fri, 22 Aug 2008 02:00:34 +0000 (19:00 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 22 Aug 2008 02:00:34 +0000 (19:00 -0700)
Close #1783 ( rest is 1646 duplicate)

modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index 9701c5e04d54bb72c824b60d36d11740e19f5502..49cda26567f850c8bf6fbb712894c90400aaba00 100644 (file)
@@ -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;
index 2bb90cb899571140f04bd9a2a9550b16aae83425..19eeeff57f46d07c33a277f0ef3ccda352345d50 100644 (file)
@@ -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@videolan.org>
index 795d03427a76e00a68e3d33b5854fca74bc8483b..2218eaac1b5cd5758d443df14108cc8d92fc3b7d 100644 (file)
@@ -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
 {
index ba56fec402f7672d7a5b594eba92a0e4d3cfacd4..2ccaa8cd1d111852bef4f4f08a4dd613cc89d114 100644 (file)
@@ -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;
 }
index 3a1ff9b9a704b00fe7ef2b032e0ed7f09069e3f4..a0037775afc91a95991030a4dcdc995ccf2f067b 100644 (file)
@@ -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 * );