From kde-panel-devel Wed Apr 29 14:50:43 2009 From: Tim Bocek Date: Wed, 29 Apr 2009 14:50:43 +0000 To: kde-panel-devel Subject: Re: Python bindings for PopupApplet Message-Id: <414bae770904290750h13010d8qab30f0db3f0e5e5b () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=124102252905446 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0710945305==" --===============0710945305== Content-Type: multipart/alternative; boundary=0016364eeff06071a00468b2b59f --0016364eeff06071a00468b2b59f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit OK, thanks for the info. As I'm not daring enough to run trunk maybe this is time to shed my reliance on scripting and learn to write one of these in good old C++ :) Thanks! -Tim On Wed, Apr 29, 2009 at 8:12 AM, Richard Dale wrote: > On Wed, Apr 29, 2009 at 2:31 PM, Tim Bocek wrote: > > Hello, > > I am trying to write a plasma applet in Python that pops up (like the > > battery monitor) when placed in the toolbar. I gathered that using the > > PopupApplet instead of Applet base class is the "right way" to do this, > > rather than try and use extenders myself and reinvent the wheel. > However, I > > also gather from the tutorials that I'm supposed to subclass > > plasmascript.Applet instead of Plasma.Applet when creating my applet. > The > > thing is, I can't find an equivalent plasmascript.PopupApplet. I have > tried > > including the line > > > > self.setApplet(Plasma.PopupApplet(self)) in the init (NOT __init__) > function > > for my plasmascript.Applet subclass, but this leaves me with a blank > applet. > > > > If I instead place this line in __init__, I get an exception that the > > maximum recursion depth for object creation has been exceeded. > > > > I've googled around a bit but haven't been able to find any explanation > of > > how to do this. The python plasma binding tutorials on TechBase don't > > explain it (though if I figure this out I'd be happy to write one that > > does!) Any ideas regarding what to do or where to look? > Support for writing PopupApplets in scripting languages was only > recently added to the KDE trunk. At the moment you can only write them > in Ruby, but hopefully Python support will be added before the KDE 4.3 > release. > > -- Richard > _______________________________________________ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel > --0016364eeff06071a00468b2b59f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable OK, thanks for the info.=A0 As I'm not daring enough to run trunk maybe= this is time to shed my reliance on scripting and learn to write one of th= ese in good old C++ :)

Thanks!
-Tim

On Wed, Apr 29, 2009 at 8:12 AM, Richard Dale <richard.j.dale@gmail.com> wrote:
On Wed, Apr 29, 2009 at 2:31 PM, Tim Boce= k <tim.bocek@gmail.com> wr= ote:
> Hello,
> I am trying to write a plasma applet in Python that pops up (like the<= br> > battery monitor) when placed in the toolbar.=A0 I gathered that using = the
> PopupApplet instead of Applet base class is the "right way" = to do this,
> rather than try and use extenders myself and reinvent the wheel.=A0 Ho= wever, I
> also gather from the tutorials that I'm supposed to subclass
> plasmascript.Applet instead of Plasma.Applet when creating my applet.= =A0 The
> thing is, I can't find an equivalent plasmascript.PopupApplet.=A0 = I have tried
> including the line
>
> self.setApplet(Plasma.PopupApplet(self)) in the init (NOT __init__) fu= nction
> for my plasmascript.Applet subclass, but this leaves me with a blank a= pplet.
>
> If I instead place this line in __init__, I get an exception that the<= br> > maximum recursion depth for object creation has been exceeded.
>
> I've googled around a bit but haven't been able to find any ex= planation of
> how to do this.=A0 The python plasma binding tutorials on TechBase don= 't
> explain it (though if I figure this out I'd be happy to write one = that
> does!)=A0 Any ideas regarding what to do or where to look?
Support for writing PopupApplets in scripting languages was onl= y
recently added to the KDE trunk. At the moment you can only write them
in Ruby, but hopefully Python support will be added before the KDE 4.3
release.

-- Richard
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

--0016364eeff06071a00468b2b59f-- --===============0710945305== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============0710945305==--