I added the signal handler connection/disconnection in the unity_gtk_menu_shell_set_menu_shell () function because sometimes the GtkMenuShell can be set to NULL, and it makes sense to no longer watch once that happens. If you're worried about it being connected/disconnected more than once, in practice that function is never called with a non-NULL GtkMenuShell except at initialization.
I added the signal handler connection/ disconnection in the unity_gtk_ menu_shell_ set_menu_ shell () function because sometimes the GtkMenuShell can be set to NULL, and it makes sense to no longer watch once that happens. If you're worried about it being connected/ disconnected more than once, in practice that function is never called with a non-NULL GtkMenuShell except at initialization.