gtk_menu_set_tearoff_state()
- From: jos <j g a v riswick tue nl>
- To: gtk-devel-list gnome org
- Subject: gtk_menu_set_tearoff_state()
- Date: Mon, 22 Oct 2001 13:45:46 +0200
HI!!!
I'd like to make a menu popup in the torn off state
upon a button press. To do this, in the button callback
function, I first pop up the menu, and then set the
tearoff_state property to true:
gtk_menu_popup (GTK_MENU (widget), NULL, NULL, MenuPosition,
event, bevent->button, bevent->time);
gtk_menu_set_title(GTK_MENU (widget),"Menu");
gtk_menu_set_tearoff_state(GTK_MENU(widget),TRUE);
however, when I do this, and run the program from the
command line, I get two assertion failures:
Gtk-CRITICAL **: file gtkwidget.c: line 2971 (gtk_widget_reparent):
assertion `new_parent != NULL' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 3786 (gtk_widget_set_usize):
assertion `widget != NULL' failed.
The menus to appear in the correct way however.
When I don't tearoff the menus, I don't get the assertion
failures. What should I do to avoid the error messages?
Also I'd like to know how to get the sizes of the tearoff
menus including the window decorations, in order to do
the right positioning.
best regards
jos
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]