]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/open_panels.cpp
Qt Imageset update.
[vlc] / modules / gui / qt4 / components / open_panels.cpp
index 5270983a9ccc1636c1b20e1098bd32e2b550a4a5..27ee2733045ababcd96737a6ddef2b551ed87aa9 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * 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
  *
@@ -44,6 +44,7 @@
 #include <QDirModel>
 #include <QScrollArea>
 #include <QUrl>
+#include <QSettings>
 
 /**************************************************************************
  * Open Files and subtitles                                               *
@@ -74,8 +75,11 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
 
     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 );
@@ -138,6 +142,10 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
 
 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 */
@@ -248,7 +256,8 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     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());