Re: How to pass data to GtkItemFactory callback function?
- From: Stephen Witkop <switkop charter net>
- To: "David J. Topper" <topper virginia edu>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: How to pass data to GtkItemFactory callback function?
- Date: 07 Nov 2002 06:23:49 -0500
On Wed, 2002-11-06 at 15:33, David J. Topper wrote:
> Hello,
>
> I'm using the simple method for the GtkItemFactory. Namely:
>
> GtkItemFactoryEntry menu_items[] = {
> { "/_File", NULL, NULL, 0, "<Branch>" },
> { "/File/_Open", "<control>O", open_file, 0, NULL },
>
> and so on. But I don't see how I can place a data pointer into this
> structure as I can with general gtk_signal_connect(). I do see,
> however, defs. in the GtkItemFactoryEtry spec off the docs:
>
> struct GtkItemFactoryEntry
> {
> gchar *path;
> gchar *accelerator;
>
> GtkItemFactoryCallback callback;
> guint callback_action;
>
> ...
>
> and GtkItemFactoryCallback 1&2 have some args which would work. But I'm
> at a loss to implement this.
>
You can use 'gtk_item_factory_create_item()' instead of
'_create_items()'.
--
Stephen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]