Re: Gnome::App->create_menus() not inserting widget info
- From: Paolo Molaro <lupus ximian com>
- To: gtk-perl-list gnome org
- Subject: Re: Gnome::App->create_menus() not inserting widget info
- Date: Thu, 7 Jun 2001 22:57:56 +0200
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 :
$app->create_toolbar(@main_toolbar);
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/app-helper.pl 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
--
-----------------------------------------------------------------
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]