Browse Source

Qt: consistency on QSettings value for OpenDialog

pull/2/head
Jean-Baptiste Kempf 15 years ago
parent
commit
46be98404f
  1. 4
      modules/gui/qt4/components/open_panels.cpp
  2. 8
      modules/gui/qt4/dialogs/open.cpp

4
modules/gui/qt4/components/open_panels.cpp

@ -591,7 +591,7 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
if( var_InheritBool( p_intf, "qt-recentplay" ) )
{
b_recentList = true;
ui.urlComboBox->addItems( getSettings()->value( "Open/netMRL" ).toStringList() );
ui.urlComboBox->addItems( getSettings()->value( "OpenDialog/netMRL" ).toStringList() );
ui.urlComboBox->setMaxCount( 10 );
}
else
@ -614,7 +614,7 @@ NetOpenPanel::~NetOpenPanel()
/* Clean the list... */
mrlList.removeDuplicates();
/* ...and save the 8 last entries */
getSettings()->setValue( "Open/netMRL", mrlList );
getSettings()->setValue( "OpenDialog/netMRL", mrlList );
}
void NetOpenPanel::clear()

8
modules/gui/qt4/dialogs/open.cpp

@ -166,7 +166,7 @@ OpenDialog::OpenDialog( QWidget *parent,
BUTTONACT( cancelButton, cancel() );
/* Hide the advancedPanel */
if( !getSettings()->value( "opendialog-advanced", false ).toBool())
if( !getSettings()->value( "OpenDialog/advanced", false ).toBool())
{
ui.advancedFrame->hide();
ui.advancedFrame->setEnabled( false );
@ -183,7 +183,7 @@ OpenDialog::OpenDialog( QWidget *parent,
setMinimumSize( sizeHint() );
setMaximumWidth( 900 );
resize( getSettings()->value( "opendialog-size", QSize( 500, 400 ) ).toSize() );
resize( getSettings()->value( "OpenDialog/size", QSize( 500, 400 ) ).toSize() );
}
/* Finish the dialog and decide if you open another one after */
@ -219,10 +219,10 @@ void OpenDialog::setMenuAction()
OpenDialog::~OpenDialog()
{
getSettings()->setValue( "opendialog-size", size() -
getSettings()->setValue( "OpenDialog/size", size() -
( ui.advancedFrame->isEnabled() ?
QSize(0, ui.advancedFrame->height()) : QSize(0, 0) ) );
getSettings()->setValue( "opendialog-advanced", ui.advancedFrame->isVisible() );
getSettings()->setValue( "OpenDialog/advanced", ui.advancedFrame->isVisible() );
}
/* Used by VLM dialog and inputSlave selection */

Loading…
Cancel
Save