Merge pull request #4440 from Montellese/settings_fixes
authorTrent Nelson <trent.a.b.nelson@gmail.com>
Fri, 21 Mar 2014 18:28:06 +0000 (12:28 -0600)
committerTrent Nelson <trent.a.b.nelson@gmail.com>
Fri, 21 Mar 2014 18:30:26 +0000 (12:30 -0600)
Two fixes in the settings system

xbmc/settings/lib/Setting.cpp
xbmc/settings/windows/GUIControlSettings.cpp

index b27dcdd..71d8378 100644 (file)
@@ -1092,7 +1092,7 @@ bool CSettingNumber::fromString(const std::string &strValue, double &value)
     return false;
 
   char *end = NULL;
-  value = (int)strtod(strValue.c_str(), &end);
+  value = strtod(strValue.c_str(), &end);
   if (end != NULL && *end != '\0')
     return false;
 
index 6165966..0fce4b8 100644 (file)
@@ -648,7 +648,7 @@ bool CGUIControlEditSetting::InputValidation(const std::string &input, void *dat
   if (editControl == NULL || editControl->GetSetting() == NULL)
     return true;
 
-  return editControl->GetSetting()->FromString(input);
+  return editControl->GetSetting()->CheckValidity(input);
 }
 
 CGUIControlSeparatorSetting::CGUIControlSeparatorSetting(CGUIImage *pImage, int id)