activate_item() is used to emit the "activate" signal from the GtkMenuItem passed as the first argument. This has the same effect as a user clicking on an item or pressing the Enter key while that item is selected.
If the second parameter is set to true, the deactivate() method is called on the menu that the GtkMenuItem is a part of, taking the menu down. If set to false, the menu item is hidden on activation.