Re: Gnome::App->create_menus() not inserting widget info

On 05/30/01 Andrew Schretter wrote:
I'm creating a set of menus and toolbars the easy way with the
create_menus and create_toolbar functions of Gnome::App.

I create an array like :

@main_toolbar = (
        type => 'item',
        label => 'Quit',
        pixmap_type => 'filename',
        pixmap_info => 'pics/quit.xpm',
        hint => "Click here to quit",
        callback => sub \&my_function,

and then call :


Almost everything looks perfect.  The problem I am encountering is that
create_menus in the C code is supposed to put into the 11th field of GnomeUIInfo
a pointer to the GtkWidget that is the menuitem.  I can't seem to reference this
info, either it is not placed into the hash above when create_toolbar is called
or it is placed with a key that I can't find.

Ok, I wasn't aware of this feature (and anyway I didn't write 
that code, so blame dhd:-). When I needed to get a handle on a widget
I used the append_item() API.
Anyway, this is now fixed in cvs and will be included in the next release.
I changed Gnome/samples/ to show how to get the widgets.
I'd appreciate if someone writes a convenience function along the lines
of show_widget in the sample code that returns a widget given a path:

        my $widget = Gnome::widget_from_uiinfo (\ toolbar_info, "/Help/About")


lupus debian org                                     debian/rules
lupus ximian com                             Monkeys do it better

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