Re: menuitem activate



Not really GTK-related, but shouldn't the compiler have complained loudly
about passing a char* instead of a GtkMenuItem* ?
Or are you using a binding of gtk to a language that doesn't check types at
compile-time?

Jonathan

On 5/23/07, David Nečas (Yeti) <yeti physics muni cz> wrote:

On Wed, May 23, 2007 at 11:02:54AM -0400, danielg Posting wrote:
> >
> > gtk_widget_activate(item); or gtk_menu_item_activate(item);
>
> Okay, So, with this as the originator:
>   ifactory = gtk_item_factory_from_widget (dirview_popup);
> (...)
> menuitem = gtk_item_factory_get_item (ifactory, "/Refresh Tree");
>
> That's:
>
> gtk_menu_item_activate("/Refresh Tree");  ??
>
> That gives me a segfault.  I know I'm missing something little and
stupid but
> I don't know what it is.


http://developer.gnome.org/doc/API/2.0/gtk/GtkMenuItem.html#gtk-menu-item-activate

It has argument of GtkMenuItem* type, i.e. you pass the menu
item object.  No path, name, or anything.  The item itself
(that's menuitem here).

Yeti

--
http://gwyddion.net/
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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