Re: gtk-menu-popup
steve tell <[email protected]>
| Newsgroups | gmane.lisp.guile.gtk |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 9 Feb 2008, a r wrote:
> Hi,
>
> I can't access "gtk-menu-popup" function (either directly or via a
> generic "popup" method). Other functions like "gtk-menu-popdown" seem
> to be working find. Is it something wrong with my installation?
>
> I've compiled guile-gnome-platform-2.15.96 with g-wrap-1.9.9 and
> gtk-2.10.0. Grepping source code for "gtk-menu-popup" does not return
> anything but some entries in the documentation.
It seems to have gone missing somewhere between 2.15.94 and 2.15.96, as
this diff of gtk/gnome/overrides/defs shows:
***************
*** 240,260 ****
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GtkMenu
- ;; fixme: need a better wrapper for this one
- (define-method popup
- (of-object "GtkMenu")
- (c-name "gtk_menu_popup")
- (overrides "gtk_menu_popup")
- (return-type "none")
- (parameters
- '("GtkWidget*" "parent_menu_shell" (null-ok))
- '("GtkWidget*" "parent_menu_item" (null-ok))
- '("GtkMenuPositionFunc" "func" (null-ok))
- '("gpointer" "data" (null-ok))
- '("guint" "button")
- '("guint32" "activate_time")
- )
- )
I think it probably got caught up in the recent "remove functions
requiring non-instantiable types as arguments" cleanup that Andy did for
2.15.96.
In this case that cleanup was a bit too agressive; gtk-menu-popup (or
method popup on a GtkMenu object) actually was quite usable; even though
there was no way to create a GtkMenuPositionFunc object to pass as
the third argument, #f worked quite nicely thanks to the null-ok
attribute. Likewise, I don't think the 4th "gpointer" arg was of much
use, but passing #f let it work.
That's probably part of what the comment "fixme: need a better wrapper"
meant in the older version. Any chance this method function could be
revived?
Steve