WindowXMLDialog animation problem when closing down the GUI
#1
Hi all,

First of all,I´d like to remark that I´ve been searching through the documentation as well as the XBMC forum and I´ve found no Thread tackling this problem.

I am developing an script, that at some point runs in the background and pops up a window to notify the user about some news. When I create the window dialog ( WindowXMLDialog), the animation I set in the XML file is working very well. The problem is when the user clicks on any button that would enter in the condition where I call "self.close()". The window does close itself, but the problem is that it performs not animation whatsoever.

Does anyone know why the WindowClose animations are not performed?Or should I do something else rather than self.close()

Thanks in advance!
Reply
#2
tmacreturns Wrote:Hi all,

First of all,I´d like to remark that I´ve been searching through the documentation as well as the XBMC forum and I´ve found no Thread tackling this problem.

I am developing an script, that at some point runs in the background and pops up a window to notify the user about some news. When I create the window dialog ( WindowXMLDialog), the animation I set in the XML file is working very well. The problem is when the user clicks on any button that would enter in the condition where I call "self.close()". The window does close itself, but the problem is that it performs not animation whatsoever.

Does anyone know why the WindowClose animations are not performed?Or should I do something else rather than self.close()

Thanks in advance!
If i am not mistaken the animation should be handled by the skin you are using. What skin are you using?
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
Hi, first of all thanks for your answer.

I am afraid that my script has nothing to do with the skin, as scripts User Interface are independent to the skin I am using, as I am trying to load my own XML file.

I believe this has to do more with something within XBMC code like the WindowManager, or de DEinititialize function when dealing with add-ons. It looks like the "WindowManager" is not loading the animations when closing down the Script xml file, but it is loading them when initializing.

This may be cause because the script is initialized by the code within XBMC, and I am calling myself the "self.close()" function within my own code. My question is more oriented to finding a more suitable function than self.close, or if I have to add some code before to load the animations, or if I shouldn´t override the onAction function ....

Any clue?

Anyway, thanks again for replying Smile
Reply
#4
hi,
The animation on dialog close, has never really worked with WindowXMLDialog.

I have tips Smile

In your xml add this
PHP Code:
<window id="3000">
    ...
    <
onload>SetProperty(AnimationWaitingDialogOnClose,true)</onload>
    ...
    <
controls>
        <
control type="group">
            <!-- 
Example animation on close -->
            <
animation condition="IsEmpty(window.property(AnimationWaitingDialogOnClose))" type="conditional" reversible="false">
                <
effect type="zoom" start="100" end="80" center="640,360" easing="in" tween="back" time="300" />
                <
effect type="fade" start="100" end="0" time="300" />
            </
animation>
            <!-- 
add all other control in this group -->
            ...
        </
control>
    </
controls>
</
window
In your python code ( class WindowXMLDialog )
PHP Code:
def onActionselfaction ):
        
#ACTION_NAV_BACK = 92
        
if action == 92:
            
self._close_dialog()

    
def _close_dialogself ):
        
# use time.sleep and not xbmc.sleep
        
import time
        self
.clearProperty"AnimationWaitingDialogOnClose" )
        
time.sleep.3 #make sure is same as your time in animation time="300"
        
self.close() 
Cheers
frost
For my bad English, sorry. I am French Canadian.
Admin @ Passion-XBMC.org
Reply
#5
Thank you FrostBox!

I was already afraid I had to work around it, as I couldn´t find any information about this issue.

Now it is working just perfect, thanks!
Reply
#6
This is a bug (dialog doesn't get deleted properly) and I recently created a ticket for it, I hope this gets fixed soon. Quick workaround is to add xbmc.sleep(animation_time_in_ms) after self.close(), no property needed.
Image
Reply

Logout Mark Read Team Forum Stats Members Help
WindowXMLDialog animation problem when closing down the GUI0