Enable possibility to set sensitivity of a menu item with a sub-menu attached inside a GMenu
I am currently confronted with the issue that has already been mentioned here: https://discourse.gnome.org/t/question-how-do-i-disable-a-menubar-menu-in-gtk-is-it-even-possible/906
Setting the sensitivity for a plain menu item is possible, but not for a menu item with a sub-menu attached. This feels like a step back from the former widget-based concept (GtkMenuBar, GtkMenu, GtkMenuItem), because if the menu item with a sub-menu attached is itself attached directly to the toplevel GMenu, this will be awkward to handle if all sub-menu items are supposed to be disabled. With GtkMenuBar I simply use gtk_widget_set_sensitive to disable the sensitivity of the item and all items of the sub-menu would be inaccessible then. With GMenu I can only disable the sensitivity of the sub-menu items themselves. I can use g_menu_remove to get the menu item off from the menu for a moment and reinsert it with g_menu_insert_item at a later time again, but this feels more like a wordaround.