diff options
author | spiff_ <spiff_@svn> | 2010-04-26 20:33:48 +0000 |
---|---|---|
committer | spiff_ <spiff_@svn> | 2010-04-26 20:33:48 +0000 |
commit | 5d291434eef69ca7497165828c39e61cbf23c0ec (patch) | |
tree | f835218979e077346951d16c66480791510a0476 | |
parent | 10af207bd15255b338f4ad6f75aa073e4330a9e6 (diff) |
fixed: skin.setfile with an addon type specified
added: prettier skin.setfile for scripts
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@29519 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r-- | xbmc/utils/Builtins.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xbmc/utils/Builtins.cpp b/xbmc/utils/Builtins.cpp index 05058b3b6f..5be490aa0b 100644 --- a/xbmc/utils/Builtins.cpp +++ b/xbmc/utils/Builtins.cpp @@ -943,14 +943,18 @@ int CBuiltins::Execute(const CStdString& execString) { CURL url; url.SetProtocol("addons"); - url.SetHostName(strMask); + url.SetHostName("enabled"); + url.SetFileName(strMask+"/"); localShares.clear(); CStdString content = (params.size() > 2) ? params[2] : ""; content.ToLower(); url.SetPassword(content); + CStdString strMask; + if (type == ADDON_SCRIPT) + strMask = ".py"; CStdString replace; - if (CGUIDialogFileBrowser::ShowAndGetFile(url.Get(), "", TranslateType(type, true), replace, true, true)) - g_settings.SetSkinString(string, replace); + if (CGUIDialogFileBrowser::ShowAndGetFile(url.Get(), strMask, TranslateType(type, true), replace, true, true, true)) + g_settings.SetSkinString(string, CUtil::GetFileName(replace)); } else { |