menu question



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?


--
Regards
Krzysztof Jasienski



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