Commit 5f4c3c10 authored by Francois Cartegnie's avatar Francois Cartegnie

Qt: remember last selected transcode profile

parent b859fe97
...@@ -80,6 +80,19 @@ VLCProfileSelector::VLCProfileSelector( QWidget *_parent ): QWidget( _parent ) ...@@ -80,6 +80,19 @@ VLCProfileSelector::VLCProfileSelector( QWidget *_parent ): QWidget( _parent )
updateOptions( 0 ); updateOptions( 0 );
} }
VLCProfileSelector::~VLCProfileSelector()
{
QSettings settings(
#ifdef _WIN32
QSettings::IniFormat,
#else
QSettings::NativeFormat,
#endif
QSettings::UserScope, "vlc", "vlc-qt-interface" );
;
settings.setValue( "codecs-profiles-selected", profileBox->currentText() );
}
inline void VLCProfileSelector::fillProfilesCombo() inline void VLCProfileSelector::fillProfilesCombo()
{ {
QSettings settings( QSettings settings(
...@@ -108,6 +121,11 @@ inline void VLCProfileSelector::fillProfilesCombo() ...@@ -108,6 +121,11 @@ inline void VLCProfileSelector::fillProfilesCombo()
} }
} }
settings.endArray(); settings.endArray();
profileBox->setCurrentIndex(
profileBox->findText(
settings.value( "codecs-profiles-selected" ).toString() ));
} }
void VLCProfileSelector::newProfile() void VLCProfileSelector::newProfile()
......
...@@ -41,6 +41,7 @@ class VLCProfileSelector : public QWidget ...@@ -41,6 +41,7 @@ class VLCProfileSelector : public QWidget
public: public:
VLCProfileSelector( QWidget *_parent ); VLCProfileSelector( QWidget *_parent );
~VLCProfileSelector();
QString getMux() { return mux; } QString getMux() { return mux; }
QString getTranscode() { return transcode; } QString getTranscode() { return transcode; }
private: private:
......
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