1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| void position_menu ()
{
gint *x,*y;
gtk_status_icon_position_menu (GTK_MENU(menu), x, y, TRUE, p_status_icon);
printf("%d\n%d\n", x,y); //==> renvoit 9 et 9 pour x et y
system("PAUSE");
}
void popup_menu_function(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data)
{
GtkWidget *Connec, *Deconnec;
menu = gtk_menu_new();
// this opens the downloader window, or brings it to the foreground if already open
Connec = gtk_menu_item_new_with_mnemonic (("_Connexion"));
//g_signal_connect_swapped (item, "activate",G_CALLBACK (cb_new), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), Connec);
// this opens the downloader window, or brings it to the foreground if already open
Deconnec = gtk_menu_item_new_with_mnemonic (("_Deconnexion"));
//g_signal_connect_swapped (item, "activate",G_CALLBACK (cb_new), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), Deconnec);
gtk_widget_show_all (menu);
gtk_menu_popup (GTK_MENU(menu), NULL, NULL, position_menu, NULL, button, activate_time);
} |
Partager