aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--skin/Confluence/720p/MusicOSD.xml2
-rw-r--r--xbmc/GUIDialogAddonSettings.cpp8
-rw-r--r--xbmc/utils/Builtins.cpp14
3 files changed, 13 insertions, 11 deletions
diff --git a/skin/Confluence/720p/MusicOSD.xml b/skin/Confluence/720p/MusicOSD.xml
index 2c754d08db..9d8e595875 100644
--- a/skin/Confluence/720p/MusicOSD.xml
+++ b/skin/Confluence/720p/MusicOSD.xml
@@ -58,7 +58,7 @@
<onright>702</onright>
<onup>600</onup>
<ondown>600</ondown>
- <onclick>ActivateWindow(140)</onclick>
+ <onclick>Addon.Default.OpenSettings(visualization)</onclick>
</control>
<control type="button" id="702">
<posx>150</posx>
diff --git a/xbmc/GUIDialogAddonSettings.cpp b/xbmc/GUIDialogAddonSettings.cpp
index f7a2f5ae98..4b04165aac 100644
--- a/xbmc/GUIDialogAddonSettings.cpp
+++ b/xbmc/GUIDialogAddonSettings.cpp
@@ -101,14 +101,6 @@ bool CGUIDialogAddonSettings::OnMessage(CGUIMessage& message)
void CGUIDialogAddonSettings::OnInitWindow()
{
FreeControls();
- if (!m_addon)
- { //we're looking for viz settings //FIXME
- if (CAddonMgr::Get()->GetDefault(ADDON_VIZ, m_addon))
- {
- m_strHeading.Format("$LOCALIZE[10004] - %s", m_addon->Name().c_str()); // "Settings - AddonName"
- m_addon->LoadSettings();
- }
- }
CreateControls();
CGUIDialogBoxBase::OnInitWindow();
}
diff --git a/xbmc/utils/Builtins.cpp b/xbmc/utils/Builtins.cpp
index ba6e49b74b..8d54c2be86 100644
--- a/xbmc/utils/Builtins.cpp
+++ b/xbmc/utils/Builtins.cpp
@@ -28,6 +28,7 @@
#include "Builtins.h"
#include "ButtonTranslator.h"
#include "FileItem.h"
+#include "GUIDialogAddonSettings.h"
#include "GUIDialogFileBrowser.h"
#include "GUIDialogKeyboard.h"
#include "GUIDialogMusicScan.h"
@@ -38,6 +39,7 @@
#include "GUIWindowLoginScreen.h"
#include "GUIWindowVideoBase.h"
#include "Addon.h" // for TranslateType, TranslateContent
+#include "AddonManager.h"
#include "LastFmManager.h"
#include "LCD.h"
#include "log.h"
@@ -85,6 +87,7 @@
using namespace std;
using namespace XFILE;
using namespace MEDIA_DETECT;
+using namespace ADDON;
typedef struct
{
@@ -174,6 +177,7 @@ const BUILT_IN commands[] = {
{ "SetProperty", true, "Sets a window property for the current window (key,value)" },
{ "PlayWith", true, "Play the selected item with the specified core" },
{ "WakeOnLan", true, "Sends the wake-up packet to the broadcast address for the specified MAC address" },
+ { "Addon.Default.OpenSettings", true, "Open a settings dialog for the default addon of the given type" },
#if defined(HAS_LIRC) || defined(HAS_IRSERVERSUITE)
{ "LIRC.Stop", false, "Removes XBMC as LIRC client" },
{ "LIRC.Start", false, "Adds XBMC as LIRC client" },
@@ -934,7 +938,7 @@ int CBuiltins::Execute(const CStdString& execString)
CStdString strMask = (params.size() > 1) ? params[1] : "";
strMask.ToLower();
ADDON::TYPE type;
- if ((type = ADDON::TranslateType(strMask)) != ADDON::ADDON_UNKNOWN)
+ if ((type = TranslateType(strMask)) != ADDON_UNKNOWN)
{
CURL url;
url.SetProtocol("addons");
@@ -1051,7 +1055,7 @@ int CBuiltins::Execute(const CStdString& execString)
if (scanner->IsScanning())
scanner->StopScanning();
else
- CGUIWindowVideoBase::OnScan(params.size() > 1 ? params[1] : "",ADDON::ScraperPtr(),settings);
+ CGUIWindowVideoBase::OnScan(params.size() > 1 ? params[1] : "",ScraperPtr(),settings);
}
}
}
@@ -1263,6 +1267,12 @@ int CBuiltins::Execute(const CStdString& execString)
{
g_application.getNetwork().WakeOnLan((char*)params[0].c_str());
}
+ else if (execute.Equals("addon.default.opensettings") && params.size() == 1)
+ {
+ AddonPtr addon;
+ if (CAddonMgr::Get()->GetDefault(TranslateType(params[0]), addon))
+ CGUIDialogAddonSettings::ShowAndGetInput(addon);
+ }
#if defined(HAS_LIRC) || defined(HAS_IRSERVERSUITE)
else if (execute.Equals("lirc.stop"))
{