Menubar items created in a loop



Hello,
i am unable to find any documentation or examples for creating menu items in loop.
This approach creates nothing and gives no error.

    Glib::RefPtr<Gtk::UIManager> m_refUIManager;
    Glib::RefPtr<Gtk::ActionGroup> m_refActionGroup;
while(...)
        m_refActionGroup->get_action("Connect")->create("aaa");

    m_refUIManager = Gtk::UIManager::create();
    m_refUIManager->insert_action_group(m_refActionGroup);

refActionGroup contains some other menus and there is xml containing its UI definition
m_refUIManager->add_ui_from_file("MainWindow.MenuBar.ui.xml");

Can you please provide me with some example code?

Thanks in advance
--
---
Adam Kovari(mailto:kovariadam gmail com)


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