Commit f8d66f23 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: remove the static QAction* for the menus consistency in the Fullscreen Mode.

parent 916aa463
...@@ -1183,12 +1183,12 @@ void MainInterface::toggleFullScreen( void ) ...@@ -1183,12 +1183,12 @@ void MainInterface::toggleFullScreen( void )
{ {
showNormal(); showNormal();
emit askUpdate(); // Needed if video was launched after the F11 emit askUpdate(); // Needed if video was launched after the F11
QVLCMenu::fullscreenViewAction->setChecked( false ); emit fullscreenInterfaceToggled( false );
} }
else else
{ {
showFullScreen(); showFullScreen();
QVLCMenu::fullscreenViewAction->setChecked( true ); emit fullscreenInterfaceToggled( true );
} }
} }
......
...@@ -186,6 +186,7 @@ signals: ...@@ -186,6 +186,7 @@ signals:
void askBgWidgetToToggle(); void askBgWidgetToToggle();
void askUpdate(); void askUpdate();
void minimalViewToggled( bool ); void minimalViewToggled( bool );
void fullscreenInterfaceToggled( bool );
}; };
#endif #endif
...@@ -73,10 +73,6 @@ enum ...@@ -73,10 +73,6 @@ enum
static QActionGroup *currentGroup; 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; QMenu *QVLCMenu::recentsMenu = NULL;
/**************************************************************************** /****************************************************************************
...@@ -416,7 +412,7 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, ...@@ -416,7 +412,7 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
action->setShortcut( qtr( "Ctrl+H" ) ); action->setShortcut( qtr( "Ctrl+H" ) );
action->setCheckable( true ); action->setCheckable( true );
action->setChecked( !with_intf && action->setChecked( !with_intf &&
(mi->getControlsVisibilityStatus() && CONTROLS_HIDDEN ) ); (mi->getControlsVisibilityStatus() & CONTROLS_HIDDEN ) );
CONNECT( action, triggered( bool ), mi, toggleMinimalView( bool ) ); CONNECT( action, triggered( bool ), mi, toggleMinimalView( bool ) );
CONNECT( mi, minimalViewToggled( bool ), action, setChecked( bool ) ); CONNECT( mi, minimalViewToggled( bool ), action, setChecked( bool ) );
...@@ -424,8 +420,10 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf, ...@@ -424,8 +420,10 @@ QMenu *QVLCMenu::ViewMenu( intf_thread_t *p_intf,
/* FullScreen View */ /* FullScreen View */
action = menu->addAction( qtr( "&Fullscreen Interface" ), mi, action = menu->addAction( qtr( "&Fullscreen Interface" ), mi,
SLOT( toggleFullScreen() ), QString( "F11" ) ); SLOT( toggleFullScreen() ), QString( "F11" ) );
fullscreenViewAction = action;
action->setCheckable( true ); action->setCheckable( true );
action->setChecked( mi->isFullScreen() );
CONNECT( mi, fullscreenInterfaceToggled( bool ),
action, setChecked( bool ) );
/* Advanced Controls */ /* Advanced Controls */
action = menu->addAction( qtr( "&Advanced Controls" ), mi, action = menu->addAction( qtr( "&Advanced Controls" ), mi,
......
...@@ -94,10 +94,6 @@ public: ...@@ -94,10 +94,6 @@ public:
/* Actions */ /* Actions */
static void DoAction( QObject * ); static void DoAction( QObject * );
/* HACK for minimalView */
static QAction *minimalViewAction;
static QAction *fullscreenViewAction;
private: private:
/* All main Menus */ /* All main Menus */
static QMenu *FileMenu( intf_thread_t *, QWidget * ); static QMenu *FileMenu( intf_thread_t *, QWidget * );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment