Re: simple question: get menu item string



I am trying to find the function that returns the string of the selected
item.

gchar *string;
GtkWidget *label = GTK_BIN (menu_item)->child;
gtk_label_get (GTK_LABEL (label), &string);

You don't need to malloc or free string, it's
just a pointer to the string allocated by Gtk.
Of course it's gone when the menu_item is destroyed.
Carlos




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