]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/menus.cpp
Qt4: remove bogus vlc_aout.h dependencies
[vlc] / modules / gui / qt4 / menus.cpp
index b5713e4477d3217a182b3f7a8576fe7ac174436f..96a2395f54b45607559b904efd0b16065bbf8ba3 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <vlc_intf_strings.h>
 #include <vlc_services_discovery.h>
+#include <vlc_aout.h>
 
 #include "menus.hpp"
 
@@ -84,7 +85,7 @@ QMenu *QVLCMenu::recentsMenu = NULL;
  * Add static entries to DP in menus
  ***************************************************************************/
 void addDPStaticEntry( QMenu *menu,
-                       const QString text,
+                       const QString& text,
                        const char *icon,
                        const char *member,
                        const char *shortcut = NULL )
@@ -113,7 +114,7 @@ void addDPStaticEntry( QMenu *menu,
  ***/
 QAction* addMIMStaticEntry( intf_thread_t *p_intf,
                             QMenu *menu,
-                            const QString text,
+                            const QString& text,
                             const char *icon,
                             const char *member,
                             bool bStatic = false )
@@ -220,6 +221,7 @@ static int VideoAutoMenuBuilder( vout_thread_t *p_object,
     PUSH_VAR( "video-on-top" );
 #ifdef WIN32
     PUSH_VAR( "directx-wallpaper" );
+    PUSH_VAR( "direct3d-desktop" );
 #endif
     PUSH_VAR( "video-snapshot" );
     PUSH_VAR( "zoom" );
@@ -558,6 +560,7 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
         ACT_ADDCHECK( current, "video-on-top", qtr( "Always &On Top" ) );
 #ifdef WIN32
         ACT_ADDCHECK( current, "directx-wallpaper", qtr( "DirectX Wallpaper" ) );
+        ACT_ADDCHECK( current, "direct3d-desktop", qtr( "Direct3D Desktop mode" ) );
 #endif
         ACT_ADD( current, "video-snapshot", qtr( "Sna&pshot" ) );
 
@@ -893,8 +896,7 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
 void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
 {
     /* Delete old popup if there is one */
-    if( p_intf->p_sys->p_popup_menu )
-        delete p_intf->p_sys->p_popup_menu;
+    delete p_intf->p_sys->p_popup_menu;
 
     if( !show )
     {
@@ -971,11 +973,10 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
         /* In skins interface, append some items */
         if( !mi )
         {
-
-            vlc_object_t *p_object = ( vlc_object_t* )
-                vlc_object_find_name( p_intf, "skins2", FIND_PARENT );
-            if( p_object )
+            if( p_intf->p_sys->b_isDialogProvider )
             {
+                vlc_object_t* p_object = p_intf->p_parent;
+
                 objects.clear(); varnames.clear();
                 objects.push_back( p_object );
                 varnames.push_back( "intf-skins" );
@@ -985,8 +986,6 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
                 objects.push_back( p_object );
                 varnames.push_back( "intf-skins-interactive" );
                 Populate( p_intf, submenu, varnames, objects );
-
-                vlc_object_release( p_object );
             }
             else
                 msg_Warn( p_intf, "could not find parent interface" );
@@ -1366,7 +1365,7 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
 }
 
 void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
-        QString text, QString help,
+        const QString& text, const QString& help,
         int i_item_type, vlc_object_t *p_obj,
         vlc_value_t val, int i_val_type,
         bool checked )