Commit 986bb9de authored by François Cartegnie's avatar François Cartegnie 🤞

Qt: prefer dvd-simple when transcoding

parent ec831631
...@@ -361,6 +361,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -361,6 +361,7 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
CONNECT( ui.chapterSpin, valueChanged( int ), this, updateMRL()); CONNECT( ui.chapterSpin, valueChanged( int ), this, updateMRL());
CONNECT( ui.audioSpin, valueChanged( int ), this, updateMRL()); CONNECT( ui.audioSpin, valueChanged( int ), this, updateMRL());
CONNECT( ui.subtitlesSpin, valueChanged( int ), this, updateMRL()); CONNECT( ui.subtitlesSpin, valueChanged( int ), this, updateMRL());
CONNECT( ui.dvdsimple, toggled( bool ), this, updateMRL());
/* Run once the updateButtons function in order to fill correctly the comboBoxes */ /* Run once the updateButtons function in order to fill correctly the comboBoxes */
updateButtons(); updateButtons();
...@@ -446,6 +447,12 @@ void DiscOpenPanel::onFocus() ...@@ -446,6 +447,12 @@ void DiscOpenPanel::onFocus()
} }
#endif #endif
void DiscOpenPanel::updateContext(int c)
{
OpenPanel::updateContext(c);
ui.dvdsimple->setChecked( context == OpenPanel::CONTEXT_BATCH );
}
DiscOpenPanel::~DiscOpenPanel() DiscOpenPanel::~DiscOpenPanel()
{ {
free( psz_dvddiscpath ); free( psz_dvddiscpath );
......
...@@ -68,13 +68,22 @@ public: ...@@ -68,13 +68,22 @@ public:
OpenPanel( QWidget *p, intf_thread_t *_p_intf ) : QWidget( p ) OpenPanel( QWidget *p, intf_thread_t *_p_intf ) : QWidget( p )
{ {
p_intf = _p_intf; p_intf = _p_intf;
context = CONTEXT_INTERACTIVE;
} }
virtual ~OpenPanel() {}; virtual ~OpenPanel() {};
virtual void clear() = 0; virtual void clear() = 0;
virtual void onFocus() {} virtual void onFocus() {}
virtual void onAccept() {} virtual void onAccept() {}
static const int CONTEXT_INTERACTIVE = 0;
static const int CONTEXT_BATCH = 1;
virtual void updateContext(int c) { context = c; }
protected: protected:
intf_thread_t *p_intf; intf_thread_t *p_intf;
int context;
public slots: public slots:
virtual void updateMRL() = 0; virtual void updateMRL() = 0;
signals: signals:
...@@ -166,6 +175,7 @@ public: ...@@ -166,6 +175,7 @@ public:
#if defined( _WIN32 ) || defined( __OS2__ ) #if defined( _WIN32 ) || defined( __OS2__ )
virtual void onFocus(); virtual void onFocus();
#endif #endif
virtual void updateContext(int) Q_DECL_OVERRIDE;
private: private:
Ui::OpenDisk ui; Ui::OpenDisk ui;
char *psz_dvddiscpath, *psz_vcddiscpath, *psz_cddadiscpath; char *psz_dvddiscpath, *psz_vcddiscpath, *psz_cddadiscpath;
......
...@@ -297,6 +297,9 @@ void OpenDialog::signalCurrent( int i_tab ) ...@@ -297,6 +297,9 @@ void OpenDialog::signalCurrent( int i_tab )
assert( panel ); assert( panel );
panel->onFocus(); panel->onFocus();
panel->updateMRL(); panel->updateMRL();
panel->updateContext( i_action_flag == OPEN_AND_PLAY ?
OpenPanel::CONTEXT_INTERACTIVE :
OpenPanel::CONTEXT_BATCH );
} }
} }
......
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