[gnome-hispano] pasar parametro con g_signal_connect()
- From: Chÿffffffffffe1vez Gallardo Vÿffffffffffedctor Vladimi <vivlachaga yahoo com mx>
- To: Gnome-hispano-list gnome org
- Subject: [gnome-hispano] pasar parametro con g_signal_connect()
- Date: Mon, 9 Feb 2009 17:46:09 -0800 (PST)
Hola, tengo una ligera duda
tengo el siguiente código
====================================================================
mainIcon = gtk_status_icon_new_from_file(icon_filename);
GtkWidget *menu_popup;
menu_popup = glade_xml_get_widget(xml, "main_menu");
gtk_menu_popup(GTK_MENU(menu_popup) , NULL, NULL, NULL, NULL, 0,0);
====================================================================
mi menu contextual es desplegado correctamente, pero si lo mando mediante parametro a un callback me da
segfault
con gdb veo que es problema de "casting", pero no me queda claro el concepto
codigo erroneo
=====================================================================
void tray_icon_button_press (GtkWidget *widget, GtkWidget *menu)
{
gtk_menu_popup( GTK_MENU (menu) , NULL, NULL, NULL, NULL, 0, 0);
}
mainIcon = gtk_status_icon_new_from_file(icon_filename);
GtkWidget *menu_popup;
menu_popup = glade_xml_get_widget(xml, "main_menu");
g_signal_connect(G_OBJECT(mainIcon), "popup-menu", G_CALLBACK(tray_icon_button_press), menu_popup );
====================================================================================================
doy click derecho sobre mi iconito y plop!, no entiendo como estoy pasando mal el data del signalconnect
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb718e920 (LWP 15924)]
0xb76bee98 in g_type_check_instance_cast () from /usr/lib/libgobject-2.0.so.0
podrían ayudarme?
__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
Regístrate ya - http://correo.yahoo.com.mx/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]