mvz / gir_ffi-gtk

GirFFI-based bindings for Gtk+. Supports both Gtk+ 2 and Gtk+ 3
GNU Lesser General Public License v2.1
19 stars 7 forks source link

'Gtk::Menu' is missing the 'popup'-method? #3

Closed kaspernj closed 12 years ago

kaspernj commented 12 years ago

Please see the following example which fails with "undefined method 'popup'". https://github.com/kaspernj/gir_ffi-gtk/blob/master/examples/07_statusicon.rb

According to the documentation and a Python-example, this method should exist: http://developer.gnome.org/gtk3/3.0/GtkMenu.html http://stackoverflow.com/questions/11381401/set-the-hover-background-color-of-a-gtk3-menuitem http://developer.gnome.org/gtk3/3.5/GtkMenu.html

mvz commented 12 years ago

This method seems to be 'unintrospectable', meaning it's not available for GirFFI automatically. I'll take a look to see if I can add an override for it; perhaps it can be implemented in terms of popup_for_device.

kaspernj commented 12 years ago

Is there any other way to show the menu? Calling show doesn't do the trick for me. In Gtk2 I also used the 'popup'-method.

mvz commented 12 years ago

popup_for_device basically handles this, and popup is just a convenience function, even in the C implementation.

Anyway, I've implemented Gtk::Menu#popup in the new release, 0.4.1.