X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fmain_interface.cpp;h=0dd678cb5a4ba8cdd4f9d04579664dc4588645c1;hb=d385374eb896391ca8ac38a3bdd1165013f8492a;hp=b62f5c8a8ae58a048b02dd2f1035acc341d28ff9;hpb=5aebc3b8e1e1b3a8928e1ca261a8ba73c21ed9e7;p=vlc diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp index b62f5c8a8a..0dd678cb5a 100644 --- a/modules/gui/qt4/main_interface.cpp +++ b/modules/gui/qt4/main_interface.cpp @@ -61,8 +61,6 @@ #define DS(i) i.width(),i.height() -#define DEBUG_COLOR 0 - /* Callback prototypes */ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable, vlc_value_t old_val, vlc_value_t new_val, void *param ); @@ -103,6 +101,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) setFocusPolicy( Qt::StrongFocus ); setAcceptDrops(true); setWindowIcon( QApplication::windowIcon() ); + setWindowOpacity( config_GetFloat( p_intf, "qt-opacity" ) ); /* Set The Video In emebedded Mode or not */ videoEmbeddedFlag = false; @@ -114,9 +113,10 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) alwaysVideoFlag = true; /* Set the other interface settings */ - playlistEmbeddedFlag = settings->value("playlist-embedded", true).toBool(); - visualSelectorEnabled= settings->value( "visual-selector", false ).toBool(); - + playlistEmbeddedFlag = settings->value( "playlist-embedded", true).toBool(); + visualSelectorEnabled = settings->value( "visual-selector", false ).toBool(); + notificationEnabled = config_GetInt( p_intf, "qt-notification" ) + ? true : false; /************************** * UI and Widgets design **************************/ @@ -624,9 +624,10 @@ void MainInterface::visual() void MainInterface::toggleMenus() { - if( menuBar()->isVisible() ) menuBar()->hide(); - else menuBar()->show(); - msg_Dbg( p_intf, "I was there: \\_o<~~ coin coin" ); + msg_Dbg( p_intf, "I HAS HERE, HIDING YOUR MENUZ: \\_o<~~ coin coin" ); + TOGGLEV( controls ); + TOGGLEV( statusBar() ); + updateGeometry(); } /* Video widget cannot do this synchronously as it runs in another thread */ @@ -791,8 +792,11 @@ void MainInterface::updateSystrayTooltipName( QString name ) else { sysTray->setToolTip( name ); - sysTray->showMessage( qtr( "VLC media player" ), name, - QSystemTrayIcon::NoIcon, 4000 ); + if( notificationEnabled ) + { + sysTray->showMessage( qtr( "VLC media player" ), name, + QSystemTrayIcon::NoIcon, 4000 ); + } } }