Commit 90f719f7 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Define an option to disable FS controller, as part of workaround #1758.

If you think this commit is too much a feature than a bugfix, please revert.
parent 743c5c00
...@@ -478,6 +478,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -478,6 +478,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_GENERIC( "qt-display-mode", IntegerList, NULL, CONFIG_GENERIC( "qt-display-mode", IntegerList, NULL,
displayModeBox ); displayModeBox );
CONFIG_GENERIC( "embedded-video", Bool, NULL, embedVideo ); CONFIG_GENERIC( "embedded-video", Bool, NULL, embedVideo );
CONFIG_GENERIC( "qt-fs-controller", Bool, NULL, fsController );
CONFIG_GENERIC_FILE( "skins2-last", File, NULL, ui.fileSkin, CONFIG_GENERIC_FILE( "skins2-last", File, NULL, ui.fileSkin,
ui.skinBrowse ); ui.skinBrowse );
......
...@@ -81,13 +81,14 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -81,13 +81,14 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
{ {
/* Variables initialisation */ /* Variables initialisation */
// need_components_update = false; // need_components_update = false;
bgWidget = NULL; bgWidget = NULL;
videoWidget = NULL; videoWidget = NULL;
playlistWidget = NULL; playlistWidget = NULL;
sysTray = NULL; sysTray = NULL;
videoIsActive = false; videoIsActive = false;
playlistVisible = false; playlistVisible = false;
input_name = ""; input_name = "";
fullscreenControls = NULL;
/* Ask for privacy */ /* Ask for privacy */
askForPrivacy(); askForPrivacy();
...@@ -222,12 +223,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf ) ...@@ -222,12 +223,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
CONNECT( this, askUpdate(), this, doComponentsUpdate() ); CONNECT( this, askUpdate(), this, doComponentsUpdate() );
CONNECT( controls, advancedControlsToggled( bool ),
this, doComponentsUpdate() );
CONNECT( fullscreenControls, advancedControlsToggled( bool ),
this, doComponentsUpdate() );
/* Size and placement of interface */ /* Size and placement of interface */
QVLCTools::restoreWidgetPosition(settings,this,QSize(350,60)); QVLCTools::restoreWidgetPosition(settings,this,QSize(350,60));
...@@ -387,12 +382,18 @@ void MainInterface::handleMainUi( QSettings *settings ) ...@@ -387,12 +382,18 @@ void MainInterface::handleMainUi( QSettings *settings )
controls = new ControlsWidget( p_intf, this, controls = new ControlsWidget( p_intf, this,
settings->value( "adv-controls", false ).toBool(), settings->value( "adv-controls", false ).toBool(),
b_shiny ); b_shiny );
CONNECT( controls, advancedControlsToggled( bool ),
this, doComponentsUpdate() );
/* Create the FULLSCREEN CONTROLS Widget */ /* Create the FULLSCREEN CONTROLS Widget */
/* bool b_shiny = config_GetInt( p_intf, "qt-blingbling" ); */ if( config_GetInt( p_intf, "qt-fs-controller" ) )
fullscreenControls = new FullscreenControllerWidget( p_intf, this, {
settings->value( "adv-controls", false ).toBool(), fullscreenControls = new FullscreenControllerWidget( p_intf, this,
b_shiny ); settings->value( "adv-controls", false ).toBool(),
b_shiny );
CONNECT( fullscreenControls, advancedControlsToggled( bool ),
this, doComponentsUpdate() );
}
/* Add the controls Widget to the main Widget */ /* Add the controls Widget to the main Widget */
mainLayout->insertWidget( 0, controls, 0, Qt::AlignBottom ); mainLayout->insertWidget( 0, controls, 0, Qt::AlignBottom );
...@@ -679,14 +680,14 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x, ...@@ -679,14 +680,14 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
// emit askVideoToResize( *pi_width, *pi_height ); // emit askVideoToResize( *pi_width, *pi_height );
emit askUpdate(); emit askUpdate();
fullscreenControls->attachVout( p_nvout ); if( fullscreenControls ) fullscreenControls->attachVout( p_nvout );
} }
return ret; return ret;
} }
void MainInterface::releaseVideo( vout_thread_t *p_vout, void *p_win ) void MainInterface::releaseVideo( vout_thread_t *p_vout, void *p_win )
{ {
fullscreenControls->detachVout( p_vout ); if( fullscreenControls ) fullscreenControls->detachVout( p_vout );
emit askReleaseVideo( p_win ); emit askReleaseVideo( p_win );
} }
...@@ -884,12 +885,17 @@ void MainInterface::setName( QString name ) ...@@ -884,12 +885,17 @@ void MainInterface::setName( QString name )
void MainInterface::setStatus( int status ) void MainInterface::setStatus( int status )
{ {
msg_Dbg( p_intf, "I was here, updating your status" ); msg_Dbg( p_intf, "I was here, updating your status" );
/* Forward the status to the controls to toggle Play/Pause */ /* Forward the status to the controls to toggle Play/Pause */
controls->setStatus( status ); controls->setStatus( status );
fullscreenControls->setStatus( status );
controls->updateInput(); controls->updateInput();
fullscreenControls->updateInput();
if( fullscreenControls )
{
fullscreenControls->setStatus( status );
fullscreenControls->updateInput();
}
speedControl->setEnable( THEMIM->getIM()->hasInput() ); speedControl->setEnable( THEMIM->getIM()->hasInput() );
/* And in the systray for the menu */ /* And in the systray for the menu */
......
...@@ -135,6 +135,8 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); ...@@ -135,6 +135,8 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define QT_ALWAYS_VIDEO_MODE_TEXT N_( "Complete look with information area" ) #define QT_ALWAYS_VIDEO_MODE_TEXT N_( "Complete look with information area" )
#define QT_MINIMAL_MODE_TEXT N_( "Minimal look with no menus" ) #define QT_MINIMAL_MODE_TEXT N_( "Minimal look with no menus" )
#define QT_FULLSCREEN_TEXT N_( "Show a controller in fullscreen mode" )
static const int i_mode_list[] = static const int i_mode_list[] =
{ QT_NORMAL_MODE, QT_ALWAYS_VIDEO_MODE, QT_MINIMAL_MODE }; { QT_NORMAL_MODE, QT_ALWAYS_VIDEO_MODE, QT_MINIMAL_MODE };
static const char *const psz_mode_list_text[] = static const char *const psz_mode_list_text[] =
...@@ -172,6 +174,8 @@ vlc_module_begin(); ...@@ -172,6 +174,8 @@ vlc_module_begin();
MINIMIZED_LONGTEXT, true); MINIMIZED_LONGTEXT, true);
add_bool( "qt-name-in-title", true, NULL, TITLE_TEXT, add_bool( "qt-name-in-title", true, NULL, TITLE_TEXT,
TITLE_LONGTEXT, false ); TITLE_LONGTEXT, false );
add_bool( "qt-fs-controller", true, NULL, QT_FULLSCREEN_TEXT,
QT_FULLSCREEN_TEXT, false );
add_bool( "qt-volume-complete", false, NULL, COMPLETEVOL_TEXT, add_bool( "qt-volume-complete", false, NULL, COMPLETEVOL_TEXT,
COMPLETEVOL_LONGTEXT, true ); COMPLETEVOL_LONGTEXT, true );
......
...@@ -91,21 +91,21 @@ ...@@ -91,21 +91,21 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="4" > <item row="4" column="0" colspan="4" >
<widget class="Line" name="line" > <widget class="Line" name="line" >
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0" > <item row="5" column="0" >
<widget class="QRadioButton" name="skins" > <widget class="QRadioButton" name="skins" >
<property name="text" > <property name="text" >
<string>_("Skins")</string> <string>_("Skins")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item rowspan="2" row="4" column="1" colspan="3" > <item rowspan="2" row="5" column="1" colspan="3" >
<widget class="QLabel" name="skinsLabel" > <widget class="QLabel" name="skinsLabel" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" > <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0" > <item row="6" column="0" >
<spacer> <spacer>
<property name="orientation" > <property name="orientation" >
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="6" column="0" > <item row="7" column="0" >
<widget class="QLabel" name="label_4" > <widget class="QLabel" name="label_4" >
<property name="text" > <property name="text" >
<string>_("Skin file")</string> <string>_("Skin file")</string>
...@@ -162,16 +162,36 @@ ...@@ -162,16 +162,36 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1" colspan="2" > <item row="7" column="1" colspan="2" >
<widget class="QLineEdit" name="fileSkin" /> <widget class="QLineEdit" name="fileSkin" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item> </item>
<item row="6" column="3" > <item row="7" column="3" >
<widget class="QPushButton" name="skinBrowse" > <widget class="QPushButton" name="skinBrowse" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" > <property name="text" >
<string>_("Browse...")</string> <string>_("Browse...")</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1" colspan="3" >
<widget class="QCheckBox" name="fsController" >
<property name="text" >
<string>_("Show a controller in fullscreen")</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
......
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