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

List:       kde-devel
Subject:    RE: SelectAction changes and questions, again
From:       Lotzi Boloni <boloni () cs ! purdue ! edu>
Date:       2000-03-03 14:21:13
[Download RAW message or body]

> > -I had to do it in QSelectAction - because the menu etc is a private
> > variable there. This is a permission question: I have 
> > commited it anyhow. 
> 
> I don't think this is a problem - we own it for now.

  Ok. I therefore allow Troll tech to all my changes, etc, etc. :-)

> >  I get a menu with a separator in the middle. But selecting the pink
> > beast, the selectAction->currentItem() now returns 1 (as the 
> > separator is not counted in the menu). 
> > 
> >    This can be either handled at the application level, or it 
> > can be fixed in QSelectAction - but this would imply some further 
> > work on QSelectAction. 
> 
> Why is it a problem ?
> Since you can't select a separator (can you?) why do you need it to have
> an index ?

  Ok, the problem is that then you can not index directly back into your
itemlist.  

  You see: 

  itemlist = {"Pink", "", "Blue"} 

  and you got back i=selectAction->currentItem 

  --- it is not going to work like:

  selectAction->itemList[i]

  But you should do something like:

  itemlist2 = {"Pink", "Blue"} // without the blanks, aka separators

  and itemlist2[i] will be correct.

      As I said, this can be done in the application, but you must take
care of it. I handled it in konsole, but if we keep it this way we had
to document it somewhere. Should I write it in kaction.h ?

           Lotzi

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

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