Overload toggleVisible() to update list with media from other interfaces.
authorMark Bidewell <mark.bidewell@alumni.clemson.edu>
Wed, 4 Feb 2009 23:42:57 +0000 (18:42 -0500)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 8 Feb 2009 17:29:26 +0000 (18:29 +0100)
Overload toggleVisible() to update list with media from other interfaces.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/gui/qt4/dialogs/vlm.cpp
modules/gui/qt4/dialogs/vlm.hpp

index adaf2d2..b8232d3 100644 (file)
@@ -835,5 +835,20 @@ void VLMWrapper::EditSchedule( const QString name, const QString input,
     }
 }
 
+void VLMDialog::toggleVisible()
+{
+    QList<VLMAWidget *>::iterator it;
+    for( it = vlmItems.begin(); it != vlmItems.end(); it++ )
+    {
+        VLMAWidget *item =  *it;
+        delete item;
+        item = NULL;
+    }
+    vlmItems.clear();
+    ui.vlmListItem->clear();
+    mediasPopulator();
+    QVLCDialog::toggleVisible();
+}
+
 
 #endif
index 5187ac6..9837064 100644 (file)
@@ -78,6 +78,7 @@ public:
         return instance;
     };
     virtual ~VLMDialog();
+    void toggleVisible();
 
     VLMWrapper *vlmWrapper;
     vlm_t *p_vlm;