Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » GTK+
  • » Problems with tear-off menus [RSS Feed]

#1 June 16, 2010 14:34:39

Ken R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Problems with tear-off menus


On Ubuntu 10.04

I have some normal drop down menus that would be more useful as tear-off menus
(i.e. as draggable menus that pop up and stay in the window/dialog).

FOR TOPWINDOW:

To make the tear-off menu appear I use the code:


   gtk_menu_set_tearoff_state ((GtkMenu *)m->menuwidget, true ) ;

This causes the the tear-off menu to appear in the window at current cursor
position. It is embedded in a window with a title bar.

The following messages appear when when gtk_menu_set_tearoff_state is executed:

Gdk-CRITICAL **: gdk_drawable_get_size: assertion `GDK_IS_DRAWABLE (drawable)'
failed

 Gdk-CRITICAL **: gdk_window_get_position: assertion `GDK_IS_WINDOW (window)'
failed   repeated about ten times

I then click a menu item in the tear-off menu and get around 50 more
gdk_window_get_position: assertion messages.

The action event of the menu item is not carried out, but menu items change
colour when I move the cursor above them..


FOR MENUS IN DIALOGS:

Using the same gtk_menu_set_tearoff_state function this time the error message
is:

Gdk-CRITICAL **: gdk_drawable_get_size: assertion `GDK_IS_DRAWABLE (drawable)'
failed

and only that.

The tear-off menu is not clickable. When I move the cursor over it the menu
items do not change colour.

Of course I could use a listbox (=listview with one column) but that would
involve a fair amount of extra work. The tear-off menu is exactly what I need,
but how can I make it work?

Grateful for advice._______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

  • Root
  • » GTK+
  • » Problems with tear-off menus [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support