0

I find GtkEntry has a default context menu
But I really do not want it, how can I disable it
I googled but no effective way found

Wiky
  • 152
  • 7

1 Answers1

2

Did you try to just hide/unref/destroy the wigdet passed (the GtkMenu being spawned) within a signal handler hooked to populate-popup?

Another option would be to filter out all right click events by hooking up to GtkWidget's (actually yout GtkEntry which is a subclass of GtkWidget) clicked signal and returning TRUE (for being handled)

drahnr
  • 6,782
  • 5
  • 48
  • 75
  • I have tried to destroy GtkMenu in populate-popup handler, which causes Segmentation fault.
    But the second way works, returning TRUE in button-press-event handler blocks the menu. Thanks so much.
    – Wiky Oct 05 '13 at 15:15