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 )
{
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 );
}
}
......
......@@ -186,6 +186,7 @@ signals:
void askBgWidgetToToggle();
void askUpdate();
void minimalViewToggled( bool );
void fullscreenInterfaceToggled( bool );
};
#endif
......@@ -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,
......
......@@ -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 * );
......
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