How to destroy a GtkMenu?

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

 



After you have run gtk_menu_popup(), whats the proper way of deallocating memory for the menu?

Currently I'm hooking into the "deactivate" signal, from which I call gdk_threads_add_idle, which in turn calls a GSourceFunc that just does gtk_widget_destroy. Seems kinda convoluted so I'm guessing its probably not the right way.


eg.

...
  g_signal_connect(menu,"deactivate",on_menu_deactivate),NULL);
...


static gboolean destroy_(gpointer widget){
  gtk_widget_destroy(widget);
  return FALSE;
}

static void on_menu_deactivate(GtkWidget *menu, gpointer data){
  gdk_threads_add_idle(destroy_menu,menu);
}



V.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux