[vlmc-devel] commit: MediaLibrary: Update the filtered media when the filter type is changed ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Fri May 14 18:51:26 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu May 13 22:18:34 2010 +0200| [530f6a69ffc2cd612020c6a2bca4b032d3f5b537] | committer: Hugo Beauzée-Luyssen 

MediaLibrary: Update the filtered media when the filter type is changed

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=530f6a69ffc2cd612020c6a2bca4b032d3f5b537
---

 src/Gui/library/MediaLibrary.cpp |    8 ++++++++
 src/Gui/library/MediaLibrary.h   |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/Gui/library/MediaLibrary.cpp b/src/Gui/library/MediaLibrary.cpp
index 40ecaca..275e0e9 100644
--- a/src/Gui/library/MediaLibrary.cpp
+++ b/src/Gui/library/MediaLibrary.cpp
@@ -50,6 +50,8 @@ MediaLibrary::MediaLibrary(QWidget *parent) : QWidget(parent),
              this, SLOT( clearFilter() ) );
     connect( nav, SIGNAL( viewChanged( ViewController* ) ),
              this, SLOT( viewChanged( ViewController* ) ) );
+    connect( m_ui->filterType, SIGNAL( currentIndexChanged( int ) ),
+             this, SLOT( filterTypeChanged() ) );
 }
 
 void
@@ -111,3 +113,9 @@ MediaLibrary::filterByTags( const Clip *clip, const QString &filter )
 {
     return ( clip->matchMetaTag( filter ) );
 }
+
+void
+MediaLibrary::filterTypeChanged()
+{
+    filterUpdated( m_ui->filterInput->text() );
+}
diff --git a/src/Gui/library/MediaLibrary.h b/src/Gui/library/MediaLibrary.h
index ec33f1c..4476349 100644
--- a/src/Gui/library/MediaLibrary.h
+++ b/src/Gui/library/MediaLibrary.h
@@ -65,6 +65,7 @@ class MediaLibrary : public QWidget
          *  A view is changed when the user goes through the clips hierarchy.
          */
         void                viewChanged( ViewController* view );
+        void                filterTypeChanged();
 
     signals:
         void                importRequired();



More information about the Vlmc-devel mailing list