[vlc-devel] commit: Qt: remove the static QAction* for the menus consistency in the Fullscreen Mode . (Jean-Baptiste Kempf )
git version control
git at videolan.org
Fri Feb 27 20:59:27 CET 2009
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Feb 27 20:58:12 2009 +0100| [f8d66f23e21afdb60bb8e31b2f8fa7bdfba93ad6] | committer: Jean-Baptiste Kempf
Qt: remove the static QAction* for the menus consistency in the Fullscreen Mode.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f8d66f23e21afdb60bb8e31b2f8fa7bdfba93ad6
---
modules/gui/qt4/main_interface.cpp | 4 ++--
modules/gui/qt4/main_interface.hpp | 1 +
modules/gui/qt4/menus.cpp | 10 ++++------
modules/gui/qt4/menus.hpp | 4 ----
4 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 0af7620..fede720 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -1183,12 +1183,12 @@ void MainInterface::toggleFullScreen( void )
{
showNormal();
emit askUpdate(); // Needed if video was launched after the F11
- QVLCMenu::fullscreenViewAction->setChecked( false );
+ emit fullscreenInterfaceToggled( false );
}
else
{
showFullScreen();
- QVLCMenu::fullscreenViewAction->setChecked( true );
+ emit fullscreenInterfaceToggled( true );
}
}
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index b2c088e..4034eb5 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -186,6 +186,7 @@ signals:
void askBgWidgetToToggle();
void askUpdate();
void minimalViewToggled( bool );
+ void fullscreenInterfaceToggled( bool );
};
#endif
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 65226dd..efd5cc4 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -73,10 +73,6 @@ enum
static QActionGroup *currentGroup;
-/* HACK for minimalView to go around a Qt bug/feature
- * that doesn't update the QAction checked state when QMenu is hidden */
-QAction *QVLCMenu::fullscreenViewAction = NULL;
-
QMenu *QVLCMenu::recentsMenu = NULL;
/****************************************************************************
@@ -416,7 +412,7 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
action->setShortcut( qtr( "Ctrl+H" ) );
action->setCheckable( true );
action->setChecked( !with_intf &&
- (mi->getControlsVisibilityStatus() && CONTROLS_HIDDEN ) );
+ (mi->getControlsVisibilityStatus() & CONTROLS_HIDDEN ) );
CONNECT( action, triggered( bool ), mi, toggleMinimalView( bool ) );
CONNECT( mi, minimalViewToggled( bool ), action, setChecked( bool ) );
@@ -424,8 +420,10 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
/* FullScreen View */
action = menu->addAction( qtr( "&Fullscreen Interface" ), mi,
SLOT( toggleFullScreen() ), QString( "F11" ) );
- fullscreenViewAction = action;
action->setCheckable( true );
+ action->setChecked( mi->isFullScreen() );
+ CONNECT( mi, fullscreenInterfaceToggled( bool ),
+ action, setChecked( bool ) );
/* Advanced Controls */
action = menu->addAction( qtr( "&Advanced Controls" ), mi,
diff --git a/modules/gui/qt4/menus.hpp b/modules/gui/qt4/menus.hpp
index 76b65f6..3ab5ae0 100644
--- a/modules/gui/qt4/menus.hpp
+++ b/modules/gui/qt4/menus.hpp
@@ -94,10 +94,6 @@ public:
/* Actions */
static void DoAction( QObject * );
- /* HACK for minimalView */
- static QAction *minimalViewAction;
- static QAction *fullscreenViewAction;
-
private:
/* All main Menus */
static QMenu *FileMenu( intf_thread_t *, QWidget * );
More information about the vlc-devel
mailing list