Introduce HAVE_WX and HAVE_QT4 and show "Switch to WX" in QT4 only if built with WX
authorPavlov Konstantin <thresh@videolan.org>
Tue, 22 Jan 2008 00:07:29 +0000 (00:07 +0000)
committerPavlov Konstantin <thresh@videolan.org>
Tue, 22 Jan 2008 00:07:29 +0000 (00:07 +0000)
configure.ac
modules/gui/qt4/menus.cpp

index b50b2f5..4193560 100644 (file)
@@ -5194,6 +5194,7 @@ then
     if test "${ac_cv_wx_headers}" = "yes"
     then
       VLC_ADD_PLUGINS([wxwidgets])
+      AC_DEFINE([HAVE_WX], 1, [Define to 1 if you have WxWidgets library.])
       ALIASES="${ALIASES} wxvlc"
     fi
     CPPFLAGS="${CPPFLAGS_save}"
@@ -5213,6 +5214,7 @@ AS_IF([test "${enable_qt4}" != "no" &&
   (test "${SYS}" != "darwin" || test "${enable_qt4}" = "yes")], [
   PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.2.0],
     [ VLC_ADD_PLUGINS([qt4])
+      AC_DEFINE([HAVE_QT4], 1, [Define to 1 if you have QT4 library.])
       ALIASES="${ALIASES} qvlc"
       enableqt4=true
       VLC_ADD_LIBS([qt4],[$QT4_LIBS])
index c664283..2be86e8 100644 (file)
@@ -332,11 +332,13 @@ QMenu *QVLCMenu::InterfacesMenu( intf_thread_t *p_intf, QMenu *current )
         menu->addSeparator();
         menu->addAction( qtr( "Switch to skins" ), THEDP, SLOT( switchToSkins() ),
                 QString( "Ctrl+Z" ) );
+#ifdef HAVE_WX
         if( module_Exists( VLC_OBJECT( p_intf ), "wxwidgets" ) )
         {
             menu->addAction( qtr( "Switch to WxWidgets" ), THEDP,
                     SLOT( switchToWx() ) );
         }
+#endif
     }
 
     CONNECT( menu, aboutToShow(), THEDP->menusUpdateMapper, map() );