From kde-devel Fri Jun 25 20:12:40 2010 From: Thomas Olsen Date: Fri, 25 Jun 2010 20:12:40 +0000 To: kde-devel Subject: SOLVED: Re: plasmascript.Applet sub-classing (Python) Message-Id: <201006252212.41139.tanghus () gmail ! com> X-MARC-Message: https://marc.info/?l=kde-devel&m=127749682924774 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0508630729==" --===============0508630729== Content-Type: multipart/signed; boundary="nextPart1869981.IQLu2m1rfM"; protocol="application/pgp-signature"; micalg=pgp-sha256 Content-Transfer-Encoding: 7bit --nextPart1869981.IQLu2m1rfM Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Friday 25 June 2010 11:54:59 Thomas Olsen wrote: > Hi >=20 > I have a couple of scripted Plasmoids which share a lot of code, so I > decided to make a BasePlasmoid class [1] that they could inherit from. I'm > testing it in one of the Plasmoids [2] and everything seems to work OK. > The only problem so far is that I have made some simple network monitoring > in the base class which sends a notification if the network disconnects a= nd > after subclassing this notification gets send twice. > I know I can be quite blind some times but I really think I have removed > all duplicate code. > Could someone share their eyes with me for a minute and have a look? I'm getting a bad habit of answering my own questions after seeing thats it= 's=20 totally obvious :-D I was testing with plasmoidviewer but I also had the Widget on one of my=20 desktops, so of course both fired off a notification - duh... =20 > [1] > http://code.google.com/p/google-translator/source/browse/trunk/google-tran > slator/contents/code/base.py [2] > http://code.google.com/p/google-translator/source/browse/trunk/google-tran > slator/contents/code/main.py >=20 > PS: If you see some obvious bad coding I would really appreciate to know > :-) I'd still like a second pair of eyes on the code if anyone's got the time ;= =2D) =2D-=20 Best Regards / Med venlig hilsen Thomas Olsen --nextPart1869981.IQLu2m1rfM Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAkwlDbgACgkQge+YkdGJAWj3JQEAiydwxc/nz+xp1FvbmljXsxQk XyajBMuQIGvPqR4IGegA/1h+5ldcQZEO/400o0QhDv5P/GY0Q3hmDxyyHqsguyCw =DqX8 -----END PGP SIGNATURE----- --nextPart1869981.IQLu2m1rfM-- --===============0508630729== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============0508630729==--