--===============2034806015== Content-Type: multipart/signed; boundary="nextPart1514213.DbaKGRAljV"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1514213.DbaKGRAljV Content-Type: multipart/mixed; boundary="Boundary-01=_/jNpHEg3DkDgqIh" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_/jNpHEg3DkDgqIh Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello I'm new to KDE development. I started today by creating a little=20 patch that addresses the following "issues" in kontact: =2D Sets the initial size of the AboutDialog to 640x400 =2D Saves the size of the AboutDialog on closing It's not much but my first few lines of KDE code.=20 About me: I'm an IT student from Switzerland and a KDE user since 2000.=20 This blogentry:=20 http://people.fruitsalad.org/adridg/bobulate/index.php?/archives/517-Shouto= uts-to-PIM.html=20 made me think that i could do something in return. I don't have=20 much experience in C++ and less in Qt. But since I am proficient=20 in C and in Java/Swing, its not that difficult. I would be glad if someone could point me to a=20 not-so-complex-but-interesting task. Cheers, Mischael Schill --Boundary-01=_/jNpHEg3DkDgqIh Content-Type: text/x-diff; charset="utf-8"; name="mypatch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mypatch" Index: kdepim/kontact/src/aboutdialog.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- kdepim/kontact/src/aboutdialog.h (Revision 769933) +++ kdepim/kontact/src/aboutdialog.h (Arbeitskopie) @@ -38,6 +38,12 @@ public: AboutDialog( Kontact::Core *core ); =20 + public slots: + /** + Saves the current window size to KConfig + */ + void saveSize(); + protected: void addAboutPlugin( Kontact::Plugin *plugin ); =20 Index: kdepim/kontact/src/aboutdialog.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- kdepim/kontact/src/aboutdialog.cpp (Revision 769933) +++ kdepim/kontact/src/aboutdialog.cpp (Arbeitskopie) @@ -59,8 +59,27 @@ addAboutPlugin( *it ); =20 addLicenseText( KGlobal::mainComponent().aboutData() ); + + KSharedConfigPtr config =3D KSharedConfig::openConfig(); + KConfigGroup group(config, "AboutDialog"); + int iwidth =3D group.readEntry("width").toInt();=20 + int iheight =3D group.readEntry("height").toInt(); + if(iwidth <=3D0) iwidth =3D 640; + if(iheight <=3D0) iheight =3D 400; + resize(iwidth, iheight); + connect(this, SIGNAL(finished(int)), this, SLOT(saveSize())); } =20 +void AboutDialog::saveSize() +{ + KSharedConfigPtr config =3D KSharedConfig::openConfig(); + KConfigGroup group(config, "AboutDialog"); + group.writeEntry("width", size().width()); + group.writeEntry("height", size().height()); + group.sync(); + config->sync(); +} + void AboutDialog::addAboutPlugin( Kontact::Plugin *plugin ) { addAboutData( plugin->title(), plugin->icon(), plugin->aboutData() ); --Boundary-01=_/jNpHEg3DkDgqIh-- --nextPart1514213.DbaKGRAljV Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQBHpNkLwrpm7jsVp+YRAstEAJ94Swpxr1Ho67qbLawdna4d0/v6UACggl+0 yH7Pt1iqXDo7hw6q2Pa87eY= =CeWG -----END PGP SIGNATURE----- --nextPart1514213.DbaKGRAljV-- --===============2034806015== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KDE PIM mailing list kde-pim@kde.org https://mail.kde.org/mailman/listinfo/kde-pim KDE PIM home page at http://pim.kde.org/ --===============2034806015==--