[vlc-devel] commit: Qt4: force destruction of PopupMenu when Vout Changes. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Sun Apr 26 15:06:47 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Apr 26 15:05:15 2009 +0200| [2272635229798035ab8e8406c761b545d0c21c2b] | committer: Jean-Baptiste Kempf 

Qt4: force destruction of PopupMenu when Vout Changes.

Close #2427.

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

 modules/gui/qt4/main_interface.cpp |    8 ++++++++
 modules/gui/qt4/main_interface.hpp |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index f268f1a..22e4051 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -141,6 +141,8 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
      * Menu Bar *
      ************/
     QVLCMenu::createMenuBar( this, p_intf );
+    CONNECT( THEMIM->getIM(), voutListChanged( vout_thread_t **, int ),
+             this, destroyPopupMenu() );
 
 #if 0
     /* Create a Dock to get the playlist */
@@ -658,6 +660,12 @@ void MainInterface::debug()
 #endif
 }
 
+void MainInterface::destroyPopupMenu()
+{
+    QVLCMenu::PopupMenu(p_intf, false );
+}
+
+
 void MainInterface::toggleFSC()
 {
    if( !fullscreenControls ) return;
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index e61fa9c..2f74e23 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -165,6 +165,7 @@ public slots:
 
 private slots:
     void debug();
+    void destroyPopupMenu();
     void recreateToolbars();
     void doComponentsUpdate();
     void setName( QString );




More information about the vlc-devel mailing list