]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/open_panels.cpp
Missing item to translate.
[vlc] / modules / gui / qt4 / components / open_panels.cpp
index 88294c5d7e7f6df7f37e7fda5aa14bd7d1fe2ea6..488d3f34275d68436fde9e773f2cad7c75037cea 100644 (file)
@@ -44,7 +44,8 @@
 #include <QDirModel>
 #include <QScrollArea>
 #include <QUrl>
-#include <QSettings>
+
+#define I_DEVICE_TOOLTIP N_("Select the device or the VIDEO_TS directory")
 
 /**************************************************************************
  * Open Files and subtitles                                               *
@@ -76,12 +77,9 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     dialogBox->setFileMode( QFileDialog::ExistingFiles );
     dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
 #if HAS_QT43
-    QSettings settings( "vlc", "vlc-qt-interface" );
     dialogBox->restoreState(
-            settings.value( "file-dialog-state" ).toByteArray() );
+            getSettings()->value( "file-dialog-state" ).toByteArray() );
 #endif
-    dialogBox->setViewMode( config_GetInt( p_intf, "qt-open-detail" ) ?
-            QFileDialog::Detail : QFileDialog::List );
 
     /* We don't want to see a grip in the middle of the window, do we? */
     dialogBox->setSizeGripEnabled( false );
@@ -145,8 +143,7 @@ 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() );
+    getSettings()->setValue( "file-dialog-state", dialogBox->saveState() );
 #endif
 }
 
@@ -229,6 +226,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     b_firstvcd = true;
     b_firstcdda = true;
 
+    ui.browseDiscButton->setToolTip( I_DEVICE_TOOLTIP );
+    ui.deviceCombo->setToolTip( I_DEVICE_TOOLTIP );
+
 #if WIN32 /* Disc drives probing for Windows */
     char szDrives[512];
     szDrives[0] = '\0';
@@ -258,7 +258,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());
@@ -272,9 +273,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
 
 DiscOpenPanel::~DiscOpenPanel()
 {
-    delete psz_dvddiscpath;
-    delete psz_vcddiscpath;
-    delete psz_cddadiscpath;
+    free( psz_dvddiscpath );
+    free( psz_vcddiscpath );
+    free( psz_cddadiscpath );
 }
 
 void DiscOpenPanel::clear()
@@ -399,7 +400,7 @@ void DiscOpenPanel::updateMRL()
 void DiscOpenPanel::browseDevice()
 {
     QString dir = QFileDialog::getExistingDirectory( 0,
-            qtr("Open a device or a VIDEO_TS directory") );
+            qtr( I_DEVICE_TOOLTIP ) );
     if (!dir.isEmpty()) {
         ui.deviceCombo->setEditText( dir );
     }