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
| game = gtk_menu_new ();
new_item = gtk_menu_item_new_with_label ( _("New"));
g_signal_connect ( G_OBJECT(new_item), "activate", G_CALLBACK (new_game), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL(game), new_item);
level_easy_item = gtk_radio_menu_item_new_with_label (group, _("Easy"));
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (level_easy_item));
g_signal_connect ( G_OBJECT(level_easy_item), "activate", G_CALLBACK (chLevel), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL(game), level_easy_item);
level_medium_item = gtk_radio_menu_item_new_with_label (group, _("Medium"));
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (level_medium_item));
g_signal_connect ( G_OBJECT(level_medium_item), "activate", G_CALLBACK (chLevel), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL(game), level_medium_item);
level_hard_item = gtk_radio_menu_item_new_with_label (group, _("Hard"));
group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (level_hard_item));
g_signal_connect ( G_OBJECT(level_hard_item), "activate", G_CALLBACK (chLevel), NULL);
gtk_menu_shell_append (GTK_MENU_SHELL(game), level_hard_item);
level_easy_item = gtk_menu_item_new_with_label ( _("Game"));
gtk_menu_item_set_submenu (GTK_MENU_ITEM(level_easy_item), game);
gtk_menu_shell_append(GTK_MENU_SHELL(menu), level_easy_item); |
Partager