[vlc-commits] Qt: prefer dvd-simple when transcoding

Francois Cartegnie git at videolan.org
Mon May 4 18:59:18 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon May  4 18:07:37 2015 +0200| [986bb9de49a3bfd9e524f8de0fbece6fa3f5cd2b] | committer: Francois Cartegnie

Qt: prefer dvd-simple when transcoding

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=986bb9de49a3bfd9e524f8de0fbece6fa3f5cd2b
---

 modules/gui/qt4/components/open_panels.cpp |    7 +++++++
 modules/gui/qt4/components/open_panels.hpp |   10 ++++++++++
 modules/gui/qt4/dialogs/open.cpp           |    3 +++
 3 files changed, 20 insertions(+)

diff --git a/modules/gui/qt4/components/open_panels.cpp b/modules/gui/qt4/components/open_panels.cpp
index 53059c9..5e61c71 100644
--- a/modules/gui/qt4/components/open_panels.cpp
+++ b/modules/gui/qt4/components/open_panels.cpp
@@ -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 );
diff --git a/modules/gui/qt4/components/open_panels.hpp b/modules/gui/qt4/components/open_panels.hpp
index 1649eef..a3cd179 100644
--- a/modules/gui/qt4/components/open_panels.hpp
+++ b/modules/gui/qt4/components/open_panels.hpp
@@ -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;
diff --git a/modules/gui/qt4/dialogs/open.cpp b/modules/gui/qt4/dialogs/open.cpp
index 3ddfcd5..d080dac 100644
--- a/modules/gui/qt4/dialogs/open.cpp
+++ b/modules/gui/qt4/dialogs/open.cpp
@@ -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 );
     }
 }
 



More information about the vlc-commits mailing list