From kde-panel-devel Mon Aug 25 16:52:35 2008 From: "Aaron J. Seigo" Date: Mon, 25 Aug 2008 16:52:35 +0000 To: kde-panel-devel Subject: Re: KDE/kdeplasma-addons/applets/comic Message-Id: <200808251052.36031.aseigo () kde ! org> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=121968315520649 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1513174666==" --===============1513174666== Content-Type: multipart/signed; boundary="nextPart1768856.D0iRPz96t7"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1768856.D0iRPz96t7 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 25 August 2008, Tobias Koenig wrote: > SVN commit 852244 by tokoe: > > Listen to Solid for network status changes and reload comic > if network becomes available. > > > M +1 -1 CMakeLists.txt > M +13 -1 comic.cpp > M +2 -0 comic.h > > > --- trunk/KDE/kdeplasma-addons/applets/comic/CMakeLists.txt #852243:852244 > @@ -5,7 +5,7 @@ > configwidget.cpp) > > kde4_add_plugin(plasma_applet_comic ${comic_SRCS}) > -target_link_libraries(plasma_applet_comic ${KDE4_KDEUI_LIBS} > ${PLASMA_LIBS} ${KDE4_KIO_LIBS}) +target_link_libraries(plasma_applet_com= ic > ${KDE4_KDEUI_LIBS} ${PLASMA_LIBS} ${KDE4_SOLID_LIBS} ${KDE4_KIO_LIBS}) > > install(TARGETS plasma_applet_comic DESTINATION ${PLUGIN_INSTALL_DIR}) > install(FILES plasma-comic-default.desktop DESTINATION > ${SERVICES_INSTALL_DIR}) --- > trunk/KDE/kdeplasma-addons/applets/comic/comic.cpp #852243:852244 @@ -48,7 > +48,13 @@ > { > loadConfig(); > > - updateComic(); > + Solid::Networking::Status status =3D Solid::Networking::status(); > + if ( status =3D=3D Solid::Networking::Connected || status =3D=3D > Solid::Networking::Unknown ) + updateComic(); > + > + connect( Solid::Networking::notifier(), SIGNAL( statusChanged( > Solid::Networking::Status ) ), + this, SLOT( > networkStatusChanged( Solid::Networking::Status ) ) ); + > updateButtons(); > } > > @@ -98,6 +104,12 @@ > updateComic(); > } > > +void ComicApplet::networkStatusChanged( Solid::Networking::Status status= ) > +{ > + if ( status =3D=3D Solid::Networking::Connected ) > + updateComic(); > +} > + > void ComicApplet::loadConfig() > { > KConfigGroup cg =3D config(); > --- trunk/KDE/kdeplasma-addons/applets/comic/comic.h #852243:852244 > @@ -27,6 +27,7 @@ > > #include > #include > +#include > > class ConfigWidget; > > @@ -49,6 +50,7 @@ > void slotNextDay(); > void slotPreviousDay(); > void applyConfig(); > + void networkStatusChanged( Solid::Networking::Status ); this should be something we offer with plasma so that applets don't have to= do=20 what Tobias just did; for Tobias it's a no-brainer quicky but for many widg= et=20 writers it won't be. it's like the power convseration thing ... something to consider in another= =20 Applet design iteration down the road. =2D-=20 Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Trolltech --nextPart1768856.D0iRPz96t7 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkiy41QACgkQ1rcusafx20Mq/wCeN8hI7e4t/tmogLCvOo0Ocxgm /pIAoKBYEom1IUSz/6HjvqTpwxWqgD71 =qnS9 -----END PGP SIGNATURE----- --nextPart1768856.D0iRPz96t7-- --===============1513174666== 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 --===============1513174666==--