Re: menuitem confusion



On Sun, Jul 1, 2012 at 9:47 AM, Dave M <dave nerd gmail com> wrote:
On Sun, Jul 1, 2012 at 9:40 AM, Torsten Schoenfeld <kaffeetisch gmx de> wrote:
On 01.07.2012 16:22, Dave M wrote:

Mine's close to that - just has an extra "introspectable="0"" line:

       <constructor name="new"
                    c:identifier="gtk_radio_menu_item_new"
                    introspectable="0">
         <doc xml:whitespace="preserve">Creates a new
#GtkRadioMenuItem.</doc>
         <return-value transfer-ownership="none">
           <doc xml:whitespace="preserve">a new #GtkRadioMenuItem</doc>
           <type name="Widget" c:type="GtkWidget*"/>
         </return-value>
         <parameters>
           <parameter name="group" transfer-ownership="none">
             <doc xml:whitespace="preserve">the group to which the
radio menu item is to be attached</doc>
             <type name="GLib.SList" c:type="GSList*">
               <type name="gpointer" c:type="gpointer"/>
             </type>
           </parameter>
         </parameters>
       </constructor>

Is that extra line the problem?  If it worked, I would have been done
with the whole RadioMenuItem by now.  Weird!


Yep, that line's an indicator of the problem: the "group" parameter has
incomplete type information.  This was fixed only very recently:
<http://git.gnome.org/browse/gtk+/commit/?id=261d2d96e3febb68fbc7b1f774674f6ffe9c703a>.
Only gtk+ >= 3.5.4 contains this fix.  Do you have the possibility to run
against such a version of gtk+ (for example by using jhbuild)?

I'll mess around with jhbuild today and see if I can make it work.
Not sure when Fedora will get around to upgrading gtk+, so this would
probably be faster.

Ok, got everything to work with jhbuild.  Attached are a new Gtk3.pm,
a diff, an example program (menus.pl), and the tests.  I only had to
make minor changes to the tests to work (such as adding ->get_group in
a couple spots).  The example program also works with both undef and
[].

How is this look? Anything jump out as needing improvement or fixes?

Thanks,
Dave M

Attachment: radiomenuitem.tar.gz
Description: GNU Zip compressed data



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