Reputation: 9
How to remove defaut context menu in vala? https://valadoc.org/webkit2gtk-4.0/WebKit.ContextMenu.html
this code, not working var cm = new WebKit.ContextMenu(); cm.remove_all();
Upvotes: 0
Views: 108
Reputation:
According to the documentation, you could do something like that.
my_web_view.context_menu.connect ((menu, evt, hit_test) => { return true; });
This signal is emitted every time a context menu is about to be shown. Returning true
in the handler will just prevent the menu to appear.
Upvotes: 1