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,
CONFIG_GENERIC( "qt-display-mode", IntegerList, NULL,
displayModeBox );
CONFIG_GENERIC( "embedded-video", Bool, NULL, embedVideo );
CONFIG_GENERIC( "qt-fs-controller", Bool, NULL, fsController );
CONFIG_GENERIC_FILE( "skins2-last", File, NULL, ui.fileSkin,
ui.skinBrowse );
......
......@@ -88,6 +88,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
videoIsActive = false;
playlistVisible = false;
input_name = "";
fullscreenControls = NULL;
/* Ask for privacy */
askForPrivacy();
......@@ -222,12 +223,6 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
CONNECT( this, askUpdate(), this, doComponentsUpdate() );
CONNECT( controls, advancedControlsToggled( bool ),
this, doComponentsUpdate() );
CONNECT( fullscreenControls, advancedControlsToggled( bool ),
this, doComponentsUpdate() );
/* Size and placement of interface */
QVLCTools::restoreWidgetPosition(settings,this,QSize(350,60));
......@@ -387,12 +382,18 @@ void MainInterface::handleMainUi( QSettings *settings )
controls = new ControlsWidget( p_intf, this,
settings->value( "adv-controls", false ).toBool(),
b_shiny );
CONNECT( controls, advancedControlsToggled( bool ),
this, doComponentsUpdate() );
/* 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(),
b_shiny );
CONNECT( fullscreenControls, advancedControlsToggled( bool ),
this, doComponentsUpdate() );
}
/* Add the controls Widget to the main Widget */
mainLayout->insertWidget( 0, controls, 0, Qt::AlignBottom );
......@@ -679,14 +680,14 @@ void *MainInterface::requestVideo( vout_thread_t *p_nvout, int *pi_x,
// emit askVideoToResize( *pi_width, *pi_height );
emit askUpdate();
fullscreenControls->attachVout( p_nvout );
if( fullscreenControls ) fullscreenControls->attachVout( p_nvout );
}
return ret;
}
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 );
}
......@@ -884,12 +885,17 @@ void MainInterface::setName( QString name )
void MainInterface::setStatus( int status )
{
msg_Dbg( p_intf, "I was here, updating your status" );
/* Forward the status to the controls to toggle Play/Pause */
controls->setStatus( status );
fullscreenControls->setStatus( status );
controls->updateInput();
if( fullscreenControls )
{
fullscreenControls->setStatus( status );
fullscreenControls->updateInput();
}
speedControl->setEnable( THEMIM->getIM()->hasInput() );
/* And in the systray for the menu */
......
......@@ -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_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[] =
{ QT_NORMAL_MODE, QT_ALWAYS_VIDEO_MODE, QT_MINIMAL_MODE };
static const char *const psz_mode_list_text[] =
......@@ -172,6 +174,8 @@ vlc_module_begin();
MINIMIZED_LONGTEXT, true);
add_bool( "qt-name-in-title", true, NULL, TITLE_TEXT,
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,
COMPLETEVOL_LONGTEXT, true );
......
......@@ -91,21 +91,21 @@
</property>
</widget>
</item>
<item row="3" column="0" colspan="4" >
<item row="4" column="0" colspan="4" >
<widget class="Line" name="line" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0" >
<item row="5" column="0" >
<widget class="QRadioButton" name="skins" >
<property name="text" >
<string>_("Skins")</string>
</property>
</widget>
</item>
<item rowspan="2" row="4" column="1" colspan="3" >
<item rowspan="2" row="5" column="1" colspan="3" >
<widget class="QLabel" name="skinsLabel" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
......@@ -139,7 +139,7 @@
</property>
</widget>
</item>
<item row="5" column="0" >
<item row="6" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
......@@ -152,7 +152,7 @@
</property>
</spacer>
</item>
<item row="6" column="0" >
<item row="7" column="0" >
<widget class="QLabel" name="label_4" >
<property name="text" >
<string>_("Skin file")</string>
......@@ -162,16 +162,36 @@
</property>
</widget>
</item>
<item row="6" column="1" colspan="2" >
<widget class="QLineEdit" name="fileSkin" />
<item row="7" column="1" colspan="2" >
<widget class="QLineEdit" name="fileSkin" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="6" column="3" >
<item row="7" column="3" >
<widget class="QPushButton" name="skinBrowse" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text" >
<string>_("Browse...")</string>
</property>
</widget>
</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>
</widget>
</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