From kde-pim Sat Aug 16 12:43:57 2008 From: Thomas McGuire Date: Sat, 16 Aug 2008 12:43:57 +0000 To: kde-pim Subject: Re: [Kde-pim] Patch for KMail : unification between KMail tags and Message-Id: <200808161444.04768.thomas.mcguire () gmx ! net> X-MARC-Message: https://marc.info/?l=kde-pim&m=121889632032034 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0906918784==" --===============0906918784== Content-Type: multipart/signed; boundary="nextPart1489034.4fig2Icyc9"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1489034.4fig2Icyc9 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, On Wednesday 13 August 2008 14:03:37 Adrien BUSTANY wrote: > > - The most important thing is config compatibility: User should not loo= se > > their old tags, and tagged messages should still be tagged the same > > way. You should not change the format of the config entries in any way, > > unless you write an update script (see the kconf_update subdirectory). > > Please make sure everything is still compatible. > > I'd say the easiest way is to not change the config entry layout (that > > would also reduce the diff and make it a bit more easier to read) > > Well, not changing the config is obviously the easiest way, but the > original config layout is very strange imho. On the other hand, and > update script would be tricky since you have to enter the existing tags > into Nepomuk... Yes, the original config layout is a bit strange, but now we have to live w= ith=20 it. > > - I am not quite sure about the // Sync the changes back to Nepomuk > > That seems like it will destroy all tags in Nepomuk which are not in > > KMail's tag list, right? So it seems to me that when the user creates a > > tag in Dolphin while KMail is open, that tag is deleted when KMail > > closes, which doesn't seem good. > > That is a known problem, we will likely add hooks to be notified when > the tag list changes. I did not really see another way to sync the tags. How about storing a list of the current Nepomuk tags in readConfig(). Then,= in=20 writeConfig(), again create a list of tags by reading them from Nepomuk.=20 Compare the two lists. If they are different, the user changed the tags in= =20 between, for example with Dolphin. Then, you could refuse to to write the=20 settings (and show a message dialog) or even better don't delete newly adde= d=20 tags from Nepomuk. > > - Do not duplicate the KMMessageTagDescription constructor. In fact, > > you've duplicated a bug here, the icon name should be "mail-tagged", not > > "feed-subscribe", IIRC. > > I suggest getting rid of most of the parameters in the constructor and > > using setters instead, and only use two small constructors that set the > > label (one automatically, one as parameter). The default values could be > > set in an init() function called by the two constructors. See also: > > http://doc.trolltech.com/qq/qq13-apis.html#theconveniencetrap > > So we're breaking the old API here ? Yes, the old API was not good. And since this is inside KMail anyway, we ca= n=20 change things without worrying about source or binary compatibility. Of=20 course, the existing calls to the constructors need to be adjusted, but tha= t=20 is not much and will probably be detected by the compiler. > > Thanks for the patch, better Nepomuk integration surely is good! > > Actually I'm really split between "I should wait before KMail switches > to Akonadi", which means not too soon I guess, and "it's not too hard to > hack around, but it's still a hack". I'll try to make the patch cleaner > though, as we really "need" to have some useful things to do with Nepomuk. You are very welcome to experiment with current Nepomuk integration in=20 Akonadi, there is still a lot to do there. > Also, thanks for the detailed review, I appreciate it :-) Regards, Thomas --nextPart1489034.4fig2Icyc9 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) iD8DBQBIpsuUKglv3sO8a1MRAin1AJsHGbg21Cn2v+ULZBKLTtUpk6jDEACgiqJa I0zoJyayxO5M9Rjv+fjvoKA= =s/jq -----END PGP SIGNATURE----- --nextPart1489034.4fig2Icyc9-- --===============0906918784== 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/ --===============0906918784==--