[vlc-devel] commit: Qt4: non-sense way of getting current playlist item ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat May 16 18:08:32 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Sat May 16 19:07:07 2009 +0300| [1a12ab42f9b4824f3e144714c39e39d02841867c] | committer: Rémi Denis-Courmont 

Qt4: non-sense way of getting current playlist item

We want the current playing item, rather than the number of items to
choose from. Besides, item-current is _not_ a choice list anyway.

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

 modules/gui/qt4/input_manager.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 94b08b4..b87fd99 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -884,10 +884,8 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
              im, setInput( input_thread_t * ) );
 
     /* emit check if playlist has allready started playing */
-    vlc_value_t val;
-    var_Change( THEPL, "item-current", VLC_VAR_CHOICESCOUNT, &val, NULL );
-
-    IMEvent *event = new IMEvent( ItemChanged_Type, val.i_int);
+    IMEvent *event = new IMEvent( ItemChanged_Type,
+                                  var_GetInteger( THEPL, "item-current" ) );
     customEvent( event );
     delete event;
 }




More information about the vlc-devel mailing list