Re: Help with g_signal_connect()
- From: Mikkel Kamstrup Erlandsen <mikkel kamstrup gmail com>
- To: Victor Vladimir Chavez Gallardo <vivlachaga gmail com>
- Cc: desktop-devel-list gnome org
- Subject: Re: Help with g_signal_connect()
- Date: Tue, 10 Feb 2009 07:19:41 +0100
2009/2/10 Victor Vladimir Chavez Gallardo
<vivlachaga gmail com>
Hi, guys
i have the next code
====================================================================
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);
====================================================================
my GtkMenu is showed, but, if i send the widget via data in
g_signal_connect i get an segfault, with gdb i see a problem with
g_type_check_instance_cast ()
wrong code via g_signal_connect()
=====================================================================
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 );
====================================================================================================
Mikkel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]