multiple applet support in panel



ok it's in! ... (well it was in for a few days, but it didn't work:)

now it should work ... the clock is the first to be multiapplet'ised.
what this means is that you can have multiple instances of an applet
controlled by a single process .... in fact you can also pass around a
parameter, SO youc an have a signle process controlling several types of
applets (netload, cpuload and cpumemusage could all be done from a
single process for example easily ....)

look at the clock applet which does this .... (well only one type of
applet, but multiple instances .... you will notice a loading speed
increase if you have more then one clock on the panel now, and also less
overhead)

basically what you do is you just bind "start_new_applet" on all your
applet widgets .... and you only start one on startup .. the otehrs you
start in the start_new_applet handler ... it will be called only for one
of the applets ...

anyway .. take a look at clock applet sources, it should be fairly self
explanatory ....

George

-- 
------------------------------------------------------------------------------
George Lebl <jirka@5z.com> http://www.5z.com/jirka/
------------------------------------------------------------------------------
  The following implements RSA in perl and is illegal to export from the US:

          #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
          $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
          lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)



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