[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: Fwd: KMail
From:       Don Sanders <dsanders () cch ! com ! au>
Date:       2000-03-12 6:19:24
[Download RAW message or body]

On Sun, 05 Mar 2000, Don Sanders wrote:
> From: Reginald Stadlbauer <reggie@troll.no>
> > Also it seems that you react on currentChanged() in the header listview
> >  to display a message. IMO if currentChanged() is called but the new
> >  current item is not selected, the message of the new current item
> >  should _not_ be shown, but rather stay with the old shown message or
> >  show no message. Well, I'm not really sure about that but it seems
> >  wrong to me to show a message which is not selected.
>
> Good point, I hadn't thought of that. I think Andreas Gungl pointed that
> out too.

Ok how do I do this? I figured if I used Extended selection mode and 
connected the selectionChanged signal this would be easy, but the 
selectionChanged signal is never emitted when in Extended mode. Next I tried 
connecting the currentChanged signal (staying with Multi selection) and using 
something like:

// Connected to currentChanged signal
void KMHeaders::highlightMessage(QListViewItem* lvi)
{
  if (!lvi)
    return;

  if (lvi->isSelected()) // (Really I need to know if the selection has       
                                 // changed, so this isn't quite right)
    // Update the message shown in the reader window
}

But lvi->isSelected is always false. (I mean when clicking on an item or when 
pressing the space bar after using ctrl-arrows to change the current item) I 
guess items are selected after the currentChanged signal is emitted.

Does that make sense? Using extended seleciton I don't see an easy way to 
only update the message shown in the readerwindow when the selection is 
changed.

(Note I did getting this working to my satisfacation by using my custom 
selection behaviour implemented in kmheaders.cpp and checked this in to cvs).

BFN,
Don.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic