At the end of the clock_init.js file

At the end of the clock_init.js file,

I don’t understand what theses lines are doing, can anyone

help me with this? :

// hack: the resumed event is triggered as soon as the item is created, hence before the “i.resumed” event handler is set

// the following lines will effectively pause and resume the launcher, and start the clock

// that’s ok

var intent = new Intent();

//that’s not ok :

intent.setClassName( “net.pierrox.lightning_launcher_extreme”, “net.pierrox.lightning_launcher.activities.Dashboard”);

// not ok

intent[‘putExtra(java.lang.String,int)’](“p”, d.getId());

//ok

LL.startActivity(intent);

]]>

3 Commentsto At the end of the clock_init.js file

  1. Anonymous says:

    < ![CDATA[

    Just looking at this code, I can guess that it created an item, and set an event in the resumed event to run a script (which will keep the clock running I guess)


    But the resumed event is triggered just after the item is created, and before the resumed event is set. For this reason it seems that, if you omit that last code, the clock won’t run until you open another app, then go back to the launcher.



    That code is only making a ‘go to desktop’ shortcut, going to the current desktop I guess, and executing it. This makes the launcher to reload the desktop, with the clock item. This time the event will run.



    (What I don’t understand is why it says ‘that’s not ok’ … I think it is ok :/ )

    ]]>

  2. Anonymous says:

    < ![CDATA[

    aaah ok !! thanks 😉



    (the comments ok and not ok are from me ^^)

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Ah! That makes sense 😛

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *