Version: (using KDE KDE 3.4.0) Installed from: Debian testing/unstable Packages OS: Linux When a 'thread' in a mail folder consists of only one message, the 'Watch thread' and 'Ignore thread' options are not available. This is a major annoyance when reading busy mailing lists, where I frequently decide after reading the subject or a few lines of the message that I'll not be reading that thread. As it is now, I can only ignore the thread once the first reply has come in.
Hmm. Ok, it's not using 'Debian testing/unstable' packages, but Debian "4:3.4.0-0pre1" work-in-progress packages from alioth. 3.4 hasn't made it into Debian unstable yet.
I have the same behavior with Gentoo's 3.4.0 packages.
I'm looking into this. I'll update when I have more info and a possibly a fix
On Thursday 24 March 2005 10:20, Rich Birch wrote: > ------- Additional Comments From ringo albumsnaps com 2005-03-24 > 10:20 ------- I'm looking into this. I'll update when I have more info > and a possibly a fix Hmm. This also applies for marking threads read/unread. Thomas.
Ok, I've found the problem. allSelectedInCommonThread was not being set to true when only one message was selected.
Created an attachment (id=10318) [details] Fixes thread menu options not appearing when a single message is selected
Wait, more efficient patch on it's way... :)
Created an attachment (id=10319) [details] Fixes thread menu options not appearing when a single message is selected Old patch created an extra if clause which was already there.
Rich, that's truly great! Now, I didn't test it and I didn't look at the surrounding code, but your 2nd patch actually changes the program logic in what might be an unintended way. Think about the code below, with the first patch, the code 'a' and then 'c' can be executed, with your second patch, this is not possible anymore. ('b' would be your one-line fix of this bug). first patch: if (x) { a; } else if (y) { b; } if (y) { c; } new patch: if (x) { a; } else if (y) { b; c; } (sorry for not actually testing the fix, but compiling complex C++ things is a bit too much for my machine here. Running KDE is just bearable, as long as I don't log off and on too often :-)
Adrian, Thanks for pointing it out, but this was deliberate. When the first if is true then the second if cannot be true; if ( count > 1 && mHeaders->isThreaded() ) { ... } else if ( mHeaders->isThreaded() && count == 1 ) { ... } The first clause is executed if count is more than 1, whereas the second is only executed if count is 1. So the original second if clause would never be executed when the first if clause was true. I hope my arguement makes sense and I'm not being blind here :) Adrian von Bidder wrote: [bugs.kde.org quoted mail]
Ah, it's obvious - as I've said, I've only looked at the patch, and the if(..) condition is not in there. again, thanks for fixing this in record-breaking speed :-)
Hey, no probs Adrian! Glad to help.
CVS commit by kloecker: Treat single messages as threads in threaded message list. Based on patch by Rich Birch. BUGS:102351 M +5 -9 kmmainwidget.cpp 1.324 --- kdepim/kmail/kmmainwidget.cpp #1.323:1.324 @@ -2896,6 +2896,5 @@ void KMMainWidget::updateMessageActions( bool allSelectedInCommonThread = false; - bool singleMailIsPartOfThread = false; - if ( count > 1 && mHeaders->isThreaded() ) { + if ( mHeaders->isThreaded() && count > 1 ) { allSelectedInCommonThread = true; QListViewItem * curItemParent = mHeaders->currentItem(); @@ -2913,13 +2912,10 @@ void KMMainWidget::updateMessageActions( } } - if ( mHeaders->isThreaded() && count == 1 ) { - QListViewItem *cur = mHeaders->currentItem(); - if ( cur ) - singleMailIsPartOfThread = cur->parent() || cur->childCount() > 0; + else if ( mHeaders->isThreaded() && count == 1 ) { + allSelectedInCommonThread = true; } bool mass_actions = count >= 1; - bool thread_actions = mass_actions && - ( allSelectedInCommonThread || singleMailIsPartOfThread ) && + bool thread_actions = mass_actions && allSelectedInCommonThread && mHeaders->isThreaded(); mStatusMenu->setEnabled( mass_actions );
You need to log in before you can comment on or make changes to this bug.