Addon using skin files, window unload
#1
Hi

Im trying to make it when the user goes back, my addon displays a specific window. I know this can be done through window structure like this:

Code:
<window>
<onunload>Home</onunload>
</window>

I have created the folders ADDON/resources/skins/Default/1080i and in there i have added a file called window.xml with the code above. I want to know how i can make it so my addon uses this window.xml file so my unload call works.

Thanks a lot
Reply
#2
Doesnt make too much sense to me to open home after a script window was active, but you could try ActivateWindow(home) or ReplaceWindow(home) instead of just "Home"
Perhaps nicer to do this in python code though (onAction method of the XMLWindow Class)
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#3
Hi phil, thanks for your response. Home was just an example. I just want to show another window on unload of window. So, i wanted to know how skin files for addons work and how i can make my addon use them in this case. Im not sure how i can implement unload in python either.
Reply
#4
you can just use xbmc.executebuiltin("ActivateWindow(xxx)")
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#5
@phil65,

I have created a function for this;

def onUnload(self):
xbmc.executebuiltin("ActivateWindow(XX)")

but what i want to know is how i can call this function when the user goes back from the addon?
Reply
#6
I have tried doing this using onAction but the view in my addon turns black:

class MyClass(xbmcgui.Window):
def onAction(self, action):

if action == 10:
xbmc.executebuiltin("ActivateWindow(XX)")
mydisplay = MyClass()
mydisplay .doModal()
del mydisplay
Reply

Logout Mark Read Team Forum Stats Members Help
Addon using skin files, window unload0