Fwd: Re: tweener



I resend this mail because this list doesn't admit attachments.

___________________
Escrito desde el móvil

---------- Mensaje reenviado ----------
De: "Juan Simón" <decedion gmail com>
Fecha: 21/3/2016 8:49 PM
Asunto: Re: tweener
Para: "Gnome Mailing List" <gnome-shell-list gnome org>
Cc:

No, It isn't solved. I've spoken too fast. The problem isn't the screen lock, the problem is the class itself. It works until certain amount of time, after this the animation isn't visible, the icon remains in same opacity.
I've tested with several transition types but all fails.
Perhaps I'm doing something wrong to declare the methods for icon-animated class. The animation is enabled when the main class calls to "mainObject.iconObject.startAnimation();".
I attach the extension.js code.
Any idea?
Regards.

2016-03-21 19:28 GMT+01:00 Juan Simón <decedion gmail com>:
Solved. I've added a chivato that the enable/disable methods check.

2016-03-21 19:11 GMT+01:00 Juan Simón <decedion gmail com>:
Hi,
In previous mails I have spoken of a extension that I've developed to monitor a background process. To avoid the problem that gnome-shell disables the extensions when screen is idle, I have emptied the methods enable() and disable(). Now it works well except the Tweener class when the screen is idle. This object (Tweener) is destroyed and it isn't resumed when the session is restored. This is the code fragment:

const IconAnimated = new Lang.Class({
    Name: 'IconAnimated',
    Extends: St.Icon,
   
    _init: function(icon_name, style_class) {
       
        this.parent({ icon_name: icon_name, style_class: style_class });

        this.TweenIn = {
            opacity:20,
            time:1,
            transition:'easeInOutSine',
            onComplete: function() {
                Tweener.addTween(this, this.TweenOut);
            }
        }

        this.TweenOut = {
            opacity:255,
            time:1,
            transition:'easeInOutSine',
            onComplete: function() {
                if (this.isDownloading) {
                    Tweener.addTween(this, this.TweenIn);
                } else {
                    return false;                   
                }
                return true;
            }
        }

    },

    startAnimation: function() {
        this.isDownloading = true;
        this.set_icon_name(ICON_ACTIVO);
        Tweener.addTween(this, this.TweenOut);
    },

    stopAnimation: function() {
        this.isDownloading = false;
        Tweener.removeTweens(this);
        this.opacity = 255;
        this.set_icon_name(ICON_INACTIVO);
    }
});

Do you know some way to skip this bug? Another way to animate the panel icon?
Regards.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]