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