]> git.sesse.net Git - vlc/commitdiff
Qt4: force destruction of PopupMenu when Vout Changes.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 26 Apr 2009 13:05:15 +0000 (15:05 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 26 Apr 2009 13:06:30 +0000 (15:06 +0200)
Close #2427.

modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp

index f268f1a3cac49b1f9885c95728594cc6ac728e34..22e40511704930684f5be22526dfced89215aa3d 100644 (file)
@@ -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;
index e61fa9c09aee2a55474549c0b6d3aaeb439c2c2f..2f74e238f95403358bfd9d17e904276a998d60a2 100644 (file)
@@ -165,6 +165,7 @@ public slots:
 
 private slots:
     void debug();
+    void destroyPopupMenu();
     void recreateToolbars();
     void doComponentsUpdate();
     void setName( QString );