X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fqt4%2Fcomponents%2Fopen_panels.cpp;h=488d3f34275d68436fde9e773f2cad7c75037cea;hb=552b5247eea6d1c0c93407c49ce64a39af751e43;hp=14ec54cddce5757569ad4732ffe65e8d80c76f39;hpb=25913057d876321a7dad59c8b33223f0bf83dd3b;p=vlc diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp index 14ec54cddc..488d3f3427 100644 --- a/modules/gui/qt4/components/open_panels.cpp +++ b/modules/gui/qt4/components/open_panels.cpp @@ -44,7 +44,8 @@ #include #include #include -#include + +#define I_DEVICE_TOOLTIP N_("Select the device or the VIDEO_TS directory") /************************************************************************** * Open Files and subtitles * @@ -76,9 +77,8 @@ 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 /* We don't want to see a grip in the middle of the window, do we? */ @@ -143,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 } @@ -227,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'; @@ -256,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()); @@ -270,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() @@ -397,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 ); }