From b3a59b06a977129bd773ff46f4fd66e0057fb9cd Mon Sep 17 00:00:00 2001 From: chriszero Date: Fri, 27 Mar 2015 09:32:27 +0100 Subject: develop skindesigner support --- plex.cpp | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'plex.cpp') diff --git a/plex.cpp b/plex.cpp index ed8af98..61fd69b 100644 --- a/plex.cpp +++ b/plex.cpp @@ -2,6 +2,9 @@ #include "SubscriptionManager.h" #include "plex.h" #include "plexOsd.h" +#include "plexSdOsd.h" + +#include "libskindesigner/services.h" ////////////////////////////////////////////////////////////////////////////// // cPlugin @@ -51,6 +54,27 @@ const char *cMyPlugin::Description(void) bool cMyPlugin::Start(void) { + std::string cacheDir = cPlugin::CacheDirectory(PLUGIN_NAME_I18N); + + RegisterPlugin reg; + reg.name = "plex"; + + reg.SetView(viRootView, "root.xml"); + reg.SetViewGrid(eViews::viRootView, eViewGrids::vgBrowser, "browser"); + reg.SetViewElement(viRootView, verHeader, "header"); + + //reg.SetViewElement(viRootView, verHeader, "header"); + //reg.SetViewElement(viRootView, verFooter, "footer"); + + //reg.SetView(eViews::viBrowserView, "browser.xml"); + + + static cPlugin *pSkinDesigner = cPluginManager::GetPlugin("skindesigner"); + if (pSkinDesigner) { + pSkinDesigner->Service("RegisterPlugin", ®); + } else { + esyslog("[plex]: skindesigner not available"); + } return true; } @@ -83,7 +107,13 @@ const char *cMyPlugin::MainMenuEntry(void) cOsdObject *cMyPlugin::MainMenuAction(void) { //dsyslog("[plex]%s:\n", __FUNCTION__); - return cPlexMenu::ProcessMenu(); + /*bool skinDesignerAvailable = InitSkindesignerInterface("plex"); + if (skinDesignerAvailable) { + //cOsdView *rootView = GetOsdView(viRootView); + return new cPlexSdOsd(); + } + return cPlexMenu::ProcessMenu();*/ + return new cPlexSdOsd(); } /** -- cgit v1.2.3