[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Python bindings for PopupApplet
From:       Tim Bocek <tim.bocek () gmail ! com>
Date:       2009-04-29 14:50:43
Message-ID: 414bae770904290750h13010d8qab30f0db3f0e5e5b () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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 <richard.j.dale@gmail.com>wrote:

> On Wed, Apr 29, 2009 at 2:31 PM, Tim Bocek <tim.bocek@gmail.com> 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
>

[Attachment #5 (text/html)]

OK, thanks for the info.  As I&#39;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++ \
:)<br><br>Thanks!<br>-Tim <br><br><div class="gmail_quote">

On Wed, Apr 29, 2009 at 8:12 AM, Richard Dale <span dir="ltr">&lt;<a \
href="mailto:richard.j.dale@gmail.com">richard.j.dale@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div><div></div><div class="h5">On Wed, Apr 29, 2009 at 2:31 PM, Tim Bocek &lt;<a \
href="mailto:tim.bocek@gmail.com">tim.bocek@gmail.com</a>&gt; wrote:<br> &gt; \
Hello,<br> &gt; I am trying to write a plasma applet in Python that pops up (like \
the<br> &gt; battery monitor) when placed in the toolbar.  I gathered that using \
the<br> &gt; PopupApplet instead of Applet base class is the &quot;right way&quot; to \
do this,<br> &gt; rather than try and use extenders myself and reinvent the wheel.  \
However, I<br> &gt; also gather from the tutorials that I&#39;m supposed to \
subclass<br> &gt; plasmascript.Applet instead of Plasma.Applet when creating my \
applet.  The<br> &gt; thing is, I can&#39;t find an equivalent \
plasmascript.PopupApplet.  I have tried<br> &gt; including the line<br>
&gt;<br>
&gt; self.setApplet(Plasma.PopupApplet(self)) in the init (NOT __init__) function<br>
&gt; for my plasmascript.Applet subclass, but this leaves me with a blank applet.<br>
&gt;<br>
&gt; If I instead place this line in __init__, I get an exception that the<br>
&gt; maximum recursion depth for object creation has been exceeded.<br>
&gt;<br>
&gt; I&#39;ve googled around a bit but haven&#39;t been able to find any explanation \
of<br> &gt; how to do this.  The python plasma binding tutorials on TechBase \
don&#39;t<br> &gt; explain it (though if I figure this out I&#39;d be happy to write \
one that<br> &gt; does!)  Any ideas regarding what to do or where to look?<br>
</div></div>Support for writing PopupApplets in scripting languages was only<br>
recently added to the KDE trunk. At the moment you can only write them<br>
in Ruby, but hopefully Python support will be added before the KDE 4.3<br>
release.<br>
<br>
-- Richard<br>
_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br> \
</blockquote></div><br>



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic