Skip to content

Commit

Permalink
[fix] Control::setAnimations took the wrong type. It should now be ba…
Browse files Browse the repository at this point in the history
…ckwards compatible.
  • Loading branch information
Jim Carroll committed Nov 1, 2012
1 parent 30ef98c commit 4aad468
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions xbmc/interfaces/legacy/Control.cpp
Expand Up @@ -762,7 +762,7 @@ namespace XBMCAddon
pGUIControl->SetEnableCondition(enable);
}

void Control::setAnimations(const std::vector< std::vector<String> >& eventAttr) throw (WindowException)
void Control::setAnimations(const std::vector< Tuple<String,String> >& eventAttr) throw (WindowException)
{
CXBMCTinyXML xmlDoc;
TiXmlElement xmlRootElement("control");
Expand All @@ -774,13 +774,13 @@ namespace XBMCAddon

for (unsigned int anim = 0; anim < eventAttr.size(); anim++)
{
const std::vector<String>& pTuple = eventAttr[anim];
const Tuple<String,String>& pTuple = eventAttr[anim];

if (pTuple.size() != 2)
if (pTuple.GetNumValuesSet() != 2)
throw WindowException("Error unpacking tuple found in list");

const String& cAttr = pTuple[0];
const String& cEvent = pTuple[1];
const String& cAttr = pTuple.first();
const String& cEvent = pTuple.second();

TiXmlElement pNode("animation");
CStdStringArray attrs;
Expand Down
3 changes: 2 additions & 1 deletion xbmc/interfaces/legacy/Control.h
Expand Up @@ -25,6 +25,7 @@
#include "guilib/GUIFont.h"
#include "guilib/Key.h"

#include "Tuple.h"
#include "ListItem.h"
#include "swighelper.h"
#include "WindowException.h"
Expand Down Expand Up @@ -241,7 +242,7 @@ namespace XBMCAddon
* example:
* - self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0',)])\n
*/
virtual void setAnimations(const std::vector< std::vector<String> >& eventAttr) throw (WindowException);
virtual void setAnimations(const std::vector< Tuple<String,String> >& eventAttr) throw (WindowException);

// setPosition() Method
/**
Expand Down

0 comments on commit 4aad468

Please sign in to comment.