Kodi Community Forum
Using ActivateWindow(window) from service.openelec.settings - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Using ActivateWindow(window) from service.openelec.settings (/showthread.php?tid=199953)



Using ActivateWindow(window) from service.openelec.settings - Mr Mojo Risin - 2014-07-15

Hi,

I am developing a Skin which has the Home Menu displayed from all screens as a wraplist to allow a user one click access to other areas of XBMC.

It is working well but the only issue I am having is on an OpenELEC build when calling service.openelec.settings (which has all the network connections)

My Settings window calls RunScript(service.openelec.settings) and it opens the OE settings window. It uses the default mainWindow.xml to serve the GUI which is located at addons/service.openelec.settings/resources/skins/Default/720p/

My mainWindow.xml includes the Menu List from my skin.

It displays the Menu List without problems but activateWindow(window) doesn't work because it is trying to activate a window that exists within skin.myskin but we are currently using the script service.openelec.settings

Nothing changes on the screen when I use activateWindow(window) - It just stays on the Network Connections screen.

Any help on how to activate a window from my skin whilst in service.openelec.settings would be great. I guess I would also have to close the mainWindow.xml but there is no built in functionality to close a window that I know of.

I have tried ReplaceWindow but this doesn't achieve what I am looking for.


RE: Using ActivateWindow(window) from service.openelec.settings - Hitcher - 2014-07-15

Why not change the name of your mainWindow.xml ?


RE: Using ActivateWindow(window) from service.openelec.settings - Mr Mojo Risin - 2014-07-17

I got this working.

I moved mainWindow.xml from service.openelec.settings to myskin and changed the path openelec settings is pointing at for its GUI.

At this point it would activate the window, but it wouldn't close OpenELEC settings or mainWindow.xml.

To get around this In my menu list I updated the onclick to have:

<onclick>back<onclick>
<onclick>activateWindow(window)<onclick>


RE: Using ActivateWindow(window) from service.openelec.settings - `Black - 2014-07-17

Why not change your xml name? Makes no sense to use workarounds here, you can simply change the name from your mainWindow.xml to something else and you won't have any problems with the openelec settings.


RE: Using ActivateWindow(window) from service.openelec.settings - Mr Mojo Risin - 2014-07-18

I tried changing the name of mainWindow.xml (changed it to testWindow.xml located at service.openelec.settings/resources/skins/Default/720p/) but it was still the same issue - unable to activate windows from my skin . By moving the location of mainWindow.xml to skin.myskin/720p/ I was able to activate windows from my skin.


RE: Using ActivateWindow(window) from service.openelec.settings - Kib - 2014-07-18

You should rename mainWindow within your skin - not within someone elses add-on.

Modifying other add-ons will just mean that on every update everything will break.