Disable a submenu via Gio::Action


in Gtkmm2 it was possible to create an action with no callback for submenus. It allowed me do disable submenus.

In Gtkmm3, I wrote this:
                "    <menu id='MenuBar'>"
                "        <submenu>"
" <attribute name='label' translatable='yes'>_File</attribute>" " <attribute name='action'>app.file-menu</attribute>"
                "            <section>"
                "                <item>"

but when I disable the "file-menu" Gio::SimpleAction (and I do it after the window is realized!), the submenu is not disabled. Did I do something wrong or is it a regression in Gtk3? How can I do it?

Thanks a lot,

PS: BTW, is it possible to add to the doc that Gtk::Widget::insert_action_group() has no effect if the widget is not realized?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]