I'm making a trivial text editor (as an exercise) in GTK using Glade, GtkBuilder, and C. I have an edit menu with Cut, Copy, and Paste as well as a GtkTextView for the text. GtkTextView automatically binds the cut/copy/paste sequences for itself (and even provides menu items if you right click). I want to connect the Cut, Copy, and Paste menu items in my menu bar to my text view so they will act as expected.
Note that this is a two-way connection. (1) When one of the Cut, Copy, or Paste GtkMenuItem's is activated, it tells the GtkTextView to do something. (2) When a selection is made or cleared in the GtkTextView, Cut and Copy are enabled or disabled respectively (see gedit as an example). Moreover, (3) whether or not Paste is enabled depends on the state of the clipboard.
How do I connect my Cut, Copy, and Paste menu items to the text view? Is there a way to do it in Glade, or will my C program need some extra code for this? Is there a streamlined way to do this, or do I need to implement all three behaviors stated in the above paragraph manually?