[Kde-pim] KMail fix: initial state of actions and window title

David Faure faure at kde.org
Tue Oct 2 18:44:30 BST 2012


When you start KMail it selects the initial current folder as soon as it 
exists, but at that point the ETM doesn't know much about that folder yet (no 
name, no statistics). So KMail's slotFolderChanged() can't do much, disables 
all actions that depend on mails to be present, and shows "Loading..." in the 
title (from ETM's data()).

Things stay that way until you click on another folder, which isn't great 
usability (key left/right disabled, etc.) :)

The fix is to let ETM tell kmail when the information about the folder is 
finally available. Technically we could listen to dataChanged, but that's 
called so often for so many different reasons, it would just slow things down. 
Especially since we don't need to be notified of future changes (new email, 
mail read, etc.), because we already get that from Akonadi::Monitor).

So my patch adds a signal for "initial fetching of this collection is done",
and lets kmail update things (its copy of the collection object in 
mCurrentFolder, the window title, the state of the actions, etc.) when this is 
emitted for the current folder.

Please review.

(I didn't use reviewboard since this requires patches in two different modules, 
plus post-review seems to post uncommitted changes as well, such as all the 
debug output, which annoys the hell out of me)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdepimlibs_collectionfetched.diff
Type: text/x-patch
Size: 1396 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20121002/1ab31c8a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmail_collectionfetched.diff
Type: text/x-patch
Size: 2023 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20121002/1ab31c8a/attachment-0001.bin>
-------------- 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