Commit 185b2a6c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Remember the QFileDialog states.

parent 464d09b0
/***************************************************************************** /*****************************************************************************
* open.cpp : Panels for the open dialogs * 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 Société des arts technologiques
* Copyright (C) 2007 Savoir-faire Linux * Copyright (C) 2007 Savoir-faire Linux
* *
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <QDirModel> #include <QDirModel>
#include <QScrollArea> #include <QScrollArea>
#include <QUrl> #include <QUrl>
#include <QSettings>
/************************************************************************** /**************************************************************************
* Open Files and subtitles * * Open Files and subtitles *
...@@ -74,6 +75,11 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -74,6 +75,11 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
dialogBox->setFileMode( QFileDialog::ExistingFiles ); dialogBox->setFileMode( QFileDialog::ExistingFiles );
dialogBox->setAcceptMode( QFileDialog::AcceptOpen ); dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
#if HAS_QT43
QSettings settings( "vlc", "vlc-qt-interface" );
dialogBox->restoreState(
settings.value( "file-dialog-state" ).toByteArray() );
#endif
dialogBox->setViewMode( config_GetInt( p_intf, "qt-open-detail" ) ? dialogBox->setViewMode( config_GetInt( p_intf, "qt-open-detail" ) ?
QFileDialog::Detail : QFileDialog::List ); QFileDialog::Detail : QFileDialog::List );
...@@ -138,6 +144,10 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -138,6 +144,10 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
FileOpenPanel::~FileOpenPanel() 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 */ /* Show a fileBrowser to select a subtitle */
......
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