Re: menu question



I think it's solved. I changed the name of action to "app.filenew" and it works.

There is another question:

What to do with the warning

"Gtk-WARNING **: GtkMenuBar 0x1586160 is mapped but visible=1 child_visible=1 parent gtkmm__GtkApplicationWindow 0x14c8260 mapped=0"

Pozdrawiam
Krzysztof Jasienski

On 08/18/2016 11:49 PM, Krzysztof wrote:
I'm beginning to manually set up application menu. I've done this:

void SimApp::on_startup()
{
    Glib::RefPtr<Gio::Menu> appmenu = Gio::Menu::create();
    Glib::RefPtr<Gio::Menu> itemnew = Gio::Menu::create();

add_action("filenew", sigc::mem_fun(*this, &SimApp::on_file_menu_new));
    itemnew->append("New", "filenew");
    appmenu->append_submenu("File", itemnew);
    set_menubar(appmenu);
}

The "New" item under File menu is dimmed. What's missing in that code?





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