[python] Add removeItem to ControlList
[vuplus_xbmc] / xbmc / interfaces / legacy / Control.cpp
index f6e369b..346be6b 100644 (file)
@@ -1225,6 +1225,16 @@ namespace XBMCAddon
       g_windowManager.SendThreadMessage(msg, iParentId);
     }
 
+    void ControlList::removeItem(int index) throw(UnimplementedException,WindowException)
+    {
+      if (index < 0 || index >= (int)vecItems.size())
+        throw WindowException("Index out of range");
+
+      vecItems.erase(vecItems.begin() + index);
+
+      sendLabelBind(vecItems.size());
+    }
+
     void ControlList::reset() throw(UnimplementedException)
     {
       CGUIMessage msg(GUI_MSG_LABEL_RESET, iParentId, iControlId);