Set action for submenu in AppIndicator
Solution 1:
You created only item for submenu, not submenu. This can be done in this way:
//adding a submenu: //creating submenu GtkWidget *submenu1 = gtk_menu_new(); GtkWidget *submenu1_item = gtk_menu_item_new_with_label("SubMenu1"); gtk_menu_item_set_submenu(GTK_MENU_ITEM(submenu1_item), submenu1); //adding submenu to main menu gtk_menu_shell_append(GTK_MENU_SHELL(indicatormenu), submenu1_item); //adding an option to the submenu GtkWidget* submenu1_option; submenu1_option = gtk_menu_item_new_with_label("Submenu option!"); gtk_menu_shell_append(GTK_MENU_SHELL(submenu1), submenu1_option);