/*****************************************************************************
* open.cpp : Panels for the open dialogs
****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright (C) 2006-2008 the VideoLAN team
* Copyright (C) 2007 Société des arts technologiques
* Copyright (C) 2007 Savoir-faire Linux
*
#include <QDirModel>
#include <QScrollArea>
#include <QUrl>
+#include <QSettings>
/**************************************************************************
* Open Files and subtitles *
dialogBox->setFileMode( QFileDialog::ExistingFiles );
dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
- dialogBox->setViewMode( config_GetInt( p_intf, "qt-open-detail" ) ?
- QFileDialog::Detail : QFileDialog::List );
+#if HAS_QT43
+ QSettings settings( "vlc", "vlc-qt-interface" );
+ dialogBox->restoreState(
+ settings.value( "file-dialog-state" ).toByteArray() );
+#endif
/* We don't want to see a grip in the middle of the window, do we? */
dialogBox->setSizeGripEnabled( false );
FileOpenPanel::~FileOpenPanel()
{
+#if HAS_QT43
+ QSettings settings( "vlc", "vlc-qt-interface" );
+ settings.setValue( "file-dialog-state", dialogBox->saveState() );
+#endif
}
/* Show a fileBrowser to select a subtitle */
void FileOpenBox::accept()
{
- OpenDialog::getInstance( NULL, NULL )->play();
+ OpenDialog::getInstance( NULL, NULL, true )->selectSlots();
}
/* Function called by Open Dialog when clicked on cancel */
BUTTONACT( ui.audioCDRadioButton, updateButtons() );
BUTTONACT( ui.dvdsimple, updateButtons() );
BUTTONACT( ui.browseDiscButton, browseDevice() );
- BUTTONACT( ui.ejectButton, eject() );
+ BUTTON_SET_ACT_I( ui.ejectButton, "", eject, qtr( "Eject the disc" ),
+ eject() );
CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL());
CONNECT( ui.titleSpin, valueChanged( int ), this, updateMRL());