Index: guilib/GUISliderControl.h =================================================================== --- guilib/GUISliderControl.h (revision 30608) +++ guilib/GUISliderControl.h (working copy) @@ -72,14 +72,14 @@ virtual bool OnMouseWheel(char wheel, const CPoint &point); virtual CStdString GetDescription() const; void SetTextValue(const CStdString &textValue) { m_textValue = textValue; }; + /*! \brief Get the current position of the slider as a proportion + \return slider position in the range [0,1] + */ + float GetProportion() const; protected: virtual void UpdateColors(); virtual void Move(int iNumSteps); virtual void SetFromPosition(const CPoint &point); - /*! \brief Get the current position of the slider as a proportion - \return slider position in the range [0,1] - */ - float GetProportion() const; CGUITexture m_guiBackground; CGUITexture m_guiMid; Index: xbmc/GUIDialogPluginSettings.cpp =================================================================== --- xbmc/GUIDialogPluginSettings.cpp (revision 30608) +++ xbmc/GUIDialogPluginSettings.cpp (working copy) @@ -65,8 +65,8 @@ #define ID_BUTTON_DEFAULT 12 #define CONTROL_HEADING_LABEL 20 -#define CONTROL_START_SETTING 100 -#define CONTROL_START_SECTION 200 +#define CONTROL_START_SETTING 200 +#define CONTROL_START_SECTION 100 CGUIDialogPluginSettings::CGUIDialogPluginSettings() : CGUIDialogBoxBase(WINDOW_DIALOG_PLUGIN_SETTINGS, "DialogPluginSettings.xml") @@ -385,7 +385,11 @@ strMask.Replace("$AUDIO", g_stSettings.m_musicExtensions); strMask.Replace("$VIDEO", g_stSettings.m_videoExtensions); strMask.Replace("$IMAGE", g_stSettings.m_pictureExtensions); +#if defined(_WIN32_WINNT) + strMask.Replace("$EXECUTABLE", ".exe|.bat|.cmd|.py"); +#else strMask.Replace("$EXECUTABLE", ".xbe|.py"); +#endif } else { @@ -394,7 +398,11 @@ else if (strcmpi(type, "audio") == 0) strMask = g_stSettings.m_musicExtensions; else if (strcmpi(type, "executable") == 0) +#if defined(_WIN32_WINNT) + strMask = ".exe|.bat|.cmd|.py"; +#else strMask = ".xbe|.py"; +#endif } // get any options @@ -774,8 +782,13 @@ { pControl->SetWidth(group->GetWidth()); pControl->SetVisible(true); - if (setting->Attribute("visible")) - pControl->SetVisibleCondition(g_infoManager.TranslateString(setting->Attribute("visible")), false); + if (setting->Attribute("visible")) + { + CGUIInfoBool allowHiddenFocus(false); + if (setting->Attribute("allowhiddenfocus")) + allowHiddenFocus.Parse(setting->Attribute("allowhiddenfocus")); + pControl->SetVisibleCondition(g_infoManager.TranslateString(setting->Attribute("visible")), allowHiddenFocus); + } if (setting->Attribute("enable")) pControl->SetEnableCondition(g_infoManager.TranslateString(setting->Attribute("enable"))); pControl->SetID(controlId); @@ -848,12 +861,21 @@ void CGUIDialogPluginSettings::SetSliderTextValue(const CGUIControl *control, const char *format) { - if (format) - { - CStdString strValue; - strValue.Format(GetString(format), ((CGUISettingsSliderControl *)control)->GetFloatValue()); - ((CGUISettingsSliderControl *)control)->SetTextValue(strValue); - } + if (format) + { + CStdString strValue; + vector formats; + StringUtils::SplitString(format, ",", formats); + + if (formats.size() == 3 && !formats[2].IsEmpty() && ((CGUISettingsSliderControl *)control)->GetProportion() == 1.0f) + strValue.Format(GetString(formats[2]), ((CGUISettingsSliderControl *)control)->GetFloatValue()); + else if (formats.size() >= 2 && !formats[1].IsEmpty() && ((CGUISettingsSliderControl *)control)->GetProportion() == 0.0f) + strValue.Format(GetString(formats[1]), ((CGUISettingsSliderControl *)control)->GetFloatValue()); + else + strValue.Format(GetString(formats[0]), ((CGUISettingsSliderControl *)control)->GetFloatValue()); + + ((CGUISettingsSliderControl *)control)->SetTextValue(strValue); + } } CStdString CGUIDialogPluginSettings::NormalizePath(const char *value) const