RE: Can I Disable or Alter GtkEntry and GtkTextView Clipboard Menus?



Am Dienstag, den 18.12.2007, 11:56 -0500 schrieb Vallone, Anthony:
> > I don't know what went wrong, but connecting to the "popup-menu" 
> > signal definitly works, as the attached program demonstrates.
> >
> Thanks for replying Mathias.  When I run your code, the clipboard menu
> still opens.  Does the menu open for you with this code?  If not, does
> the menu open for you if you remove the "popup-menu" signal connect?  If
> we are seeing different behavior for this code, maybe its a
> configuration/environment difference.

Oh, being a keyboard guy I only tested using the context-menu key. On
right-click the menu still appears. Weird.

Turns out, you also have to connect to "button-press-event" and return
TRUE there, when seeing event->button == 3 && event->type ==
GDK_BUTTON_PRESS.

Maybe you want to file a bug-report, that GTK+ should emit the
"popup-menu" signal when seeing that condition, instead of shortcutting
to the code displaying the popup menu.


Ciao,
Mathias
-- 
Mathias Hasselmann <mathias hasselmann gmx de>
Openismus GmbH: http://www.openismus.com/
Personal Site: http://taschenorakel.de/

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]