More GtkItemFactory questions...
- From: Thomas Mailund Jensen <mailund daimi aau dk>
- To: gtk-list redhat com
- Subject: More GtkItemFactory questions...
- Date: 26 Jul 1998 15:31:53 +0200
I have several windows with common menus. One of these windows are
changed dynamically, and I would like to be able to change all these
menus together. To do that I write
GtkMenuEntry *entry = g_new (GtkMenuEntry, 1);
entry->path = g_strconcat ("<SourceBuffer>/Highlight/Select Regexps/",
pattern_name, NULL);
entry->accelerator = NULL;
entry->callback = new_pattern_selected;
entry->callback_data = NULL;
gtk_item_factory_create_menu_entries (1, entry);
(It adds an entry with title pattern_name to the Select Regexps
sub-menu).
[Q1] But gtk_item_factory_create_menu_entries is deprecated. So what
should I do instead? Is it necessary to map through all my factories
and call gtk_item_factory_create_item?
[Q2] Also, a GtkMenuEntry has a callback_data pointer, while the
GtkItemFactoryEntry struct has an integer callback_action.
The callbacks are defined as
typedef void (*GtkMenuCallback) (GtkWidget *widget,
gpointer user_data);
and
typedef void (*GtkItemFactoryCallback) ();
typedef void (*GtkItemFactoryCallback1) (gpointer callback_data,
guint callback_action,
GtkWidget *widget);
typedef void (*GtkItemFactoryCallback2) (GtkWidget *widget,
gpointer callback_data,
guint callback_action);
so what should I expect the callback to be called with?
/mailund
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]