[Kde-pim] Patch for KMail : unification between KMail tags and Nepomuk tags
Thomas McGuire
thomas.mcguire at gmx.net
Sat Aug 16 13:43:57 BST 2008
Hi,
On Wednesday 13 August 2008 14:03:37 Adrien BUSTANY wrote:
> > - The most important thing is config compatibility: User should not loose
> > 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 with
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
writeConfig(), again create a list of tags by reading them from Nepomuk.
Compare the two lists. If they are different, the user changed the tags in
between, for example with Dolphin. Then, you could refuse to to write the
settings (and show a message dialog) or even better don't delete newly added
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 can
change things without worrying about source or binary compatibility. Of
course, the existing calls to the constructors need to be adjusted, but that
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
Akonadi, there is still a lot to do there.
> Also, thanks for the detailed review, I appreciate it :-)
Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080816/1acc0f08/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list