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

List:       koffice-devel
Subject:    Re: Thesaurus KDataTool
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-11-11 14:31:01
[Download RAW message or body]

On Dimanche 11 Novembre 2001 15:02, Daniel Naber wrote:
> On Thursday 08 November 2001 12:21, David Faure wrote:
> 
> > only called by the RMB action... It should also get called when the
> > Tools menu is opened (that would be more efficient than updating those
> > actions everytime the cursor changes words, or the selection
> > changes....). I guess we can connect to the tools menu's aboutToShow()
> > signal, for this.
> 
> Okay, but how to access it? Isn't this all done by KAction and we never see 
> any menu object?
> 
> I also tried this, but popupMenu("tools") returns null:
> connect(popupMenu("tools"), SIGNAL(aboutToShow()),  ....

Try (QPopupMenu*)factory()->container("tools",this)   (where this is the KWView)
That's what we use to get hold of RMB-popupmenus defined in an XML-UI file,
I think it also works with menubar-popupmenus.

Konqueror uses another trick, with a self-defined action that connects
to the aboutToShow signal of the menu in plug() (see KonqBidiHistoryAction).
Doesn't look too suited to this case though.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

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

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